Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • Synzvato/decentraleyes
  • gkrishnaks/decentraleyes
  • ExE-Boss/decentraleyes
  • whtsky/decentraleyes
  • grtgarrett/decentraleyes
  • An_dz/decentraleyes
  • Alaska/decentraleyes
  • finn/decentraleyes
  • klippy/decentraleyes
9 results
Show changes
Showing
with 2296 additions and 894 deletions
/**
* State Manager
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2017-03-10
* @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/.
*/
import Constants from '../data/constants.js';
import Helpers from '../utilities/helpers.js';
import Storage from './storage.js';
import View from './view.js';
/**
* Private Constants
*/
const _requestContexts = {};
/**
* Private Functions
*/
const _registerInjection = async (requestIdentifier) => {
let tabIdentifier, targetDetails, injectionIdentifier, tabContext, injectionCount;
({tabIdentifier, targetDetails} = _requestContexts[requestIdentifier]);
injectionIdentifier = targetDetails.source + targetDetails.path + targetDetails.version;
tabContext = await Storage.getTabContext(tabIdentifier);
tabContext[Constants.TabContext.INJECTIONS][injectionIdentifier] = targetDetails;
injectionCount = Object.keys(tabContext[Constants.TabContext.INJECTIONS]).length;
Storage.incrementStatistic(Constants.Statistic.AMOUNT_INJECTED);
View.renderInjectionCount(tabIdentifier, injectionCount);
await Storage.updateTabContext(tabIdentifier, tabContext);
};
const _clearInjections = async (requestDetails) => {
if (requestDetails.frameId === Constants.WebRequest.MAIN_FRAME_ID) {
if (requestDetails.tabId !== chrome.tabs.TAB_ID_NONE) {
const tabContext = await Storage.getTabContext(requestDetails.tabId);
if (tabContext) {
tabContext[Constants.TabContext.INJECTIONS] = {};
Storage.updateTabContext(requestDetails.tabId, tabContext);
}
View.renderInitialTabState(requestDetails.tabId, requestDetails.url);
}
}
};
/**
* Public Functions
*/
const createRequestContext = (requestIdentifier, requestContext) => {
_requestContexts[requestIdentifier] = requestContext;
};
const deleteRequestContext = (requestIdentifier) => {
delete _requestContexts[requestIdentifier];
};
/**
* Initializations
*/
chrome.tabs.query({}, (tabs) => {
for (const tab of tabs) {
View.renderInitialTabState(tab.id, tab.url, false);
}
Storage.createTabContexts(tabs);
});
/**
* Event Handlers
*/
chrome.tabs.onCreated.addListener((tab) => {
Storage.createTabContexts([tab], true);
});
chrome.tabs.onRemoved.addListener((tabIdentifier) => {
Storage.clearTabContext(tabIdentifier);
});
chrome.webRequest.onBeforeRequest.addListener(async (requestDetails) => {
const tabContext = await Storage.getTabContext(requestDetails.tabId);
if (tabContext) {
const tabIdentifier = tabContext[Constants.TabContext.IDENTIFIER];
if (tabIdentifier !== chrome.tabs.TAB_ID_NONE) {
tabContext[Constants.TabContext.URL] = requestDetails.url;
await Storage.updateTabContext(tabIdentifier, tabContext);
}
}
}, {'types': [Constants.WebRequestType.MAIN_FRAME], 'urls': [Constants.Address.ANY]});
chrome.webNavigation.onErrorOccurred.addListener(_clearInjections, {'url': [{'urlContains': ':'}]});
chrome.webNavigation.onCommitted.addListener(_clearInjections, {'url': [{'urlContains': ':'}]});
chrome.webRequest.onBeforeRedirect.addListener((requestDetails) => {
if (typeof _requestContexts[requestDetails.requestId] === 'object') {
if (! _requestContexts[requestDetails.requestId].isSilent) {
_registerInjection(requestDetails.requestId);
}
deleteRequestContext(requestDetails.requestId);
}
}, {'urls': [Constants.Address.ANY]});
chrome.storage.onChanged.addListener((changes) => {
if (Object.keys(changes).includes(Constants.Setting.DISABLE_PREFETCH)) {
Helpers.setPrefetchDisabled(changes[Constants.Setting.DISABLE_PREFETCH].newValue);
}
});
/**
* Initializations
*/
(async () => {
Helpers.setPrefetchDisabled(await Storage.getSetting(Constants.Setting.DISABLE_PREFETCH));
})();
/**
* Exports
*/
export default {
createRequestContext,
deleteRequestContext
};
/**
* Storage Manager
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2024-10-09
* @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/.
*/
import Constants from '../data/constants.js';
import SettingDefaults from '../data/setting/defaults.js';
import StatisticDefaults from '../data/statistic/defaults.js';
/**
* Private Constants
*/
const _items = {
'tabContexts': null, 'settings': null, 'statistics': null
};
const _promises = {
'tabContexts': null, 'settings': null, 'statistics': null
};
const _timeouts = {
'tabContexts': null, 'settings': null, 'statistics': null
};
/**
* Private Functions
*/
const _getLocalSettings = async () => {
const localSettings = await chrome.storage.local.get(SettingDefaults);
return localSettings;
};
const _getManagedSettings = async () => {
let managedSettingKeys, managedSettings;
managedSettingKeys = Object.keys(Constants.Setting);
try {
managedSettings = await chrome.storage.managed.get(managedSettingKeys);
if (window.chrome.runtime.lastError) {
throw new Error(window.chrome.runtime.lastError);
}
} catch {
managedSettings = {};
}
return managedSettings;
};
/**
* Public Functions
*/
const getTabContexts = async () => {
if (! _items.tabContexts) {
_promises.tabContexts ??= chrome.storage.session.get(Constants.SessionItem.TAB_CONTEXTS);
const tabContents = (await _promises.tabContexts)?.[Constants.SessionItem.TAB_CONTEXTS];
_items.tabContexts = tabContents ?? {};
_promises.tabContexts = null;
}
return _items.tabContexts;
};
const getTabContext = async (key) => {
const tabContexts = await getTabContexts();
key = String(key);
return tabContexts[key] ?? null;
};
const createTabContexts = async (tabs, replaceExisting = false) => {
const tabContexts = await getTabContexts();
for (const tab of tabs) {
const key = String(tab.id);
if (replaceExisting === true || ! Object.keys(tabContexts).includes(key)) {
tabContexts[key] = {
[Constants.TabContext.IDENTIFIER]: Number(key),
[Constants.TabContext.INJECTIONS]: {},
[Constants.TabContext.URL]: tab.url ?? null
};
}
}
await chrome.storage.session.set({tabContexts});
};
const updateTabContext = async (key, value) => {
const tabContexts = await getTabContexts();
key = String(key);
tabContexts[key] = value;
await chrome.storage.session.set({tabContexts});
};
const clearTabContext = async (key) => {
const tabContexts = await getTabContexts();
key = String(key);
delete tabContexts[key];
await chrome.storage.session.set({tabContexts});
};
const getSettings = async (concise = true) => {
if (! _items.settings) {
let localSettings, managedSettings, settings, environmentName;
_promises.settings ??= Promise.all([_getLocalSettings(), _getManagedSettings()]);
[localSettings, managedSettings] = await _promises.settings;
settings = Object.keys({...localSettings, ...managedSettings}).reduce((accumulator, key) => {
accumulator[key] = {
'value': managedSettings[key] || localSettings[key],
'origin': 'local'
};
if (managedSettings[key]) {
accumulator[key].origin = 'managed';
}
return accumulator;
}, {});
if (settings.blockMissing.value === true || settings.enforceStaging.value === true) {
environmentName = Constants.Environment.STAGING;
} else {
environmentName = Constants.Environment.STABLE;
};
settings[Constants.ComputedSetting.ENVIRONMENT_NAME] = {
'value': environmentName, 'origin': 'computed'
};
_items.settings ??= settings;
_promises.settings = null;
}
if (concise) {
return {...Object.fromEntries(Object.entries(_items.settings)
.map(([key, setting]) => [key, setting.value]))};
}
return _items.settings;
};
const getSetting = async (key, concise = true) => {
const settings = await getSettings(false);
if (! Object.keys(settings).includes(key)) {
throw new Error(`Setting "${key}" does not exist.`);
}
if (concise) {
return settings[key].value;
}
return settings[key];
};
const updateSetting = async (key, value) => {
const settings = await getSettings(false);
if (! Object.keys(settings).includes(key)) {
throw new Error(`Setting "${key}" does not exist.`);
}
if (settings[key].origin === 'computed') {
throw new Error(`Setting "${key}" is read-only.`);
}
await chrome.storage.local.set({[key]: value});
};
const clearSetting = async (key) => {
const settings = await getSettings(false);
if (! Object.keys(settings).includes(key)) {
throw new Error(`Setting "${key}" does not exist.`);
}
if (settings[key].origin === 'computed') {
throw new Error(`Setting "${key}" is read-only.`);
}
chrome.storage.local.remove(key);
};
const getStatistics = async () => {
if (! _items.statistics) {
_promises.statistics ??= chrome.storage.local.get(StatisticDefaults);
const statistics = await _promises.statistics;
if (typeof statistics[Constants.Statistic.AMOUNT_INJECTED] === 'number') {
statistics[Constants.Statistic.AMOUNT_INJECTED] = {
'value': statistics[Constants.Statistic.AMOUNT_INJECTED],
'createdAt': null
};
}
_items.statistics ??= statistics;
_promises.statistics = null;
}
return _items.statistics;
};
const getStatistic = async (key) => {
const statistics = await getStatistics();
if (! Object.keys(statistics).includes(key)) {
throw new Error(`Statistic "${key}" does not exist.`);
}
return statistics[key];
};
const incrementStatistic = async (key) => {
const statistics = await getStatistics();
clearTimeout(_timeouts.statistics);
if (! Object.keys(statistics).includes(key)) {
throw new Error(`Setting "${key}" does not exist.`);
}
statistics[key].value = ++statistics[key].value;
_timeouts.statistics = setTimeout(() => {
chrome.storage.local.set(statistics);
}, 500);
};
const clearStatistic = async (key) => {
const statistics = await getStatistics();
if (! Object.keys(statistics).includes(key)) {
throw new Error(`Statistic "${key}" does not exist.`);
}
clearTimeout(_timeouts.statistics);
chrome.storage.local.remove(key);
};
/**
* Event Handlers
*/
chrome.storage.onChanged.addListener((changes) => {
let updatedKeys, statisticKeys, settingKeys;
updatedKeys = Object.keys(changes);
statisticKeys = Object.values(Constants.Statistic);
settingKeys = Object.values(Constants.Setting);
if (updatedKeys.some((key) => statisticKeys.includes(key))) {
_items.statistics = null;
}
if (updatedKeys.some((key) => settingKeys.includes(key))) {
_items.settings = null;
}
if (updatedKeys.includes(Constants.SessionItem.TAB_CONTEXTS)) {
_items.tabContexts = null;
}
});
/**
* Exports
*/
export default {
getTabContexts,
getTabContext,
createTabContexts,
updateTabContext,
clearTabContext,
getSettings,
getSetting,
updateSetting,
clearSetting,
getStatistics,
getStatistic,
incrementStatistic,
clearStatistic
};
/**
* View Manager
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2024-10-17
* @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/.
*/
import Constants from '../data/constants.js';
import Helpers from '../utilities/helpers.js';
import Storage from './storage.js';
import Wrappers from '../utilities/wrappers.js';
/**
* Private Functions
*/
const _renderTabWhitelistState = async (tabIdentifier, url, injectionCount = 0) => {
let domain, domainIsWhitelisted;
domain = Helpers.extractDomainFromUrl(url);
domainIsWhitelisted = await Helpers.domainIsWhitelisted(domain);
if (domainIsWhitelisted) {
Wrappers.action.setIcon({'tabId': tabIdentifier, 'path': Helpers.determineIconPaths('disabled')});
} else {
Wrappers.action.setIcon({'tabId': tabIdentifier, 'path': Helpers.determineIconPaths('default')});
}
if (domainIsWhitelisted && injectionCount <= 0) {
Wrappers.action.setTitle({'tabId': tabIdentifier, 'title': 'Decentraleyes (–)'});
} else {
Wrappers.action.setTitle({'tabId': tabIdentifier, 'title': `Decentraleyes (${injectionCount})`});
}
};
const _clearBadgeText = (tabIdentifier) => {
Wrappers.action.setBadgeText({'tabId': tabIdentifier, 'text': ''});
};
/**
* Public Functions
*/
const renderInitialTabState = async (tabIdentifier, url, clearBadgeText = true) => {
const showIconBadge = await Storage.getSetting(Constants.Setting.SHOW_ICON_BADGE);
_renderTabWhitelistState(tabIdentifier, url);
if (showIconBadge === true && clearBadgeText === true) {
_clearBadgeText(tabIdentifier);
}
};
const renderInjectionCount = async (tabIdentifier, injectionCount) => {
const showIconBadge = await Storage.getSetting(Constants.Setting.SHOW_ICON_BADGE);
if (injectionCount > 0) {
Wrappers.action.setTitle({'tabId': tabIdentifier, 'title': `Decentraleyes (${injectionCount})`});
if (showIconBadge === true) {
Wrappers.action.setBadgeText({'tabId': tabIdentifier, 'text': injectionCount.toString()});
}
}
};
/**
* Event Handlers
*/
chrome.runtime.onInstalled.addListener(async (details) => {
let location, previousVersion, showReleaseNotes;
location = chrome.runtime.getURL('pages/welcome/welcome.html');
if (details.reason === chrome.runtime.OnInstalledReason.INSTALL ||
details.reason === chrome.runtime.OnInstalledReason.UPDATE) {
previousVersion = details.previousVersion;
if (previousVersion && previousVersion.startsWith('3')) {
return; // Do not show release notes after minor updates.
}
if (details.temporary === true) {
return; // Only show release notes on full installations.
}
showReleaseNotes = await Storage.getSetting(Constants.Setting.SHOW_RELEASE_NOTES);
if (showReleaseNotes === true) {
chrome.tabs.create({'url': location, 'active': false});
}
}
});
chrome.storage.onChanged.addListener(async (changes) => {
if (Object.keys(changes).includes(Constants.Setting.SHOW_ICON_BADGE)) {
const tabContexts = await Storage.getTabContexts();
if (changes[Constants.Setting.SHOW_ICON_BADGE].newValue === true) {
for (const tabContext of Object.values(tabContexts)) {
let tabIdentifier, injectionCount;
tabIdentifier = tabContext[Constants.TabContext.IDENTIFIER];
injectionCount = Object.keys(tabContext[Constants.TabContext.INJECTIONS]).length;
renderInjectionCount(tabIdentifier, injectionCount);
}
} else {
for (const tabContext of Object.values(tabContexts)) {
_clearBadgeText(tabContext[Constants.TabContext.IDENTIFIER]);
}
}
}
if (Object.keys(changes).includes(Constants.Setting.WHITELISTED_DOMAINS)) {
const tabContexts = await Storage.getTabContexts();
for (const tabContext of Object.values(tabContexts)) {
_renderTabWhitelistState(
tabContext[Constants.TabContext.IDENTIFIER],
tabContext[Constants.TabContext.URL],
Object.keys(tabContext[Constants.TabContext.INJECTIONS]).length
);
}
}
});
/**
* Initializations
*/
Wrappers.action.setBadgeBackgroundColor({'color': 'rgb(74, 130, 108)'});
Wrappers.action.setBadgeTextColor({'color': 'rgb(255, 255, 255)'});
/**
* Exports
*/
export default {
renderInitialTabState,
renderInjectionCount
};
......@@ -11,17 +11,15 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
'use strict';
/**
* Constants
* Public Constants
*/
const Address = {
'ANY': '*://*/*',
'ANY_PATH': '/*',
'ANY_PROTOCOL': '*://',
'CHROME_EXTENSION': 'chrome-extension:',
'CHROME': 'chrome:',
'DECENTRALEYES': 'decentraleyes.org',
'EXAMPLE': 'example.org',
'HTTP': 'http:',
......@@ -29,6 +27,11 @@ const Address = {
'WWW_PREFIX': 'www.'
};
const Environment = {
'STABLE': 'stable',
'STAGING': 'staging'
};
const Header = {
'COOKIE': 'Cookie',
'ORIGIN': 'Origin',
......@@ -46,10 +49,20 @@ const Resource = {
'VERSION_PLACEHOLDER': '{version}'
};
const SessionItem = {
'TAB_CONTEXTS': 'tabContexts'
};
const TabContext = {
'IDENTIFIER': 'identifier',
'INJECTIONS': 'injections',
'URL': 'url'
};
const Setting = {
'AMOUNT_INJECTED': 'amountInjected',
'BLOCK_MISSING': 'blockMissing',
'DISABLE_PREFETCH': 'disablePrefetch',
'ENFORCE_STAGING': 'enforceStaging',
'SHOW_ICON_BADGE': 'showIconBadge',
'SHOW_RELEASE_NOTES': 'showReleaseNotes',
'STRIP_METADATA': 'stripMetadata',
......@@ -57,17 +70,43 @@ const Setting = {
'XHR_TEST_DOMAIN': 'xhrTestDomain'
};
const ComputedSetting = {
'ENVIRONMENT_NAME': 'environmentName'
};
const Statistic = {
'AMOUNT_INJECTED': 'amountInjected',
'AMOUNT_SANITIZED': 'amountSanitized',
'AMOUNT_BLOCKED': 'amountBlocked'
};
const WebRequest = {
'GET': 'GET',
'BLOCKING': 'blocking',
'HEADERS': 'requestHeaders'
'HEADERS': 'requestHeaders',
'MAIN_FRAME_ID': 0
};
const WebRequestType = {
'MAIN_FRAME': 'main_frame',
'XHR': 'xmlhttprequest'
};
const Whitelist = {
'TRIM_EXPRESSION': /^;+|;+$/g,
'VALUE_SEPARATOR': ';'
/**
* Exports
*/
export default {
Address,
Environment,
Header,
MessageResponse,
Resource,
SessionItem,
TabContext,
Setting,
ComputedSetting,
Statistic,
WebRequest,
WebRequestType
};
/**
* Domain Exceptions
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2017-10-08 (originally "tainted")
* @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/.
*/
/**
* Public Constants
*/
const literal = {
'MTBmYXN0ZmluZ2Vycy5jb20=': true,
'Y291cmllci10cmlidW5lLmNvbQ==': true,
'Y29kZS53b3JsZA==': true,
'Y29sdW1iaWF0cmlidW5lLmNvbQ==': true,
'Y29sdW1iaWFkYWlseWhlcmFsZC5jb20=': true,
'Y2FtYnJpZGdlY2hyb24uY29t': true,
'Y2FudG9uZGFpbHlsZWRnZXIuY29t': true,
'Y2FudG9ucmVwLmNvbQ==': true,
'Y2FwZWNvZHRpbWVzLmNvbQ==': true,
'Y2FwdGNoYS5yZWFsdGVrLmNvbQ==': true,
'Y2FybWl0aW1lcy5jb20=': true,
'Y2RuanMuY29t': true,
'Y2VsbG1hcHBlci5uZXQ=': true,
'Y2hhcmxlc3RvbmV4cHJlc3MuY29t': true,
'Y2hlYm95Z2FubmV3cy5jb20=': true,
'Y2hpZWZ0YWluLmNvbQ==': true,
'Y2hpbGxpY290aGV0aW1lc2J1bGxldGluLmNvbQ==': true,
'Y2hpbGxpY290aGVuZXdzLmNvbQ==': true,
'Y2hpcGxleXBhcGVyLmNvbQ==': true,
'Y2hyb25pY2xlLWV4cHJlc3MuY29t': true,
'Y2lyY3VpdGxhYi5jb20=': true,
'Y2pvbmxpbmUuY29t': true,
'Y3JlYXRpdmVjb21tb25zLm9yZw==': true,
'Y3Jlc3R2aWV3YnVsbGV0aW4uY29t': true,
'Y3Jvb2tzdG9udGltZXMuY29t': true,
'Y3Nnb3N0YXRzLmdn': true,
'YW10cmliLmNvbQ==': true,
'YW1hcmlsbG8uY29t': true,
'YW1lc3RyaWIuY29t': true,
'YW55dmFuLmNvbQ==': true,
'YWNrLm5ldA==': true,
'YWR2b2NhdGVwcmVzcy5jb20=': true,
'YWRlbG5ld3MuY29t': true,
'YWRoZXJlbnQubGF2aWxsZWF2ZWxvLm9yZw==': true,
'YWxlZG90aW1lc3JlY29yZC5jb20=': true,
'YWxpY2V0eC5jb20=': true,
'YXBhbGFjaHRpbWVzLmNvbQ==': true,
'YXJkbW9yZWl0ZS5jb20=': true,
'YXVndXN0YWNocm9uaWNsZS5jb20=': true,
'YXVyb3JhYWR2ZXJ0aXNlci5uZXQ=': true,
'Ym9vbmV2aWxsZWRlbW9jcmF0LmNvbQ==': true,
'Ym9vbnZpbGxlZGFpbHluZXdzLmNvbQ==': true,
'YmFybmVzdmlsbGUtZW50ZXJwcmlzZS5jb20=': true,
'YmFybnN0YWJsZXBhdHJpb3QuY29t': true,
'YmFzaXNzZXRleGNoYW5nZS5vcmc=': true,
'YmNkZW1vY3JhdG9ubGluZS5jb20=': true,
'YmVhdXJlZ2FyZGRhaWx5bmV3cy5uZXQ=': true,
'Ymx1ZXJpZGdlbm93LmNvbQ==': true,
'Ymx1ZmZ0b250b2RheS5jb20=': true,
'YmxvZy5kYXRhd3JhcHBlci5kZQ==': true,
'YnIuc3BhbmtiYW5nLmNvbQ==': true,
'YnJvd253b29kdHguY29t': true,
'YnV0bGVyY291bnR5dGltZXNnYXpldHRlLmNvbQ==': true,
'YnVja3Njb3VudHljb3VyaWVydGltZXMuY29t': true,
'YnVuZGxlb2Zob2xkaW5nLmNvbQ==': true,
'YnVybGluZ3RvbmNvdW50eXRpbWVzLmNvbQ==': true,
'Z291cHN0YXRlLmNvbQ==': true,
'Z29lcmllLmNvbQ==': true,
'Z2F6ZXRhZG9wb3ZvLmNvbS5icg==': true,
'Z2Fkc2RlbnRpbWVzLmNvbQ==': true,
'Z2FpbmVzdmlsbGUuY29t': true,
'Z2FsZXNidXJnLmNvbQ==': true,
'Z2FsdmFuZXdzLmNvbQ==': true,
'Z2FzdG9uZ2F6ZXR0ZS5jb20=': true,
'Z2N0ZWxlZ3JhbS5jb20=': true,
'Z2R0Lm9xbGYuZ291di5xYy5jYQ==': true,
'Z2VuZXNlb3JlcHVibGljLmNvbQ==': true,
'Z2xvYmV0cm90dGVyLmRl': true,
'Z2xvd2luZy1iZWFyLm9yZw==': true,
'Z3JhbmRsYWtlbmV3cy5jb20=': true,
'Z3Jhbml0ZWZhbGxzbmV3cy5jb20=': true,
'Z3JlZW53b29kZGVtb2NyYXQuY29t': true,
'ZG92ZXJwb3N0LmNvbQ==': true,
'ZG9jcy5zZXJ2aWNlbm93LmNvbQ==': true,
'ZG9kZ2VnbG9iZS5jb20=': true,
'ZG9uYWxkc29udmlsbGVjaGllZi5jb20=': true,
'ZGFpbHktamVmZi5jb20=': true,
'ZGFpbHljb21ldC5jb20=': true,
'ZGFpbHljb21tZXJjaWFsLmNvbQ==': true,
'ZGFuc3ZpbGxlb25saW5lLmNvbQ==': true,
'ZGUuc2hhcmtvb24uY29t': true,
'ZGUuc3BhbmtiYW5nLmNvbQ==': true,
'ZGV2aWxzbGFrZWpvdXJuYWwuY29t': true,
'ZGlzcGF0Y2guY29t': true,
'ZHJvcGJveC5jb20=': true,
'ZW4uc2hhcmtvb24uY29t': true,
'ZW50ZXJwcmlzZW5ld3MuY29t': true,
'ZWFzdHBlb3JpYXRpbWVzY291cmllci5jb20=': true,
'ZWNoby1uZXdzLmNvLnVr': true,
'ZWNoby1waWxvdC5jb20=': true,
'ZWRpbmJ1cmdyZXZpZXcuY29t': true,
'ZWxsd29vZGNpdHlsZWRnZXIuY29t': true,
'ZXBleS5jb20=': true,
'ZXMuc2hhcmtvb24uY29t': true,
'ZXMuc3BhbmtiYW5nLmNvbQ==': true,
'ZXZvaWNlLmNvbQ==': true,
'ZXhhbWluZXItZW50ZXJwcmlzZS5jb20=': true,
'ZXhhbWluZXIubmV0': true,
'Zm93bGVydHJpYnVuZS5jb20=': true,
'Zm9zdGVycy5jb20=': true,
'ZmF5b2JzZXJ2ZXIuY29t': true,
'ZnIuc2hhcmtvb24uY29t': true,
'ZnIuc3BhbmtiYW5nLmNvbQ==': true,
'ZnJlZWJ1c3kuaW8=': true,
'a28uc2hhcmtvb24uY29t': true,
'a2luc3Rvbi5jb20=': true,
'a2lvd2Fjb3VudHlzaWduYWwuY29t': true,
'a2lya3N2aWxsZWRhaWx5ZXhwcmVzcy5jb20=': true,
'aG91bWF0b2RheS5jb20=': true,
'aG9ja2Vzc2luY29tbXVuaXR5bmV3cy5jb20=': true,
'aG9sbGFuZHNlbnRpbmVsLmNvbQ==': true,
'aGF2ZW5ld3MuY29t': true,
'aGFtYnVyZ3JlcG9ydGVyLmNvbQ==': true,
'aGFubmliYWwubmV0': true,
'aGRuZXdzLm5ldA==': true,
'aGVsZW5hLWFya2Fuc2FzLmNvbQ==': true,
'aGVyYWxkZGVtb2NyYXQuY29t': true,
'aGVyYWxkbmV3cy5jb20=': true,
'aGVyYWxkdHJpYnVuZS5jb20=': true,
'aGlsbHNkYWxlLm5ldA==': true,
'aHN2dm9pY2UuY29t': true,
'aHV0Y2huZXdzLmNvbQ==': true,
'aW4uc3BhbmtiYW5nLmNvbQ==': true,
'aW5kZW9ubGluZS5jb20=': true,
'aWNvLm9yZy51aw==': true,
'aWQuc3BhbmtiYW5nLmNvbQ==': true,
'aWRlbnRpLmNh': true,
'aXQuc2hhcmtvb24uY29t': true,
'aXQuc3BhbmtiYW5nLmNvbQ==': true,
'am91cm5hbGRlbW9jcmF0LmNvbQ==': true,
'am91cm5hbHN0YW5kYXJkLmNvbQ==': true,
'am95ZnVsbm9pc2VyZWNvcmRpbmdzLmNvbQ==': true,
'amEuc2hhcmtvb24uY29t': true,
'amFja3Nvbm5ld3NwYXBlcnMuY29t': true,
'amFja3NvbnZpbGxlLmNvbQ==': true,
'amRuZXdzLmNvbQ==': true,
'anAuc3BhbmtiYW5nLmNvbQ==': true,
'b253ZWxvLmNvbQ==': true,
'b25saW5lYXRoZW5zLmNvbQ==': true,
'b2FrcmlkZ2VyLmNvbQ==': true,
'b2NhbGEuY29t': true,
'b2hpby5jb20=': true,
'b2xuZXlkYWlseW1haWwuY29t': true,
'b3Bhdm90ZS5jb20=': true,
'b3BlbmRhdGEuY2JzLm5s': true,
'b3BlbndlYXRoZXJtYXAub3Jn': true,
'b3J6ZXN6ZS5jb20ucGw=': true,
'b3Jpb25nYXpldHRlLmNvbQ==': true,
'b3R0YXdhaGVyYWxkLmNvbQ==': true,
'bGEuc3BhbmtiYW5nLmNvbQ==': true,
'bGF6aXNrYS5jb20ucGw=': true,
'bGFiZG9vci5jb20=': true,
'bGFqdW50YXRyaWJ1bmVkZW1vY3JhdC5jb20=': true,
'bGFrZW5ld3NvbmxpbmUuY29t': true,
'bGVhdmVud29ydGh0aW1lcy5jb20=': true,
'bGVlc3ZpbGxlZGFpbHlsZWFkZXIuY29t': true,
'bGVtb24tYWlkLmRl': true,
'bGVuY29ubmVjdC5jb20=': true,
'bGVvbWluc3RlcmNoYW1wLmNvbQ==': true,
'bGluY29sbmNvdXJpZXIuY29t': true,
'bGlua2Jvc3RvbmhvbWVzLmNvbQ==': true,
'bGlubmNvdW50eWxlYWRlci5jb20=': true,
'bHViYm9ja29ubGluZS5jb20=': true,
'bS1jZS5wbA==': true,
'bW9iZXJseW1vbml0b3IuY29t': true,
'bW9qY2hvcnpvdy5wbA==': true,
'bW9qYnl0b20ucGw=': true,
'bW9qZWdsaXdpY2UucGw=': true,
'bW9qZWthdG93aWNlLnBs': true,
'bW9qZXR5Y2h5LnBs': true,
'bW9qbWlrb2xvdy5wbA==': true,
'bW9ucm9lY29wb3N0LmNvbQ==': true,
'bW9ucm9lbmV3cy5jb20=': true,
'bW9udGVuZXdzLmNvbQ==': true,
'bW9ybmluZ3N1bi5uZXQ=': true,
'bW9ydG9udGltZXNuZXdzLmNvbQ==': true,
'bW9zY293dmlsbGFnZXIuY29t': true,
'bWFudWFsc2xpYi5jb20=': true,
'bWNkb25vdWdodm9pY2UuY29t': true,
'bWNwaGVyc29uc2VudGluZWwuY29t': true,
'bWV0cm93ZXN0ZGFpbHluZXdzLmNvbQ==': true,
'bWV4aWNvbGVkZ2VyLmNvbQ==': true,
'bWVzbGlldXgucGFyaXMuZnI=': true,
'bWdtLmdvdi50cg==': true,
'bWlhbWlvay5jb20=': true,
'bWlkZGxldG93bnRyYW5zY3JpcHQuY29t': true,
'bWlkbG90aGlhbm1pcnJvci5jb20=': true,
'bWlsZm9yZGJlYWNvbi5jb20=': true,
'bWlsZm9yZGRhaWx5bmV3cy5jb20=': true,
'bWlsbGJ1cnlzdXR0b24uY29t': true,
'bWluaWdhbWVzLm1haWwucnU=': true,
'bWluaXF1YWR0ZXN0YmVuY2guY29t': true,
'bXBubm93LmNvbQ==': true,
'bXMuc3BhbmtiYW5nLmNvbQ==': true,
'bXRzaGFzdGFuZXdzLmNvbQ==': true,
'bXl0b3dubmVvLmNvbQ==': true,
'bm9yd2ljaGJ1bGxldGluLmNvbQ==': true,
'bm9ydGhuZWlnaGJvcm5ld3MuY29t': true,
'bmNuZXdzcHJlc3MuY29t': true,
'bmV2YWRhaW93YWpvdXJuYWwuY29t': true,
'bmV3Y29tZXJzdG93bi1uZXdzLmNvbQ==': true,
'bmV3YmVybnNqLmNvbQ==': true,
'bmV3bG9vay5kdGVlbmVyZ3kuY29t': true,
'bmV3c2NoaWVmLmNvbQ==': true,
'bmV3c2hlcmFsZC5jb20=': true,
'bmV3c3JlcHVibGljYW4uY29t': true,
'bmV3c3RyaWJ1bmUuaW5mbw==': true,
'bmV3cG9ydHJpLmNvbQ==': true,
'bmV3cy1qb3VybmFsb25saW5lLmNvbQ==': true,
'bmV3cy1zdGFyLmNvbQ==': true,
'bmVhZ2xlLmNvbQ==': true,
'bmVvc2hvZGFpbHluZXdzLmNvbQ==': true,
'bmhtLmFjLnVr': true,
'bmwuc2hhcmtvb24uY29t': true,
'bmwuc3BhbmtiYW5nLmNvbQ==': true,
'bndmZGFpbHluZXdzLmNvbQ==': true,
'c291dGhjb2FzdHRvZGF5LmNvbQ==': true,
'c29taWliby5jb20=': true,
'c29vZXZlbmluZ25ld3MuY29t': true,
'c29zbm93aWVja2kucGw=': true,
'c2F2YW5uYWhub3cuY29t': true,
'c2FsaW5hLmNvbQ==': true,
'c2Nhbi5uZXh0Y2xvdWQuY29t': true,
'c2NvdHRoZWxtZS5jby51aw==': true,
'c2NzdW50aW1lcy5jb20=': true,
'c2Uuc3BhbmtiYW5nLmNvbQ==': true,
'c2VhY29hc3RvbmxpbmUuY29t': true,
'c2VjdXJlLnBheW1lbnRldm9sdXRpb24uY29t': true,
'c2VjdXJpdHloZWFkZXJzLmNvbQ==': true,
'c2VjdXJpdHloZWFkZXJzLmlv': true,
'c2Vrdm9pY2UuY29t': true,
'c2VudGluZWwtc3RhbmRhcmQuY29t': true,
'c2hlbGJ5c3Rhci5jb20=': true,
'c2llbWlhbm93aWNlLm5ldC5wbA==': true,
'c2lnbmFsLm9yZw==': true,
'c2lza2l5b3VkYWlseS5jb20=': true,
'c2otci5jb20=': true,
'c2puZXdzb25saW5lLmNvbQ==': true,
'c2tvdXNlbi5kaw==': true,
'c2tvdXNlbi5ubw==': true,
'c2xlZXB5ZXllbmV3cy5jb20=': true,
'c3BhbmtiYW5nLmNvbQ==': true,
'c3JwcmVzc2dhemV0dGUuY29t': true,
'c3R1cmdpc2pvdXJuYWwuY29t': true,
'c3R1dHRnYXJ0ZGFpbHlsZWFkZXIuY29t': true,
'c3RhZGl1bS5zZQ==': true,
'c3Rhcm5ld3NvbmxpbmUuY29t': true,
'c3RhcmNvdXJpZXIuY29t': true,
'c3RhcmZsLmNvbQ==': true,
'c3RhdGVzbWFuLmNvbQ==': true,
'c3RhdWd1c3RpbmUuY29t': true,
'c3RlZmFuc3VuZGluLmdpdGh1Yi5pbw==': true,
'c3RldWJlbmNvdXJpZXIuY29t': true,
'c3RqYW1lc25ld3MuY29t': true,
'c3d0aW1lcy5jb20=': true,
'c3dpb255LnBs': true,
'cG9jb25vcmVjb3JkLmNvbQ==': true,
'cG9lZGIudHc=': true,
'cG9udGlhY2RhaWx5bGVhZGVyLmNvbQ==': true,
'cG9zdHNvdXRoLmNvbQ==': true,
'cGF0cmlvdGxlZGdlci5jb20=': true,
'cGF3aHVza2Fqb3VybmFsY2FwaXRhbC5jb20=': true,
'cGFsbWJlYWNocG9zdC5jb20=': true,
'cGFuZG9jLm9yZw==': true,
'cGFyaXMtZXhwcmVzcy5jb20=': true,
'cGJjb21tZXJjaWFsLmNvbQ==': true,
'cGVraW50aW1lcy5jb20=': true,
'cGVvcGxlZm9uZS5jaA==': true,
'cGlla2FyeXNsYXNraWUuY29tLnBs': true,
'cGpzdGFyLmNvbQ==': true,
'cGwuc2hhcmtvb24uY29t': true,
'cGwuc3BhbmtiYW5nLmNvbQ==': true,
'cHJhdHR0cmlidW5lLmNvbQ==': true,
'cHJlc3Nhcmd1cy5jb20=': true,
'cHJlc3NtZW50b3IuY29t': true,
'cHJvY2Vzc3R5cGVmb3VuZHJ5LmNvbQ==': true,
'cHJvZ3Jlc3MtaW5kZXguY29t': true,
'cHJvc3BlcnByZXNzbmV3cy5jb20=': true,
'cHJvdmlkZW5jZWpvdXJuYWwuY29t': true,
'cHQuc2hhcmtvb24uY29t': true,
'cHQuc3BhbmtiYW5nLmNvbQ==': true,
'cHlza293aWNlLmNvbS5wbA==': true,
'cXdlcnRlZS5jb20=': true,
'cmV2aWV3YXRsYXMuY29t': true,
'cmVjb3JkLWNvdXJpZXIuY29t': true,
'cmVjb3Jkb25saW5lLmNvbQ==': true,
'cmVjb3JkbmV0LmNvbQ==': true,
'cmVjb3Jkc3Rhci5jb20=': true,
'cmVkd29vZGZhbGxzZ2F6ZXR0ZS5jb20=': true,
'cmVnZW50Z3JleW1vdXRoLmNvLm56': true,
'cmVnaXN0ZXJndWFyZC5jb20=': true,
'cmVwb3J0LXVyaS5pbw==': true,
'cmlkZ2VjcmVzdGNhLmNvbQ==': true,
'cnJzdGFyLmNvbQ==': true,
'cnUuc2hhcmtvb24uY29t': true,
'cnUuc3BhbmtiYW5nLmNvbQ==': true,
'cnVkYXNsYXNrYS5jb20ucGw=': true,
'cnVubmVsc2NvdW50eXJlZ2lzdGVyLmNvbQ==': true,
'cnlibmlja2kuY29t': true,
'd29kemlzbGF3LmNvbS5wbA==': true,
'd29vZGZvcmR0aW1lcy5jb20=': true,
'd29yY2VzdGVybWFnLmNvbQ==': true,
'd2F4YWhhY2hpZXR4LmNvbQ==': true,
'd2F5bmVpbmRlcGVuZGVudC5jb20=': true,
'd2F5bmVwb3N0LmNvbQ==': true,
'd2FsdG9uc3VuLmNvbQ==': true,
'd2FzaGluZ3RvbnRpbWVzcmVwb3J0ZXIuY29t': true,
'd2ViLXBhdGllbnQuZGs=': true,
'd2Vla2x5Y2l0aXplbi5jb20=': true,
'd2VsbGluZ3RvbmRhaWx5bmV3cy5jb20=': true,
'd2VsbHN2aWxsZWRhaWx5LmNvbQ==': true,
'd2hpdGVhd2F5Lm5v': true,
'd2hpdGVhd2F5LmNvbQ==': true,
'd2hpdGVhd2F5LnNl': true,
'd2hpdGVoYWxsam91cm5hbC5jb20=': true,
'dG9uZXMuYmU=': true,
'dG9wc2FpbGFkdmVydGlzZXIuY29t': true,
'dGF1bnRvbmdhemV0dGUuY29t': true,
'dGFmdG1pZHdheWRyaWxsZXIuY29t': true,
'dGV1dG9wb2xpc3ByZXNzLmNvbQ==': true,
'dGVsZWdyYW0uY29t': true,
'dGguc3BhbmtiYW5nLmNvbQ==': true,
'dGhlLWRhaWx5LXJlY29yZC5jb20=': true,
'dGhlLWRpc3BhdGNoLmNvbQ==': true,
'dGhlLWxlYWRlci5jb20=': true,
'dGhlLXJldmlldy5jb20=': true,
'dGhlY2FyYm9uZGFsZW5ld3MuY29t': true,
'dGhlZ3JhZnRvbm5ld3MuY29t': true,
'dGhlZ3VyZG9udGltZXMuY29t': true,
'dGhlZGFpbHlyZXBvcnRlci5jb20=': true,
'dGhlZGVzdGlubG9nLmNvbQ==': true,
'dGhla2Fuc2FuLmNvbQ==': true,
'dGhlaGF3a2V5ZS5jb20=': true,
'dGhlaW50ZWxsLmNvbQ==': true,
'dGhlbGFuZG1hcmsuY29t': true,
'dGhlbGVkZ2VyLmNvbQ==': true,
'dGhlc3VidXJiYW5pdGUuY29t': true,
'dGhlcGVycnljaGllZi5jb20=': true,
'dGhlcm9sbGFkYWlseW5ld3MuY29t': true,
'dGhlcmVjb3JkaGVyYWxkLmNvbQ==': true,
'dGhldGltZXNuZXdzLmNvbQ==': true,
'dGhpc3dlZWtuZXdzLmNvbQ==': true,
'dGltZXMtZ2F6ZXR0ZS5jb20=': true,
'dGltZXN0ZWxlZ3JhbS5jb20=': true,
'dGltZXNjYWxlLmNvbQ==': true,
'dGltZXNvbmxpbmUuY29t': true,
'dGltZXNyZXBvcnRlci5jb20=': true,
'dHIuc2hhcmtvb24uY29t': true,
'dHIuc3BhbmtiYW5nLmNvbQ==': true,
'dHJhbnNjZW5kLWluZm8uY29t': true,
'dHVuZW15bXVzaWMuY29t': true,
'dHVzY2Fsb29zYW5ld3MuY29t': true,
'dW5pZmllZHBvcnRhbC1tZW0uZXBmaW5kaWEuZ292Lmlu': true,
'dWRhY2l0eS5jb20=': true,
'dXRpY2FvZC5jb20=': true,
'dXdvcmxkLmNvbQ==': true,
'dmFuYWxzdHluZWxlYWRlci5jb20=': true,
'dnZkYWlseXByZXNzLmNvbQ==': true,
'eW91cmdsZW5yb3NldHguY29t': true,
'eW91cnN0ZXBoZW52aWxsZXR4LmNvbQ==': true,
'eW91cnZhbGxleXZvaWNlLmNvbQ==': true,
'eW91cnZvdGVtYXR0ZXJzLmNvLnVr': true,
'eWFkaS5zaw==': true,
'eWVscC5jb20=': true,
'em9yeS5jb20ucGw=': true,
'emFicnplLmNvbS5wbA==': true,
'emgtaGFudC5zaGFya29vbi5jb20=': true
};
const dynamic = [
'd2lja2VkbG9jYWxcLmNvbQ==',
'eWFuZGV4XC5jb20=',
'eWFuZGV4XC5ydQ=='
];
/**
* Exports
*/
export default {
'literal': Object.fromEntries(Object.entries(literal).map(([key, value]) => [atob(key), value])),
'dynamic': dynamic.map((value) => new RegExp(atob(value)))
};
/**
* Shorthands
* Resource Aliases
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2018-02-24
* @since 2018-02-24 (originally "shorthands")
* @license MPL 2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
......@@ -11,72 +11,80 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
'use strict';
/**
* Shorthands
* Public Constants
*/
var shorthands = {
const aliases = {
// Google Hosted Libraries [Deprecated]
'ajax.googleapis.com': {
'resources/jquery/1.8/jquery.min.js.dec': {
'path': 'resources/jquery/1.8.3/jquery.min.js.dec',
'resources/jquery/1.8/jquery.min.jsm': {
'path': 'resources/jquery/1.8.3/jquery.min.jsm',
'version': '1.8.3'
},
'resources/jquery/1.7/jquery.min.js.dec': {
'path': 'resources/jquery/1.7.2/jquery.min.js.dec',
'resources/jquery/1.7/jquery.min.jsm': {
'path': 'resources/jquery/1.7.2/jquery.min.jsm',
'version': '1.7.2'
},
'resources/jquery/1.6/jquery.min.js.dec': {
'path': 'resources/jquery/1.6.4/jquery.min.js.dec',
'resources/jquery/1.6/jquery.min.jsm': {
'path': 'resources/jquery/1.6.4/jquery.min.jsm',
'version': '1.6.4'
},
'resources/jquery/1.5/jquery.min.js.dec': {
'path': 'resources/jquery/1.5.2/jquery.min.js.dec',
'resources/jquery/1.5/jquery.min.jsm': {
'path': 'resources/jquery/1.5.2/jquery.min.jsm',
'version': '1.5.2'
},
'resources/jquery/1.4/jquery.min.js.dec': {
'path': 'resources/jquery/1.4.4/jquery.min.js.dec',
'resources/jquery/1.4/jquery.min.jsm': {
'path': 'resources/jquery/1.4.4/jquery.min.jsm',
'version': '1.4.4'
},
'resources/jquery/1.3/jquery.min.js.dec': {
'path': 'resources/jquery/1.3.2/jquery.min.js.dec',
'resources/jquery/1.3/jquery.min.jsm': {
'path': 'resources/jquery/1.3.2/jquery.min.jsm',
'version': '1.3.2'
},
'resources/jquery/1.2/jquery.min.js.dec': {
'path': 'resources/jquery/1.2.6/jquery.min.js.dec',
'resources/jquery/1.2/jquery.min.jsm': {
'path': 'resources/jquery/1.2.6/jquery.min.jsm',
'version': '1.2.6'
}
},
// jQuery CDN [Deprecated]
'code.jquery.com': {
'resources/jquery/1.7/jquery.min.js.dec': {
'path': 'resources/jquery/1.7.0/jquery.min.js.dec',
'resources/jquery/1.7/jquery.min.jsm': {
'path': 'resources/jquery/1.7.0/jquery.min.jsm',
'version': '1.7.0'
},
'resources/jquery/1.6/jquery.min.js.dec': {
'path': 'resources/jquery/1.6.0/jquery.min.js.dec',
'resources/jquery/1.6/jquery.min.jsm': {
'path': 'resources/jquery/1.6.0/jquery.min.jsm',
'version': '1.6.0'
},
'resources/jquery/1.5/jquery.min.js.dec': {
'path': 'resources/jquery/1.5.0/jquery.min.js.dec',
'resources/jquery/1.5/jquery.min.jsm': {
'path': 'resources/jquery/1.5.0/jquery.min.jsm',
'version': '1.5.0'
},
'resources/jquery/1.4/jquery.min.js.dec': {
'path': 'resources/jquery/1.4.0/jquery.min.js.dec',
'resources/jquery/1.4/jquery.min.jsm': {
'path': 'resources/jquery/1.4.0/jquery.min.jsm',
'version': '1.4.0'
},
'resources/jquery/1.3/jquery.min.js.dec': {
'path': 'resources/jquery/1.3.0/jquery.min.js.dec',
'resources/jquery/1.3/jquery.min.jsm': {
'path': 'resources/jquery/1.3.0/jquery.min.jsm',
'version': '1.3.0'
}
}
};
/**
* Initializations
*/
// Geekzu Public Service [Mirror]
shorthands['sdn.geekzu.org'] = shorthands['ajax.googleapis.com'];
aliases['sdn.geekzu.org'] = aliases['ajax.googleapis.com'];
// USTC Linux User Group [Mirror]
shorthands['ajax.proxy.ustclug.org'] = shorthands['ajax.googleapis.com'];
aliases['ajax.proxy.ustclug.org'] = aliases['ajax.googleapis.com'];
/**
* Exports
*/
export default aliases;
/**
* Resource Environments
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2014-07-24 (originally "files")
* @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/.
*/
/**
* Public Constants
*/
const stable = {
// AngularJS
'resources/angularjs/1.0.1/angular.min.jsm': true,
'resources/angularjs/1.0.2/angular.min.jsm': true,
'resources/angularjs/1.0.3/angular.min.jsm': true,
'resources/angularjs/1.0.4/angular.min.jsm': true,
'resources/angularjs/1.0.5/angular.min.jsm': true,
'resources/angularjs/1.0.6/angular.min.jsm': true,
'resources/angularjs/1.0.8/angular.min.jsm': true,
'resources/angularjs/1.2.0/angular.min.jsm': true,
'resources/angularjs/1.2.1/angular.min.jsm': true,
'resources/angularjs/1.2.10/angular.min.jsm': true,
'resources/angularjs/1.2.15/angular.min.jsm': true,
'resources/angularjs/1.2.16/angular.min.jsm': true,
'resources/angularjs/1.2.20/angular.min.jsm': true,
'resources/angularjs/1.2.23/angular.min.jsm': true,
'resources/angularjs/1.2.26/angular.min.jsm': true,
'resources/angularjs/1.2.28/angular.min.jsm': true,
'resources/angularjs/1.2.29/angular.min.jsm': true,
'resources/angularjs/1.3.0/angular.min.jsm': true,
'resources/angularjs/1.3.3/angular.min.jsm': true,
'resources/angularjs/1.3.8/angular.min.jsm': true,
'resources/angularjs/1.3.10/angular.min.jsm': true,
'resources/angularjs/1.3.11/angular.min.jsm': true,
'resources/angularjs/1.3.14/angular.min.jsm': true,
'resources/angularjs/1.3.15/angular.min.jsm': true,
'resources/angularjs/1.4.0/angular.min.jsm': true,
'resources/angularjs/1.4.2/angular.min.jsm': true,
'resources/angularjs/1.4.8/angular.min.jsm': true,
// Backbone.js
'resources/backbone.js/0.9.0/backbone-min.jsm': true,
'resources/backbone.js/0.9.1/backbone-min.jsm': true,
'resources/backbone.js/0.9.2/backbone-min.jsm': true,
'resources/backbone.js/0.9.9/backbone-min.jsm': true,
'resources/backbone.js/0.9.10/backbone-min.jsm': true,
'resources/backbone.js/1.0.0/backbone-min.jsm': true,
'resources/backbone.js/1.1.0/backbone-min.jsm': true,
'resources/backbone.js/1.1.1/backbone-min.jsm': true,
'resources/backbone.js/1.1.2/backbone-min.jsm': true,
'resources/backbone.js/1.2.0/backbone-min.jsm': true,
'resources/backbone.js/1.2.1/backbone-min.jsm': true,
'resources/backbone.js/1.2.2/backbone-min.jsm': true,
'resources/backbone.js/1.2.3/backbone-min.jsm': true,
// Dojo
'resources/dojo/1.4.1/dojo/dojo.jsm': true,
'resources/dojo/1.4.5/dojo/dojo.jsm': true,
'resources/dojo/1.5.0/dojo/dojo.jsm': true,
'resources/dojo/1.6.1/dojo/dojo.jsm': true,
'resources/dojo/1.7.5/dojo/dojo.jsm': true,
'resources/dojo/1.8.3/dojo/dojo.jsm': true,
'resources/dojo/1.8.7/dojo/dojo.jsm': true,
'resources/dojo/1.8.9/dojo/dojo.jsm': true,
'resources/dojo/1.9.1/dojo/dojo.jsm': true,
'resources/dojo/1.9.3/dojo/dojo.jsm': true,
'resources/dojo/1.9.7/dojo/dojo.jsm': true,
'resources/dojo/1.10.4/dojo/dojo.jsm': true,
// Ember.js
'resources/ember.js/1.0.1/ember.min.jsm': true,
'resources/ember.js/1.1.3/ember.min.jsm': true,
'resources/ember.js/1.2.2/ember.min.jsm': true,
'resources/ember.js/1.3.2/ember.min.jsm': true,
'resources/ember.js/1.4.0/ember.min.jsm': true,
'resources/ember.js/1.5.1/ember.min.jsm': true,
'resources/ember.js/2.0.0/ember.min.jsm': true,
'resources/ember.js/2.0.2/ember.min.jsm': true,
'resources/ember.js/2.1.0/ember.min.jsm': true,
// Ext Core
'resources/ext-core/3.0.0/ext-core.jsm': true,
'resources/ext-core/3.1.0/ext-core.jsm': true,
// jQuery
'resources/jquery/1.2.3/jquery.min.jsm': true,
'resources/jquery/1.2.6/jquery.min.jsm': true,
'resources/jquery/1.3.0/jquery.min.jsm': true,
'resources/jquery/1.3.1/jquery.min.jsm': true,
'resources/jquery/1.3.2/jquery.min.jsm': true,
'resources/jquery/1.4.0/jquery.min.jsm': true,
'resources/jquery/1.4.1/jquery.min.jsm': true,
'resources/jquery/1.4.2/jquery.min.jsm': true,
'resources/jquery/1.4.3/jquery.min.jsm': true,
'resources/jquery/1.4.4/jquery.min.jsm': true,
'resources/jquery/1.5.0/jquery.min.jsm': true,
'resources/jquery/1.5.1/jquery.min.jsm': true,
'resources/jquery/1.5.2/jquery.min.jsm': true,
'resources/jquery/1.6.0/jquery.min.jsm': true,
'resources/jquery/1.6.1/jquery.min.jsm': true,
'resources/jquery/1.6.2/jquery.min.jsm': true,
'resources/jquery/1.6.3/jquery.min.jsm': true,
'resources/jquery/1.6.4/jquery.min.jsm': true,
'resources/jquery/1.7.0/jquery.min.jsm': true,
'resources/jquery/1.7.1/jquery.min.jsm': true,
'resources/jquery/1.7.2/jquery.min.jsm': true,
'resources/jquery/1.8.0/jquery.min.jsm': true,
'resources/jquery/1.8.1/jquery.min.jsm': true,
'resources/jquery/1.8.2/jquery.min.jsm': true,
'resources/jquery/1.8.3/jquery.min.jsm': true,
'resources/jquery/1.9.0/jquery.min.jsm': true,
'resources/jquery/1.9.1/jquery.min.jsm': true,
'resources/jquery/1.10.0/jquery.min.jsm': true,
'resources/jquery/1.10.1/jquery.min.jsm': true,
'resources/jquery/1.10.2/jquery.min.jsm': true,
'resources/jquery/1.11.0/jquery.min.jsm': true,
'resources/jquery/1.11.1/jquery.min.jsm': true,
'resources/jquery/1.11.2/jquery.min.jsm': true,
'resources/jquery/1.11.3/jquery.min.jsm': true,
'resources/jquery/1.12.0/jquery.min.jsm': true,
'resources/jquery/1.12.1/jquery.min.jsm': true,
'resources/jquery/1.12.2/jquery.min.jsm': true,
'resources/jquery/1.12.3/jquery.min.jsm': true,
'resources/jquery/1.12.4/jquery.min.jsm': true,
'resources/jquery/2.0.0/jquery.min.jsm': true,
'resources/jquery/2.0.1/jquery.min.jsm': true,
'resources/jquery/2.0.2/jquery.min.jsm': true,
'resources/jquery/2.0.3/jquery.min.jsm': true,
'resources/jquery/2.1.0/jquery.min.jsm': true,
'resources/jquery/2.1.1/jquery.min.jsm': true,
'resources/jquery/2.1.3/jquery.min.jsm': true,
'resources/jquery/2.1.4/jquery.min.jsm': true,
// jQuery UI
'resources/jqueryui/1.5.3/jquery-ui.min.jsm': true,
'resources/jqueryui/1.6.0/jquery-ui.min.jsm': true,
'resources/jqueryui/1.7.3/jquery-ui.min.jsm': true,
'resources/jqueryui/1.8.24/jquery-ui.min.jsm': true,
'resources/jqueryui/1.9.2/jquery-ui.min.jsm': true,
'resources/jqueryui/1.10.4/jquery-ui.min.jsm': true,
'resources/jqueryui/1.11.0/jquery-ui.min.jsm': true,
'resources/jqueryui/1.11.1/jquery-ui.min.jsm': true,
'resources/jqueryui/1.11.2/jquery-ui.min.jsm': true,
'resources/jqueryui/1.11.3/jquery-ui.min.jsm': true,
'resources/jqueryui/1.11.4/jquery-ui.min.jsm': true,
// Modernizr
'resources/modernizr/2.6.2/modernizr.min.jsm': true,
'resources/modernizr/2.7.1/modernizr.min.jsm': true,
'resources/modernizr/2.7.2/modernizr.min.jsm': true,
'resources/modernizr/2.8.2/modernizr.min.jsm': true,
'resources/modernizr/2.8.3/modernizr.min.jsm': true,
// MooTools
'resources/mootools/1.1.1/mootools-yui-compressed.jsm': true,
'resources/mootools/1.1.2/mootools-yui-compressed.jsm': true,
'resources/mootools/1.2.1/mootools-yui-compressed.jsm': true,
'resources/mootools/1.2.3/mootools-yui-compressed.jsm': true,
'resources/mootools/1.2.4/mootools-yui-compressed.jsm': true,
'resources/mootools/1.2.5/mootools-yui-compressed.jsm': true,
'resources/mootools/1.3.0/mootools-yui-compressed.jsm': true,
'resources/mootools/1.3.1/mootools-yui-compressed.jsm': true,
'resources/mootools/1.3.2/mootools-yui-compressed.jsm': true,
'resources/mootools/1.4.1/mootools-yui-compressed.jsm': true,
'resources/mootools/1.4.5/mootools-yui-compressed.jsm': true,
'resources/mootools/1.5.0/mootools-yui-compressed.jsm': true,
'resources/mootools/1.5.1/mootools-yui-compressed.jsm': true,
// Prototype
'resources/prototype/1.6.0.2/prototype.jsm': true,
'resources/prototype/1.6.0.3/prototype.jsm': true,
'resources/prototype/1.6.1.0/prototype.jsm': true,
'resources/prototype/1.7.0.0/prototype.jsm': true,
'resources/prototype/1.7.1.0/prototype.jsm': true,
'resources/prototype/1.7.2.0/prototype.jsm': true,
'resources/prototype/1.7.3.0/prototype.jsm': true,
// Scriptaculous
'resources/scriptaculous/1.8.1/scriptaculous.jsm': true,
'resources/scriptaculous/1.8.2/scriptaculous.jsm': true,
'resources/scriptaculous/1.8.3/scriptaculous.jsm': true,
'resources/scriptaculous/1.9.0/scriptaculous.jsm': true,
// SWFObject
'resources/swfobject/2.1/swfobject.jsm': true,
'resources/swfobject/2.2/swfobject.jsm': true,
// Underscore.js
'resources/underscore.js/1.3.0/underscore-min.jsm': true,
'resources/underscore.js/1.3.1/underscore-min.jsm': true,
'resources/underscore.js/1.3.3/underscore-min.jsm': true,
'resources/underscore.js/1.4.0/underscore-min.jsm': true,
'resources/underscore.js/1.4.1/underscore-min.jsm': true,
'resources/underscore.js/1.4.2/underscore-min.jsm': true,
'resources/underscore.js/1.4.3/underscore-min.jsm': true,
'resources/underscore.js/1.4.4/underscore-min.jsm': true,
'resources/underscore.js/1.5.0/underscore-min.jsm': true,
'resources/underscore.js/1.5.1/underscore-min.jsm': true,
'resources/underscore.js/1.5.2/underscore-min.jsm': true,
'resources/underscore.js/1.6.0/underscore-min.jsm': true,
'resources/underscore.js/1.7.0/underscore-min.jsm': true,
'resources/underscore.js/1.8.0/underscore-min.jsm': true,
'resources/underscore.js/1.8.1/underscore-min.jsm': true,
'resources/underscore.js/1.8.2/underscore-min.jsm': true,
'resources/underscore.js/1.8.3/underscore-min.jsm': true,
// Web Font Loader
'resources/webfont/1.0.0/webfont.jsm': true,
'resources/webfont/1.0.1/webfont.jsm': true,
'resources/webfont/1.0.2/webfont.jsm': true,
'resources/webfont/1.0.3/webfont.jsm': true,
'resources/webfont/1.0.4/webfont.jsm': true,
'resources/webfont/1.0.5/webfont.jsm': true,
'resources/webfont/1.0.6/webfont.jsm': true,
'resources/webfont/1.0.9/webfont.jsm': true,
'resources/webfont/1.0.10/webfont.jsm': true,
'resources/webfont/1.0.11/webfont.jsm': true,
'resources/webfont/1.0.12/webfont.jsm': true,
'resources/webfont/1.0.13/webfont.jsm': true,
'resources/webfont/1.0.14/webfont.jsm': true,
'resources/webfont/1.0.15/webfont.jsm': true,
'resources/webfont/1.0.16/webfont.jsm': true,
'resources/webfont/1.0.17/webfont.jsm': true,
'resources/webfont/1.0.18/webfont.jsm': true,
'resources/webfont/1.0.19/webfont.jsm': true,
'resources/webfont/1.0.21/webfont.jsm': true,
'resources/webfont/1.0.22/webfont.jsm': true,
'resources/webfont/1.0.23/webfont.jsm': true,
'resources/webfont/1.0.24/webfont.jsm': true,
'resources/webfont/1.0.25/webfont.jsm': true,
'resources/webfont/1.0.26/webfont.jsm': true,
'resources/webfont/1.0.27/webfont.jsm': true,
'resources/webfont/1.0.28/webfont.jsm': true,
'resources/webfont/1.0.29/webfont.jsm': true,
'resources/webfont/1.0.30/webfont.jsm': true,
'resources/webfont/1.0.31/webfont.jsm': true,
'resources/webfont/1.1.0/webfont.jsm': true,
'resources/webfont/1.1.1/webfont.jsm': true,
'resources/webfont/1.1.2/webfont.jsm': true,
'resources/webfont/1.3.0/webfont.jsm': true,
'resources/webfont/1.4.2/webfont.jsm': true,
'resources/webfont/1.4.6/webfont.jsm': true,
'resources/webfont/1.4.7/webfont.jsm': true,
'resources/webfont/1.4.8/webfont.jsm': true,
'resources/webfont/1.4.10/webfont.jsm': true,
'resources/webfont/1.5.0/webfont.jsm': true,
'resources/webfont/1.5.2/webfont.jsm': true,
'resources/webfont/1.5.3/webfont.jsm': true,
'resources/webfont/1.5.6/webfont.jsm': true,
'resources/webfont/1.5.10/webfont.jsm': true,
'resources/webfont/1.5.18/webfont.jsm': true
};
const staging = {...stable, ...{
// AngularJS
'resources/angularjs/1.5.8/angular.min.jsm': true,
'resources/angularjs/1.6.1/angular.min.jsm': true,
'resources/angularjs/1.6.5/angular.min.jsm': true,
// Backbone.js
'resources/backbone.js/1.3.3/backbone-min.jsm': true,
'resources/backbone.js/1.4.0/backbone-min.jsm': true,
// jQuery
'resources/jquery/2.2.0/jquery.min.jsm': true,
'resources/jquery/2.2.1/jquery.min.jsm': true,
'resources/jquery/2.2.2/jquery.min.jsm': true,
'resources/jquery/2.2.3/jquery.min.jsm': true,
'resources/jquery/2.2.4/jquery.min.jsm': true,
'resources/jquery/3.0.0/jquery.min.jsm': true,
'resources/jquery/3.1.0/jquery.min.jsm': true,
'resources/jquery/3.1.1/jquery.min.jsm': true,
'resources/jquery/3.2.0/jquery.min.jsm': true,
'resources/jquery/3.2.1/jquery.min.jsm': true,
'resources/jquery/3.3.1/jquery.min.jsm': true,
'resources/jquery/3.4.0/jquery.min.jsm': true,
'resources/jquery/3.4.1/jquery.min.jsm': true,
'resources/jquery/3.5.0/jquery.min.jsm': true,
'resources/jquery/3.5.1/jquery.min.jsm': true,
'resources/jquery/3.6.0/jquery.min.jsm': true,
'resources/jquery/3.6.1/jquery.min.jsm': true,
'resources/jquery/3.6.4/jquery.min.jsm': true,
'resources/jquery/3.7.0/jquery.min.jsm': true,
'resources/jquery/3.7.1/jquery.min.jsm': true,
// Moment.js
'resources/moment.js/2.8.3/moment.min.jsm': true,
'resources/moment.js/2.8.4/moment.min.jsm': true,
'resources/moment.js/2.10.2/moment.min.jsm': true,
'resources/moment.js/2.10.3/moment.min.jsm': true,
'resources/moment.js/2.10.6/moment.min.jsm': true,
'resources/moment.js/2.11.1/moment.min.jsm': true,
'resources/moment.js/2.11.2/moment.min.jsm': true,
'resources/moment.js/2.17.0/moment.min.jsm': true,
'resources/moment.js/2.17.1/moment.min.jsm': true,
'resources/moment.js/2.18.1/moment.min.jsm': true,
'resources/moment.js/2.19.1/moment.min.jsm': true,
'resources/moment.js/2.19.2/moment.min.jsm': true,
'resources/moment.js/2.19.3/moment.min.jsm': true,
'resources/moment.js/2.20.1/moment.min.jsm': true,
'resources/moment.js/2.22.0/moment.min.jsm': true,
'resources/moment.js/2.22.1/moment.min.jsm': true,
'resources/moment.js/2.22.2/moment.min.jsm': true,
'resources/moment.js/2.24.0/moment.min.jsm': true,
'resources/moment.js/2.29.1/moment.min.jsm': true,
'resources/moment.js/2.29.4/moment.min.jsm': true,
// Underscore.js
'resources/underscore.js/1.9.0/underscore-min.jsm': true,
'resources/underscore.js/1.9.1/underscore-min.jsm': true,
'resources/underscore.js/1.13.4/underscore-min.jsm': true
}};
/**
* Exports
*/
export default {
stable,
staging
};
This diff is collapsed.
/**
* Setting Defaults
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2024-10-10
* @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/.
*/
import Constants from '../constants.js';
/**
* Public Constants
*/
const defaults = {
[Constants.Setting.BLOCK_MISSING]: false,
[Constants.Setting.DISABLE_PREFETCH]: true,
[Constants.Setting.ENFORCE_STAGING]: false,
[Constants.Setting.SHOW_ICON_BADGE]: true,
[Constants.Setting.SHOW_RELEASE_NOTES]: true,
[Constants.Setting.STRIP_METADATA]: true,
[Constants.Setting.WHITELISTED_DOMAINS]: {},
[Constants.Setting.XHR_TEST_DOMAIN]: Constants.Address.DECENTRALEYES
};
/**
* Exports
*/
export default defaults;
/**
* Internal API Wrapper Module
* Statistic Defaults
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2017-12-03
* @license MPL 2.0
* @since 2024-10-10
* @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';
import Constants from '../constants.js';
/**
* Wrappers
* Public Constants
*/
var wrappers = {};
const defaults = {
/**
* Public Methods
*/
[Constants.Statistic.AMOUNT_INJECTED]: {
'value': 0, 'createdAt': new Date().toISOString()
},
wrappers.setBadgeBackgroundColor = function (details) {
[Constants.Statistic.AMOUNT_SANITIZED]: {
'value': 0, 'createdAt': new Date().toISOString()
},
if (chrome.browserAction.setBadgeBackgroundColor !== undefined) {
chrome.browserAction.setBadgeBackgroundColor(details);
[Constants.Statistic.AMOUNT_BLOCKED]: {
'value': 0, 'createdAt': new Date().toISOString()
}
};
wrappers.setBadgeText = function (details) {
/**
* Exports
*/
if (chrome.browserAction.setBadgeText !== undefined) {
chrome.browserAction.setBadgeText(details);
}
};
export default defaults;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.