LocalCDN-Firefox-Chrome-Brave/core/constants.js

91 lines
2.0 KiB
JavaScript
Raw Normal View History

2020-02-27 13:45:29 +01:00
/**
* Global Constants
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2017-10-27
2020-04-14 07:43:25 +02:00
*
* @author nobody42
* @since 2020-02-26
*
2020-02-27 13:45:29 +01:00
* @license MPL 2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
'use strict';
/**
* Constants
*/
const Address = {
'ANY': '*://*/*',
'ANY_PATH': '/*',
'ANY_PROTOCOL': '*://',
'CHROME': 'chrome:',
'CHROME_EXTENSION': 'chrome-extension:',
'DECENTRALEYES': 'decentraleyes.org',
'EXAMPLE': 'example.org',
'HTTP': 'http:',
'HTTPS': 'https:',
'RESOURCE_PATH': '/resources',
'ROOT_PATH': '/',
'WWW_PREFIX': 'www.'
};
const Environment = {
'STABLE': 'stable',
'STAGING': 'staging'
};
const Header = {
'COOKIE': 'Cookie',
'ORIGIN': 'Origin',
'REFERER': 'Referer'
};
const MessageResponse = {
'ASYNCHRONOUS': true,
'SYNCHRONOUS': false
};
const Resource = {
'MAPPING_EXPRESSION': /\.map$/i,
'VERSION_EXPRESSION': /(?:\d{1,2}\.){1,3}\d{1,2}/,
'VERSION_PLACEHOLDER': '{version}'
};
const Setting = {
'AMOUNT_INJECTED': 'amountInjected',
'BLOCK_MISSING': 'blockMissing',
'DISABLE_PREFETCH': 'disablePrefetch',
'ENFORCE_STAGING': 'enforceStaging',
'SHOW_ICON_BADGE': 'showIconBadge',
'HIDE_RELEASE_NOTES': 'hideReleaseNotes',
2020-02-27 13:45:29 +01:00
'STRIP_METADATA': 'stripMetadata',
'LAST_MAPPING_UPDATE': 'lastMappingUpdate',
2020-02-27 13:45:29 +01:00
'WHITELISTED_DOMAINS': 'whitelistedDomains',
2020-03-29 10:23:16 +02:00
'XHR_TEST_DOMAIN': 'xhrTestDomain',
'LOGGING': 'enableLogging'
2020-02-27 13:45:29 +01:00
};
const WebRequest = {
'GET': 'GET',
'BLOCKING': 'blocking',
2020-04-30 19:13:27 +02:00
'HEADERS': 'requestHeaders',
'RESPONSE_HEADERS': 'responseHeaders'
2020-02-27 13:45:29 +01:00
};
const WebRequestType = {
'MAIN_FRAME': 'main_frame',
'XHR': 'xmlhttprequest'
};
const Whitelist = {
'TRIM_EXPRESSION': /^;+|;+$/g,
'VALUE_SEPARATOR': ';'
};