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 2022 additions and 1145 deletions
/**
* Global Constants
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2017-10-27
* @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 Address = {
'ANY': '*://*/*',
'ANY_PATH': '/*',
'ANY_PROTOCOL': '*://',
'CHROME': 'chrome:',
'DECENTRALEYES': 'decentraleyes.org',
'EXAMPLE': 'example.org',
'HTTP': 'http:',
'HTTPS': 'https:',
'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 SessionItem = {
'TAB_CONTEXTS': 'tabContexts'
};
const TabContext = {
'IDENTIFIER': 'identifier',
'INJECTIONS': 'injections',
'URL': 'url'
};
const Setting = {
'BLOCK_MISSING': 'blockMissing',
'DISABLE_PREFETCH': 'disablePrefetch',
'ENFORCE_STAGING': 'enforceStaging',
'SHOW_ICON_BADGE': 'showIconBadge',
'SHOW_RELEASE_NOTES': 'showReleaseNotes',
'STRIP_METADATA': 'stripMetadata',
'WHITELISTED_DOMAINS': 'whitelistedDomains',
'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',
'MAIN_FRAME_ID': 0
};
const WebRequestType = {
'MAIN_FRAME': 'main_frame',
'XHR': 'xmlhttprequest'
};
/**
* Exports
*/
export default {
Address,
Environment,
Header,
MessageResponse,
Resource,
SessionItem,
TabContext,
Setting,
ComputedSetting,
Statistic,
WebRequest,
WebRequestType
};
This diff is collapsed.
/**
* Resource Aliases
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2018-02-24 (originally "shorthands")
* @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 aliases = {
// Google Hosted Libraries [Deprecated]
'ajax.googleapis.com': {
'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.jsm': {
'path': 'resources/jquery/1.7.2/jquery.min.jsm',
'version': '1.7.2'
},
'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.jsm': {
'path': 'resources/jquery/1.5.2/jquery.min.jsm',
'version': '1.5.2'
},
'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.jsm': {
'path': 'resources/jquery/1.3.2/jquery.min.jsm',
'version': '1.3.2'
},
'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.jsm': {
'path': 'resources/jquery/1.7.0/jquery.min.jsm',
'version': '1.7.0'
},
'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.jsm': {
'path': 'resources/jquery/1.5.0/jquery.min.jsm',
'version': '1.5.0'
},
'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.jsm': {
'path': 'resources/jquery/1.3.0/jquery.min.jsm',
'version': '1.3.0'
}
}
};
/**
* Initializations
*/
// Geekzu Public Service [Mirror]
aliases['sdn.geekzu.org'] = aliases['ajax.googleapis.com'];
// USTC Linux User Group [Mirror]
aliases['ajax.proxy.ustclug.org'] = aliases['ajax.googleapis.com'];
/**
* Exports
*/
export default aliases;
This diff is collapsed.
This diff is collapsed.
/**
* Resource Sets
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2014-05-30 (originally "resources")
* @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 sets = {
// AngularJS
'angular': {
'path': 'resources/angularjs/{version}/angular.min.jsm',
'type': 'application/javascript'
},
// Backbone.js
'backbone': {
'path': 'resources/backbone.js/{version}/backbone-min.jsm',
'type': 'application/javascript'
},
// Dojo
'dojo': {
'path': 'resources/dojo/{version}/dojo/dojo.jsm',
'type': 'application/javascript'
},
// Ember.js
'ember': {
'path': 'resources/ember.js/{version}/ember.min.jsm',
'type': 'application/javascript'
},
// Ext Core
'extCore': {
'path': 'resources/ext-core/{version}/ext-core.jsm',
'type': 'application/javascript'
},
// jQuery
'jQuery': {
'path': 'resources/jquery/{version}/jquery.min.jsm',
'type': 'application/javascript'
},
// jQuery UI
'jQueryUI': {
'path': 'resources/jqueryui/{version}/jquery-ui.min.jsm',
'type': 'application/javascript'
},
// Modernizr
'modernizr': {
'path': 'resources/modernizr/{version}/modernizr.min.jsm',
'type': 'application/javascript'
},
// Moment.js
'moment': {
'path': 'resources/moment.js/{version}/moment.min.jsm',
'type': 'application/javascript'
},
// MooTools
'mootools': {
'path': 'resources/mootools/{version}/mootools-yui-compressed.jsm',
'type': 'application/javascript'
},
// Prototype
'prototypeJS': {
'path': 'resources/prototype/{version}/prototype.jsm',
'type': 'application/javascript'
},
// Scriptaculous
'scriptaculous': {
'path': 'resources/scriptaculous/{version}/scriptaculous.jsm',
'type': 'application/javascript'
},
// SWFObject
'swfobject': {
'path': 'resources/swfobject/{version}/swfobject.jsm',
'type': 'application/javascript'
},
// Underscore.js
'underscore': {
'path': 'resources/underscore.js/{version}/underscore-min.jsm',
'type': 'application/javascript'
},
// Web Font Loader
'webfont': {
'path': 'resources/webfont/{version}/webfont.jsm',
'type': 'application/javascript'
}
};
/**
* Exports
*/
export default sets;
/**
* 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;
/**
* Statistic 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.Statistic.AMOUNT_INJECTED]: {
'value': 0, 'createdAt': new Date().toISOString()
},
[Constants.Statistic.AMOUNT_SANITIZED]: {
'value': 0, 'createdAt': new Date().toISOString()
},
[Constants.Statistic.AMOUNT_BLOCKED]: {
'value': 0, 'createdAt': new Date().toISOString()
}
};
/**
* Exports
*/
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.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.