diff options
Diffstat (limited to 'data/extensions/jid1-KtlZuoiikVfFew@jetpack/common')
7 files changed, 1838 insertions, 32 deletions
diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/Storage.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/Storage.js index 6254d66..0d27c01 100644 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/Storage.js +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/Storage.js @@ -2,6 +2,7 @@ * GNU LibreJS - A browser add-on to block nonfree nontrivial JavaScript. * * Copyright (C) 2018 Giorgio Maone <giorgio@maone.net> +* Copyright (C) 2022 Yuchen Pei <id@ypei.org> * * This file is part of GNU LibreJS. * @@ -25,13 +26,13 @@ */ 'use strict'; -var Storage = { + +const Storage = { ARRAY: { async load(key, array = undefined) { - if (array === undefined) { - array = (await browser.storage.local.get(key))[key]; - } - return array ? new Set(array) : new Set(); + const result = array === undefined ? + (await browser.storage.local.get(key))[key] : array; + return result ? new Set(result) : new Set(); }, async save(key, list) { return await browser.storage.local.set({ [key]: [...list] }); @@ -40,7 +41,7 @@ var Storage = { CSV: { async load(key) { - let csv = (await browser.storage.local.get(key))[key]; + const csv = (await browser.storage.local.get(key))[key]; return csv ? new Set(csv.split(/\s*,\s*/)) : new Set(); }, @@ -77,7 +78,7 @@ class ListStore { return hash.startsWith('(') ? hash : `(${hash})`; } static urlItem(url) { - let queryPos = url.indexOf('?'); + const queryPos = url.indexOf('?'); return queryPos === -1 ? url : url.substring(0, queryPos); } static siteItem(url) { @@ -108,24 +109,14 @@ class ListStore { } async store(...items) { - let size = this.items.size; - let changed = false; - for (let item of items) { - if (size !== this.items.add(item).size) { - changed = true; - } - } - return changed && await this.save(); + const size = this.items.size; + const changed = items.reduce((current, item) => size !== this.items.add(item).size || current, false); + changed && await this.save(); } async remove(...items) { - let changed = false; - for (let item of items) { - if (this.items.delete(item)) { - changed = true; - } - } - return changed && await this.save(); + const changed = items.reduce((current, item) => this.items.delete(item) || current, false); + changed && await this.save(); } contains(item) { @@ -134,12 +125,13 @@ class ListStore { } function hash(source) { - var shaObj = new jssha('SHA-256', 'TEXT') + const shaObj = new jssha('SHA-256', 'TEXT') shaObj.update(source); return shaObj.getHash('HEX'); } if (typeof module === 'object') { module.exports = { ListStore, Storage, hash }; + // TODO: eliminate the var var jssha = require('jssha'); } diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/Test.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/Test.js index 88baff2..706107e 100644 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/Test.js +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/Test.js @@ -2,6 +2,7 @@ * GNU LibreJS - A browser add-on to block nonfree nontrivial JavaScript. * * Copyright (C) 2018 Giorgio Maone <giorgio@maone.net> +* Copyright (C) 2022 Yuchen Pei <id@ypei.org> * * This file is part of GNU LibreJS. * @@ -20,27 +21,25 @@ */ 'use strict'; -var Test = (() => { - const RUNNER_URL = browser.extension.getURL('/test/SpecRunner.html'); +const Test = (() => { + const RUNNER_URL = browser.runtime.getURL('/test/SpecRunner.html'); return { /* returns RUNNER_URL if it's a test-enabled build or an about:debugging temporary extension session, null otherwise */ async getURL() { - let url = RUNNER_URL; try { - await fetch(url); + await fetch(RUNNER_URL); + return RUNNER_URL; } catch (e) { - url = null; + return null; } - this.getURL = () => url; - return url; }, async getTab(activate = false) { - let url = await this.getURL(); - let tab = url ? (await browser.tabs.query({ url }))[0] || + const url = await this.getURL(); + const tab = url ? (await browser.tabs.query({ url }))[0] || (await browser.tabs.create({ url })) : null; if (tab && activate) { diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/checks.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/checks.js new file mode 100644 index 0000000..a9e3cc8 --- /dev/null +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/checks.js @@ -0,0 +1,448 @@ +/** +* GNU LibreJS - A browser add-on to block nonfree nontrivial JavaScript. +* * +* Copyright (C) 2018 Nathan Nichols +* Copyright (C) 2022 Yuchen Pei +* +* This file is part of GNU LibreJS. +* +* GNU LibreJS is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* GNU LibreJS is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with GNU LibreJS. If not, see <http://www.gnu.org/licenses/>. +*/ + +const acorn = require('acorn'); +const licenses = require('./license_definitions.json'); +const { patternUtils } = require('./pattern_utils.js'); +const { makeDebugLogger } = require('./debug.js'); +const fnameData = require('./fname_data.json').fname_data; + +const LIC_RE = /@licstartThefollowingistheentirelicensenoticefortheJavaScriptcodeinthis(?:page|file)(.*)?@licendTheaboveistheentirelicensenoticefortheJavaScriptcodeinthis(?:page|file)/mi; + +/* + NONTRIVIAL THINGS: + - Fetch + - XMLhttpRequest + - eval() + - ? + JAVASCRIPT CAN BE FOUND IN: + - Event handlers (onclick, onload, onsubmit, etc.) + - <script>JS</script> + - <script src="/JS.js"></script> + WAYS TO DETERMINE PASS/FAIL: + - "// @license [magnet link] [identifier]" then "// @license-end" (may also use /* comments) + - Automatic whitelist: (http://bzr.savannah.gnu.org/lh/librejs/dev/annotate/head:/data/script_libraries/script-libraries.json_ +*/ +// These are objects that it will search for in an initial regex pass over non-free scripts. +const RESERVED_OBJECTS = [ + //"document", + //"window", + 'fetch', + 'XMLHttpRequest', + 'chrome', // only on chrome + 'browser', // only on firefox + 'eval' +]; +const LOOPKEYS = new Set(['for', 'if', 'while', 'switch']); +const OPERATORS = new Set(['||', '&&', '=', '==', '++', '--', '+=', '-=', '*']); +// @license match, second and third capture groups are canonicalUrl +// and license name +// Caveat: will not work in a commented out star comments: +// '// /* @license */ ... /* @license-end */' will be checked, though +// the whole thing is a comment +const OPENING_LICENSE_RE1 = /^\s*\/\/\s*@license\s+(\S+)\s+(\S+).*$/mi; +const OPENING_LICENSE_RE2 = /\/\*\s*?@license\s+(\S+)\s+([^/*]+).*\*\//mi; +const CLOSING_LICENSE_RE1 = /^\s*\/\/\s*@license-end\s*/mi; +const CLOSING_LICENSE_RE2 = /\/\*\s*@license-end\s*\*\//mi; +/** +* If this is true, it evaluates entire scripts instead of returning as soon as it encounters a violation. +* +* Also, it controls whether or not this part of the code logs to the console. +* +*/ +const DEBUG = false; // debug the JS evaluation +const PRINT_DEBUG = false; +const dbg_print = makeDebugLogger('checks.js', PRINT_DEBUG, Date.now()); + +/** + * stripLicenseToRegexp + * + * Removes all non-alphanumeric characters except for the + * special tokens, and replace the text values that are + * hardcoded in license_definitions.js. Puts the result in + * the regex field of the fragments. + * + */ +const stripLicenseToRegexp = function(license) { + for (const frag of license.licenseFragments) { + frag.regex = patternUtils.removeNonalpha(frag.text); + frag.regex = new RegExp( + patternUtils.replaceTokens(frag.regex), ''); + } +}; + +const init = function() { + console.log('initializing regexes'); + for (const key in licenses) { + stripLicenseToRegexp(licenses[key]); + } +} + +/** +* +* Takes in the declaration that has been preprocessed and +* tests it against regexes in licenses. +*/ +const searchTable = function(strippedComment) { + const stripped = patternUtils.removeNonalpha(strippedComment); + // looking up license + for (const key in licenses) { + const license = licenses[key]; + for (const frag of license.licenseFragments) { + if (frag.regex.test(stripped)) { + return license.licenseName; + } + } + } + console.log('No global license found.'); + return null; +} + +/** + * Checks whether licenseText, modulo whitespace, starts with + * a @licstart .. @licend with a free license, returns the license name + * if so, and null otherwise. + */ +const checkLicenseText = function(licenseText) { + if (licenseText === undefined || licenseText === null) { + return null; + } + // remove whitespace + const stripped = patternUtils.removeWhitespace(licenseText); + // Search for @licstart/@licend + const matches = stripped.match(LIC_RE); + return matches && searchTable(matches[0]); +}; + +//************************this part can be tested in the HTML file index.html's script test.js**************************** + +/** + * Checks whether script is trivial by analysing its tokens. + * + * Returns an array of + * [flag (boolean, true if trivial), reason (string, human readable report)]. + */ +function fullEvaluate(script) { + if (script === undefined || script == '') { + return [true, 'Harmless null script']; + } + + let tokens; + + try { + tokens = acorn.tokenizer(script); + } catch (e) { + console.warn('Tokenizer could not be initiated (probably invalid code)'); + return [false, 'Tokenizer could not be initiated (probably invalid code)']; + } + try { + var toke = tokens.getToken(); + } catch (e) { + console.log(script); + console.log(e); + console.warn('couldn\'t get first token (probably invalid code)'); + console.warn('Continuing evaluation'); + } + + let amtloops = 0; + let definesFunctions = false; + + /** + * Given the end of an identifer token, it tests for parentheses + */ + function is_bsn(end) { + let i = 0; + while (script.charAt(end + i).match(/\s/g) !== null) { + i++; + if (i >= script.length - 1) { + return false; + } + } + return script.charAt(end + i) == '['; + } + + function evaluateByTokenValue(toke) { + const value = toke.value; + if (OPERATORS.has(value)) { + // It's just an operator. Javascript doesn't have operator overloading so it must be some + // kind of primitive (I.e. a number) + } else { + const status = fnameData[value]; + if (status === true) { // is the identifier banned? + dbg_print('%c NONTRIVIAL: nontrivial token: \'' + value + '\'', 'color:red'); + if (DEBUG == false) { + return [false, 'NONTRIVIAL: nontrivial token: \'' + value + '\'']; + } + } else if (status === false || status === undefined) {// is the identifier not banned or user defined? + // Is there bracket suffix notation? + if (is_bsn(toke.end)) { + dbg_print('%c NONTRIVIAL: Bracket suffix notation on variable \'' + value + '\'', 'color:red'); + if (DEBUG == false) { + return [false, '%c NONTRIVIAL: Bracket suffix notation on variable \'' + value + '\'']; + } + } + } else { + dbg_print('trivial token:' + value); + } + } + return [true, '']; + } + + function evaluateByTokenTypeKeyword(keyword) { + if (toke.type.keyword == 'function') { + dbg_print('%c NOTICE: Function declaration.', 'color:green'); + definesFunctions = true; + } + + if (LOOPKEYS.has(keyword)) { + amtloops++; + if (amtloops > 3) { + dbg_print('%c NONTRIVIAL: Too many loops/conditionals.', 'color:red'); + if (DEBUG == false) { + return [false, 'NONTRIVIAL: Too many loops/conditionals.']; + } + } + } + return [true, '']; + } + + while (toke !== undefined && toke.type != acorn.tokTypes.eof) { + if (toke.type.keyword !== undefined) { + //dbg_print("Keyword:"); + //dbg_print(toke); + + // This type of loop detection ignores functional loop alternatives and ternary operators + const tokeTypeRes = evaluateByTokenTypeKeyword(toke.type.keyword); + if (tokeTypeRes[0] === false) { + return tokeTypeRes; + } + } else if (toke.value !== undefined) { + const tokeValRes = evaluateByTokenValue(toke); + if (tokeValRes[0] === false) { + return tokeValRes; + } + } + // If not a keyword or an identifier it's some kind of operator, field parenthesis, brackets + try { + toke = tokens.getToken(); + } catch (e) { + dbg_print('Denied script because it cannot be parsed.'); + return [false, 'NONTRIVIAL: Cannot be parsed. This could mean it is a 404 error.']; + } + } + + dbg_print('%cAppears to be trivial.', 'color:green;'); + if (definesFunctions === true) + return [true, 'Script appears to be trivial but defines functions.']; + else + return [true, 'Script appears to be trivial.']; +} + + +//**************************************************************************************************** +/** +* This is the entry point for full code evaluation for triviality. +* +* Performs the initial pass on code to see if it needs to be completely parsed +* +* This can only determine if a script is bad, not if it's good +* +* If it passes the intitial pass, it runs the full pass and returns the result + +* It returns an array of [flag (boolean, false if "bad"), reason (string, human readable report)] +* +*/ +function evaluate(script, name) { + const reservedResult = evaluateForReservedObj(script, name); + if (reservedResult[0] === true) { + dbg_print('%c pass', 'color:green;'); + } else { + return reservedResult; + } + + return fullEvaluate(script); +} + +function evaluateForReservedObj(script, name) { + function reservedObjectRegex(object) { + const arithOperators = '\\+\\-\\*\\/\\%\\='; + return new RegExp('(?:[^\\w\\d]|^|(?:' + arithOperators + '))' + object + '(?:\\s*?(?:[\\;\\,\\.\\(\\[])\\s*?)', 'g'); + } + const mlComment = /\/\*([\s\S]+?)\*\//g; + const ilComment = /\/\/.+/gm; + const temp = script.replace(/'.+?'+/gm, '\'string\'').replace(/".+?"+/gm, '"string"').replace(mlComment, '').replace(ilComment, ''); + dbg_print('%c ------evaluation results for ' + name + '------', 'color:white'); + dbg_print('Script accesses reserved objects?'); + + // This is where individual "passes" are made over the code + for (const reserved of RESERVED_OBJECTS) { + if (reservedObjectRegex(reserved).exec(temp) != null) { + dbg_print('%c fail', 'color:red;'); + return [false, 'Script uses a reserved object (' + reserved + ')']; + } + } + return [true, 'Reserved object not found.']; +} + +/** + * Checks whether url is the magnet link of a license. + * + * Returns the licenseName if so, otherwise returns null. If a key is + * supplied, checks for the license with the key only. + */ +function checkMagnet(url, key = null) { + const fixedUrl = url.replace(/&/g, '&'); + // Match by magnet link + const checkLicenseMagnet = license => { + for (const cUrl of license.canonicalUrl) { + if (cUrl.startsWith('magnet:') && fixedUrl === cUrl) { + return license.licenseName; + } + } + return null; + } + + if (key) { + try { + return checkLicenseMagnet(licenses[key]); + } catch (error) { + return null; + } + } else { + for (const key in licenses) { + const result = checkLicenseMagnet(licenses[key]); + if (result) return result; + } + return null; + } +} + + +/** + * + * Evaluates the content of a script for licenses and triviality + * scriptSrc: content of the script; name: script name; external: + * whether the script is external + * + * Returns + * [ + * true (accepted) or false (denied), + * edited content, + * reason text + * ] + */ +function checkScriptSource(scriptSrc, name, external = false) { + let inSrc = scriptSrc.trim(); + if (!inSrc) return [true, scriptSrc, 'Empty source.']; + + // Check for @licstart .. @licend method + const license = checkLicenseText(scriptSrc); + if (license) { + return [true, scriptSrc, `Licensed under: ${license}`]; + } + + let outSrc = ''; + let reason = ''; + let partsDenied = false; + let partsAccepted = false; + + function checkTriviality(s) { + if (!patternUtils.removeJsComments(s).trim()) { + return true; // empty, ignore it + } + const [trivial, message] = external ? + [false, 'External script with no known license'] + : evaluate(s, name); + if (trivial) { + partsAccepted = true; + outSrc += s; + } else { + partsDenied = true; + if (s.startsWith('javascript:')) + outSrc += `# LIBREJS BLOCKED: ${message}`; + else + outSrc += `/*\nLIBREJS BLOCKED: ${message}\n*/`; + } + reason += `\n${message}`; + } + + // Consume inSrc by checking licenses in all @license / @license-end + // blocks and triviality outside these blocks + while (inSrc) { + const openingMatch1 = OPENING_LICENSE_RE1.exec(inSrc); + const openingMatch2 = OPENING_LICENSE_RE2.exec(inSrc); + const openingMatch = + (openingMatch1 && openingMatch2) ? + (openingMatch1.index < openingMatch2.index ? openingMatch1 + : openingMatch2) + : (openingMatch1 || openingMatch2); + const openingIndex = openingMatch ? openingMatch.index : inSrc.length; + // checks the triviality of the code before the license tag, if any + checkTriviality(inSrc.substring(0, openingIndex)); + inSrc = inSrc.substring(openingIndex); + if (!inSrc) break; + + // checks the remaining part, that starts with an @license + const closureMatch1 = CLOSING_LICENSE_RE1.exec(inSrc); + const closureMatch2 = CLOSING_LICENSE_RE2.exec(inSrc); + const closureMatch = + (closureMatch1 && closureMatch2) ? + (closureMatch1.index < closureMatch2.index ? closureMatch1 + : closureMatch2) + : (closureMatch1 || closureMatch2); + if (!closureMatch) { + const msg = 'ERROR: @license with no @license-end'; + return [false, `\n/*\n ${msg} \n*/\n`, msg]; + } + const closureEndIndex = closureMatch.index + closureMatch[0].length; + + if (!(Array.isArray(openingMatch) && openingMatch.length >= 3)) { + return [false, 'Malformed or unrecognized license tag.']; + } + const licenseName = checkMagnet(openingMatch[1]); + let message; + if (licenseName) { + outSrc += inSrc.substr(0, closureEndIndex); + partsAccepted = true; + message = `Recognized license: "${licenseName}".` + } else { + outSrc += `\n/*\n${message}\n*/\n`; + partsDenied = true; + message = `Unrecognized license tag: "${openingMatch[0]}"`; + } + reason += `\n${message}`; + + // trim off everything we just evaluated + inSrc = inSrc.substring(closureEndIndex).trim(); + } + + if (partsDenied) { + if (partsAccepted) { + reason = `Some parts of the script have been disabled (check the source for details).\n^--- ${reason}`; + } + return [false, outSrc, reason]; + } + + return [true, scriptSrc, reason]; +} + +module.exports = { init, checkLicenseText, checkMagnet, checkScriptSource }; diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/debug.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/debug.js new file mode 100644 index 0000000..b192862 --- /dev/null +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/debug.js @@ -0,0 +1,37 @@ +/** +* GNU LibreJS - A browser add-on to block nonfree nontrivial JavaScript. +* * +* Copyright (C) 2017, 2018 Nathan Nichols +* Copyright (C) 2018 Ruben Rodriguez <ruben@gnu.org> +* Copyright (C) 2022 Yuchen Pei <id@ypei.org> +* +* This file is part of GNU LibreJS. +* +* GNU LibreJS is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* GNU LibreJS is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with GNU LibreJS. If not, see <http://www.gnu.org/licenses/>. +*/ + +const makeDebugLogger = (origin, enabled, time) => { + return (a, b) => { + if (enabled) { + console.log('[' + origin + '] Time spent so far: ' + (Date.now() - time) / 1000 + ' seconds'); + if (b === undefined) { + console.log(a); + } else { + console.log(a, b); + } + } + } +} + +module.exports = { makeDebugLogger }; diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/fname_data.json b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/fname_data.json new file mode 100644 index 0000000..38652d6 --- /dev/null +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/fname_data.json @@ -0,0 +1,832 @@ +{ + "fname_data": { + "WebGLShader": true, + "WebGLShaderPrecisionFormat": true, + "WebGLQuery": true, + "WebGLRenderbuffer": true, + "WebGLSampler": true, + "WebGLUniformLocation": true, + "WebGLFramebuffer": true, + "WebGLProgram": true, + "WebGLContextEvent": true, + "WebGL2RenderingContext": true, + "WebGLTexture": true, + "WebGLRenderingContext": true, + "WebGLVertexArrayObject": true, + "WebGLActiveInfo": true, + "WebGLTransformFeedback": true, + "WebGLSync": true, + "WebGLBuffer": true, + "cat_svg": true, + "SVGPoint": true, + "SVGEllipseElement": true, + "SVGRadialGradientElement": true, + "SVGComponentTransferFunctionElement": true, + "SVGPathSegCurvetoQuadraticAbs": true, + "SVGAnimatedNumberList": true, + "SVGPathSegCurvetoQuadraticSmoothRel": true, + "SVGFEColorMatrixElement": true, + "SVGPathSegLinetoHorizontalAbs": true, + "SVGLinearGradientElement": true, + "SVGStyleElement": true, + "SVGPathSegMovetoRel": true, + "SVGStopElement": true, + "SVGPathSegLinetoRel": true, + "SVGFEConvolveMatrixElement": true, + "SVGAnimatedAngle": true, + "SVGPathSegLinetoAbs": true, + "SVGPreserveAspectRatio": true, + "SVGFEOffsetElement": true, + "SVGFEImageElement": true, + "SVGFEDiffuseLightingElement": true, + "SVGAnimatedNumber": true, + "SVGTextElement": true, + "SVGFESpotLightElement": true, + "SVGFEMorphologyElement": true, + "SVGAngle": true, + "SVGScriptElement": true, + "SVGFEDropShadowElement": true, + "SVGPathSegArcRel": true, + "SVGNumber": true, + "SVGPathSegLinetoHorizontalRel": true, + "SVGFEFuncBElement": true, + "SVGClipPathElement": true, + "SVGPathSeg": true, + "SVGUseElement": true, + "SVGPathSegArcAbs": true, + "SVGPathSegCurvetoQuadraticSmoothAbs": true, + "SVGRect": true, + "SVGAnimatedPreserveAspectRatio": true, + "SVGImageElement": true, + "SVGAnimatedEnumeration": true, + "SVGAnimatedLengthList": true, + "SVGFEFloodElement": true, + "SVGFECompositeElement": true, + "SVGAElement": true, + "SVGAnimatedBoolean": true, + "SVGMaskElement": true, + "SVGFilterElement": true, + "SVGPathSegLinetoVerticalRel": true, + "SVGAnimatedInteger": true, + "SVGTSpanElement": true, + "SVGMarkerElement": true, + "SVGStringList": true, + "SVGTransform": true, + "SVGTitleElement": true, + "SVGFEBlendElement": true, + "SVGTextPositioningElement": true, + "SVGFEFuncGElement": true, + "SVGFEPointLightElement": true, + "SVGAnimateElement": true, + "SVGPolylineElement": true, + "SVGDefsElement": true, + "SVGPathSegList": true, + "SVGAnimatedTransformList": true, + "SVGPathSegClosePath": true, + "SVGGradientElement": true, + "SVGSwitchElement": true, + "SVGViewElement": true, + "SVGUnitTypes": true, + "SVGPathSegMovetoAbs": true, + "SVGSymbolElement": true, + "SVGFEFuncAElement": true, + "SVGAnimatedString": true, + "SVGFEMergeElement": true, + "SVGPathSegLinetoVerticalAbs": true, + "SVGAnimationElement": true, + "SVGPathSegCurvetoCubicAbs": true, + "SVGLength": true, + "SVGTextPathElement": true, + "SVGPolygonElement": true, + "SVGAnimatedRect": true, + "SVGPathSegCurvetoCubicRel": true, + "SVGFEFuncRElement": true, + "SVGLengthList": true, + "SVGTextContentElement": true, + "SVGFETurbulenceElement": true, + "SVGMatrix": true, + "SVGZoomAndPan": true, + "SVGMetadataElement": true, + "SVGFEDistantLightElement": true, + "SVGAnimateMotionElement": true, + "SVGDescElement": true, + "SVGPathSegCurvetoCubicSmoothRel": true, + "SVGFESpecularLightingElement": true, + "SVGFEGaussianBlurElement": true, + "SVGFEComponentTransferElement": true, + "SVGNumberList": true, + "SVGTransformList": true, + "SVGForeignObjectElement": true, + "SVGRectElement": true, + "SVGFEDisplacementMapElement": true, + "SVGAnimateTransformElement": true, + "SVGAnimatedLength": true, + "SVGPointList": true, + "SVGPatternElement": true, + "SVGPathSegCurvetoCubicSmoothAbs": true, + "SVGCircleElement": true, + "SVGSetElement": true, + "SVGFETileElement": true, + "SVGMPathElement": true, + "SVGFEMergeNodeElement": true, + "SVGPathSegCurvetoQuadraticRel": true, + "SVGElement": true, + "SVGGraphicsElement": true, + "SVGSVGElement": true, + "SVGGElement": true, + "SVGGeometryElement": true, + "SVGPathElement": true, + "SVGLineElement": true, + "cat_html": true, + "HTMLTimeElement": true, + "HTMLPictureElement": true, + "HTMLMenuItemElement": true, + "HTMLFormElement": true, + "HTMLOptionElement": true, + "HTMLCanvasElement": true, + "HTMLTableSectionElement": true, + "HTMLSelectElement": true, + "HTMLUListElement": true, + "HTMLMetaElement": true, + "HTMLLinkElement": true, + "HTMLBaseElement": true, + "HTMLDataListElement": true, + "HTMLInputElement": true, + "HTMLMeterElement": true, + "HTMLSourceElement": true, + "HTMLTrackElement": true, + "HTMLTableColElement": true, + "HTMLFieldSetElement": true, + "HTMLDirectoryElement": true, + "HTMLTableCellElement": true, + "HTMLStyleElement": true, + "HTMLAudioElement": true, + "HTMLLegendElement": true, + "HTMLOListElement": true, + "HTMLEmbedElement": true, + "HTMLQuoteElement": true, + "HTMLMenuElement": true, + "HTMLHeadElement": true, + "HTMLUnknownElement": true, + "HTMLBRElement": true, + "HTMLProgressElement": true, + "HTMLMediaElement": true, + "HTMLFormControlsCollection": true, + "HTMLCollection": true, + "HTMLLIElement": true, + "HTMLDetailsElement": true, + "HTMLObjectElement": true, + "HTMLHeadingElement": true, + "HTMLTableCaptionElement": true, + "HTMLPreElement": true, + "HTMLAllCollection": true, + "HTMLFrameSetElement": true, + "HTMLFontElement": true, + "HTMLFrameElement": true, + "HTMLAnchorElement": true, + "HTMLOptGroupElement": true, + "HTMLVideoElement": true, + "HTMLModElement": true, + "HTMLBodyElement": true, + "HTMLTableElement": true, + "HTMLButtonElement": true, + "HTMLTableRowElement": true, + "HTMLAreaElement": true, + "HTMLDataElement": true, + "HTMLParamElement": true, + "HTMLLabelElement": true, + "HTMLTemplateElement": true, + "HTMLOptionsCollection": true, + "HTMLIFrameElement": true, + "HTMLTitleElement": true, + "HTMLMapElement": true, + "HTMLOutputElement": true, + "HTMLDListElement": true, + "HTMLParagraphElement": true, + "HTMLHRElement": true, + "HTMLImageElement": true, + "HTMLDocument": true, + "HTMLElement": true, + "HTMLScriptElement": true, + "HTMLHtmlElement": true, + "HTMLTextAreaElement": true, + "HTMLDivElement": true, + "HTMLSpanElement": true, + "cat_css": true, + "CSSStyleRule": true, + "CSSFontFaceRule": true, + "CSSPrimitiveValue": true, + "CSSStyleDeclaration": true, + "CSSStyleSheet": true, + "CSSPageRule": true, + "CSSSupportsRule": true, + "CSSMozDocumentRule": true, + "CSSKeyframeRule": true, + "CSSGroupingRule": true, + "CSS2Properties": true, + "CSSFontFeatureValuesRule": true, + "CSSRuleList": true, + "CSSPseudoElement": true, + "CSSMediaRule": true, + "CSSCounterStyleRule": true, + "CSSImportRule": true, + "CSSTransition": true, + "CSSAnimation": true, + "CSSValue": true, + "CSSNamespaceRule": true, + "CSSRule": true, + "CSS": true, + "CSSKeyframesRule": true, + "CSSConditionRule": true, + "CSSValueList": true, + "cat_event": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "onabsolutedeviceorientation": true, + "ondeviceproximity": true, + "onuserproximity": true, + "ondevicelight": true, + "onvrdisplayconnect": true, + "onvrdisplaydisconnect": true, + "onvrdisplayactivate": true, + "onvrdisplaydeactivate": true, + "onvrdisplaypresentchange": true, + "onabort": true, + "onblur": true, + "onfocus": true, + "onauxclick": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncontextmenu": true, + "ondblclick": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragexit": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadend": true, + "onloadstart": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onwheel": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onprogress": true, + "onratechange": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onshow": true, + "onstalled": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "onvolumechange": true, + "onwaiting": true, + "onselectstart": true, + "ontoggle": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerup": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerenter": true, + "onpointerleave": true, + "ongotpointercapture": true, + "onlostpointercapture": true, + "onmozfullscreenchange": true, + "onmozfullscreenerror": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onwebkitanimationend": true, + "onwebkitanimationiteration": true, + "onwebkitanimationstart": true, + "onwebkittransitionend": true, + "onerror": false, + "onafterprint": true, + "onbeforeprint": true, + "onbeforeunload": true, + "onhashchange": true, + "onlanguagechange": true, + "onmessage": true, + "onmessageerror": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpageshow": true, + "onpopstate": true, + "onstorage": true, + "onunload": true, + "cat_rtc": true, + "RTCDTMFSender": true, + "RTCStatsReport": true, + "RTCTrackEvent": true, + "RTCDataChannelEvent": true, + "RTCPeerConnectionIceEvent": true, + "RTCCertificate": true, + "RTCDTMFToneChangeEvent": true, + "RTCPeerConnection": true, + "RTCIceCandidate": true, + "RTCRtpReceiver": true, + "RTCRtpSender": true, + "RTCSessionDescription": true, + "cat_vr": true, + "VRStageParameters": true, + "VRFrameData": true, + "VRDisplay": true, + "VRDisplayEvent": true, + "VRFieldOfView": true, + "VRDisplayCapabilities": true, + "VREyeParameters": true, + "VRPose": true, + "cat_dom": true, + "DOMStringMap": true, + "DOMRectReadOnly": true, + "DOMException": true, + "DOMRect": true, + "DOMMatrix": true, + "DOMMatrixReadOnly": true, + "DOMPointReadOnly": true, + "DOMPoint": true, + "DOMQuad": true, + "DOMRequest": true, + "DOMParser": true, + "DOMTokenList": true, + "DOMStringList": true, + "DOMImplementation": true, + "DOMError": true, + "DOMRectList": true, + "DOMCursor": true, + "cat_idb": true, + "IDBFileRequest": true, + "IDBTransaction": true, + "IDBCursor": true, + "IDBFileHandle": true, + "IDBMutableFile": true, + "IDBKeyRange": true, + "IDBVersionChangeEvent": true, + "IDBObjectStore": true, + "IDBFactory": true, + "IDBCursorWithValue": true, + "IDBOpenDBRequest": true, + "IDBRequest": true, + "IDBIndex": true, + "IDBDatabase": true, + "cat_audio": true, + "AudioContext": true, + "AudioBuffer": true, + "AudioBufferSourceNode": true, + "Audio": true, + "MediaElementAudioSourceNode": true, + "AudioNode": true, + "BaseAudioContext": true, + "AudioListener": true, + "MediaStreamAudioSourceNode": true, + "OfflineAudioContext": true, + "AudioDestinationNode": true, + "AudioParam": true, + "MediaStreamAudioDestinationNode": true, + "OfflineAudioCompletionEvent": true, + "AudioStreamTrack": true, + "AudioScheduledSourceNode": true, + "AudioProcessingEvent": true, + "cat_gamepad": true, + "GamepadButton": true, + "GamepadHapticActuator": true, + "GamepadAxisMoveEvent": true, + "GamepadPose": true, + "GamepadEvent": true, + "Gamepad": true, + "GamepadButtonEvent": true, + "cat_media": true, + "MediaKeys": true, + "MediaKeyError": true, + "MediaSource": true, + "MediaDevices": true, + "MediaKeyStatusMap": true, + "MediaStreamTrackEvent": true, + "MediaRecorder": true, + "MediaQueryListEvent": true, + "MediaStream": true, + "MediaEncryptedEvent": true, + "MediaStreamTrack": true, + "MediaError": true, + "MediaStreamEvent": true, + "MediaQueryList": true, + "MediaKeySystemAccess": true, + "MediaDeviceInfo": true, + "MediaKeySession": true, + "MediaList": true, + "MediaRecorderErrorEvent": true, + "MediaKeyMessageEvent": true, + "cat_event2": true, + "SpeechSynthesisErrorEvent": true, + "BeforeUnloadEvent": true, + "CustomEvent": true, + "PageTransitionEvent": true, + "PopupBlockedEvent": true, + "CloseEvent": true, + "ProgressEvent": true, + "MutationEvent": true, + "MessageEvent": true, + "FocusEvent": true, + "TrackEvent": true, + "DeviceMotionEvent": true, + "TimeEvent": true, + "PointerEvent": true, + "UserProximityEvent": true, + "StorageEvent": true, + "DragEvent": true, + "MouseScrollEvent": true, + "EventSource": true, + "PopStateEvent": true, + "DeviceProximityEvent": true, + "SpeechSynthesisEvent": true, + "XMLHttpRequestEventTarget": true, + "ClipboardEvent": true, + "AnimationPlaybackEvent": true, + "DeviceLightEvent": true, + "BlobEvent": true, + "MouseEvent": true, + "WheelEvent": true, + "InputEvent": true, + "HashChangeEvent": true, + "DeviceOrientationEvent": true, + "CompositionEvent": true, + "KeyEvent": true, + "ScrollAreaEvent": true, + "KeyboardEvent": true, + "TransitionEvent": true, + "ErrorEvent": true, + "AnimationEvent": true, + "FontFaceSetLoadEvent": true, + "EventTarget": true, + "captureEvents": true, + "releaseEvents": true, + "Event": true, + "UIEvent": true, + "cat_other": false, + "undefined": false, + "Array": false, + "Boolean": false, + "JSON": false, + "Date": false, + "Math": false, + "Number": false, + "String": false, + "RegExp": false, + "Error": false, + "InternalError": false, + "EvalError": false, + "RangeError": false, + "ReferenceError": false, + "SyntaxError": false, + "TypeError": false, + "URIError": false, + "ArrayBuffer": true, + "Int8Array": true, + "Uint8Array": true, + "Int16Array": true, + "Uint16Array": true, + "Int32Array": true, + "Uint32Array": true, + "Float32Array": true, + "Float64Array": true, + "Uint8ClampedArray": true, + "Proxy": true, + "WeakMap": true, + "Map": true, + "Set": true, + "DataView": false, + "Symbol": false, + "SharedArrayBuffer": true, + "Intl": false, + "TypedObject": true, + "Reflect": true, + "SIMD": true, + "WeakSet": true, + "Atomics": true, + "Promise": true, + "WebAssembly": true, + "NaN": false, + "Infinity": false, + "isNaN": false, + "isFinite": false, + "parseFloat": false, + "parseInt": false, + "escape": false, + "unescape": false, + "decodeURI": false, + "encodeURI": false, + "decodeURIComponent": false, + "encodeURIComponent": false, + "uneval": false, + "BatteryManager": true, + "CanvasGradient": true, + "TextDecoder": true, + "Plugin": true, + "PushManager": true, + "ChannelMergerNode": true, + "PerformanceResourceTiming": true, + "ServiceWorker": true, + "TextTrackCueList": true, + "PerformanceEntry": true, + "TextTrackList": true, + "StyleSheet": true, + "PerformanceMeasure": true, + "DesktopNotificationCenter": true, + "Comment": true, + "DelayNode": true, + "XPathResult": true, + "CDATASection": true, + "MessageChannel": true, + "BiquadFilterNode": true, + "SpeechSynthesisUtterance": true, + "Crypto": true, + "Navigator": true, + "FileList": true, + "URLSearchParams": false, + "ServiceWorkerContainer": true, + "ValidityState": true, + "ProcessingInstruction": true, + "AbortSignal": true, + "FontFace": true, + "FileReader": true, + "Worker": true, + "External": true, + "ImageBitmap": true, + "TimeRanges": true, + "Option": true, + "TextTrack": true, + "Image": true, + "AnimationTimeline": true, + "VideoPlaybackQuality": true, + "VTTCue": true, + "Storage": true, + "XPathExpression": true, + "CharacterData": false, + "TextMetrics": true, + "AnimationEffectReadOnly": true, + "PerformanceTiming": false, + "PerformanceMark": true, + "ImageBitmapRenderingContext": true, + "Headers": true, + "Range": false, + "Rect": true, + "AnimationEffectTimingReadOnly": true, + "KeyframeEffect": true, + "Permissions": true, + "TextEncoder": true, + "ImageData": true, + "SpeechSynthesisVoice": true, + "StorageManager": true, + "TextTrackCue": true, + "WebSocket": true, + "DocumentType": true, + "XPathEvaluator": true, + "PerformanceNavigationTiming": true, + "IdleDeadline": true, + "FileSystem": true, + "FileSystemFileEntry": true, + "CacheStorage": true, + "MimeType": true, + "PannerNode": true, + "NodeFilter": true, + "StereoPannerNode": true, + "console": false, + "DynamicsCompressorNode": true, + "PaintRequest": true, + "RGBColor": true, + "FontFaceSet": false, + "PaintRequestList": true, + "FileSystemEntry": true, + "XMLDocument": false, + "SourceBuffer": false, + "Screen": true, + "NamedNodeMap": false, + "History": true, + "Response": true, + "AnimationEffectTiming": true, + "ServiceWorkerRegistration": true, + "CanvasRenderingContext2D": true, + "ScriptProcessorNode": true, + "FileSystemDirectoryReader": true, + "MimeTypeArray": true, + "CanvasCaptureMediaStream": true, + "Directory": true, + "mozRTCPeerConnection": true, + "PerformanceObserverEntryList": true, + "PushSubscriptionOptions": true, + "Text": false, + "IntersectionObserverEntry": true, + "SubtleCrypto": true, + "Animation": true, + "DataTransfer": true, + "TreeWalker": true, + "XMLHttpRequest": true, + "LocalMediaStream": true, + "ConvolverNode": true, + "WaveShaperNode": true, + "DataTransferItemList": false, + "Request": true, + "SourceBufferList": false, + "XSLTProcessor": true, + "XMLHttpRequestUpload": true, + "SharedWorker": true, + "Notification": false, + "DataTransferItem": true, + "AnalyserNode": true, + "mozRTCIceCandidate": true, + "PerformanceObserver": true, + "OfflineResourceList": true, + "FileSystemDirectoryEntry": true, + "DesktopNotification": false, + "DataChannel": true, + "IIRFilterNode": true, + "ChannelSplitterNode": true, + "File": true, + "ConstantSourceNode": true, + "CryptoKey": true, + "GainNode": true, + "AbortController": true, + "Attr": true, + "SpeechSynthesis": true, + "PushSubscription": false, + "XMLStylesheetProcessingInstruction": false, + "NodeIterator": true, + "VideoStreamTrack": true, + "XMLSerializer": true, + "CaretPosition": true, + "FormData": true, + "CanvasPattern": true, + "mozRTCSessionDescription": true, + "Path2D": true, + "PerformanceNavigation": true, + "URL": false, + "PluginArray": true, + "MutationRecord": true, + "WebKitCSSMatrix": true, + "PeriodicWave": true, + "DocumentFragment": true, + "DocumentTimeline": false, + "ScreenOrientation": true, + "BroadcastChannel": true, + "PermissionStatus": true, + "IntersectionObserver": true, + "Blob": true, + "MessagePort": true, + "BarProp": true, + "OscillatorNode": true, + "Cache": true, + "RadioNodeList": true, + "KeyframeEffectReadOnly": true, + "InstallTrigger": true, + "Function": true, + "Object": false, + "eval": true, + "Window": false, + "close": false, + "stop": false, + "focus": false, + "blur": false, + "open": true, + "alert": false, + "confirm": false, + "prompt": false, + "print": false, + "postMessage": true, + "getSelection": true, + "getComputedStyle": true, + "matchMedia": true, + "moveTo": false, + "moveBy": false, + "resizeTo": false, + "resizeBy": false, + "scroll": false, + "scrollTo": false, + "scrollBy": false, + "requestAnimationFrame": true, + "cancelAnimationFrame": true, + "getDefaultComputedStyle": false, + "scrollByLines": false, + "scrollByPages": false, + "sizeToContent": false, + "updateCommands": true, + "find": false, + "dump": true, + "setResizable": false, + "requestIdleCallback": false, + "cancelIdleCallback": false, + "btoa": true, + "atob": true, + "setTimeout": true, + "clearTimeout": true, + "setInterval": true, + "clearInterval": true, + "createImageBitmap": true, + "fetch": true, + "self": true, + "name": false, + "history": true, + "locationbar": true, + "menubar": true, + "personalbar": true, + "scrollbars": true, + "statusbar": true, + "toolbar": true, + "status": true, + "closed": true, + "frames": true, + "length": false, + "opener": true, + "parent": true, + "frameElement": true, + "navigator": true, + "external": true, + "applicationCache": true, + "screen": true, + "innerWidth": true, + "innerHeight": true, + "scrollX": true, + "pageXOffset": true, + "scrollY": true, + "pageYOffset": true, + "screenX": true, + "screenY": true, + "outerWidth": true, + "outerHeight": true, + "performance": true, + "mozInnerScreenX": true, + "mozInnerScreenY": true, + "devicePixelRatio": true, + "scrollMaxX": true, + "scrollMaxY": true, + "fullScreen": false, + "mozPaintCount": true, + "sidebar": false, + "crypto": true, + "speechSynthesis": true, + "localStorage": true, + "origin": true, + "isSecureContext": false, + "indexedDB": true, + "caches": true, + "sessionStorage": true, + "window": false, + "document": true, + "location": false, + "top": false, + "netscape": true, + "Node": true, + "Document": true, + "Performance": false, + "startProfiling": true, + "stopProfiling": true, + "pauseProfilers": true, + "resumeProfilers": true, + "dumpProfile": true, + "getMaxGCPauseSinceClear": true, + "clearMaxGCPauseAccumulator": true, + "Location": true, + "StyleSheetList": false, + "Selection": false, + "Element": true, + "AnonymousContent": false, + "MutationObserver": true, + "NodeList": true, + "StopIteration": true + } +} diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/license_definitions.json b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/license_definitions.json new file mode 100644 index 0000000..1148e19 --- /dev/null +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/license_definitions.json @@ -0,0 +1,449 @@ +{ + "AGPL-3.0": { + "licenseName": "GNU AFFERO GENERAL PUBLIC LICENSE version 3", + "identifier": "AGPL-3.0", + "canonicalUrl": [ + "http://www.gnu.org/licenses/agpl-3.0.html", + "magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt" + ], + "licenseFragments": [ + { + "text": "<THISPROGRAM> is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.", + "type": "short" + } + ] + }, + "Apache-2.0": { + "licenseName": "Apache License, Version 2.0", + "identifier": "Apache-2.0", + "canonicalUrl": [ + "http://www.apache.org/licenses/LICENSE-2.0", + "magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt" + ], + "licenseFragments": [ + { + "text": "Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0", + "type": "short" + } + ] + }, + "Artistic-2.0": { + "licenseName": "Artistic License 2.0", + "identifier": "Artistic-2.0", + "canonicalUrl": [ + "http://www.perlfoundation.org/artistic_license_2_0", + "magnet:?xt=urn:btih:54fd2283f9dbdf29466d2df1a98bf8f65cafe314&dn=artistic-2.0.txt" + ], + "licenseFragments": [] + }, + "BSD-2-Clause": { + "licenseName": "BSD 2-Clause License", + "identifier": "BSD-2-Clause", + "canonicalUrl": [ + "http://www.freebsd.org/copyright/freebsd-license.html", + "magnet:?xt=urn:btih:87f119ba0b429ba17a44b4bffcab33165ebdacc0&dn=freebsd.txt" + ], + "licenseFragments": [ + { + "text": "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.", + "type": "short" + } + ] + }, + "BSD-3-Clause": { + "licenseName": "BSD 3-Clause License", + "identifier": "BSD-3-Clause", + "canonicalUrl": [ + "http://opensource.org/licenses/BSD-3-Clause", + "magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt" + ], + "licenseFragments": [ + { + "text": "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.", + "type": "short" + } + ] + }, + "BSL-1.0": { + "licenseName": "Boost Software License 1.0", + "identifier": "BSL-1.0", + "canonicalUrl": [ + "http://www.boost.org/LICENSE_1_0.txt", + "magnet:?xt=urn:btih:89a97c535628232f2f3888c2b7b8ffd4c078cec0&dn=Boost-1.0.txt" + ], + "licenseFragments": [ + { + "text": "Boost Software License <VERSION> <DATE> Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the \"Software\") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following", + "type": "short" + } + ] + }, + "CC-BY-1.0": { + "licenseName": "Creative Commons Attribution 1.0 Generic", + "identifier": "CC-BY-1.0", + "canonicalUrl": [ + "https://creativecommons.org/licenses/by/1.0/" + ], + "licenseFragments": [] + }, + "CC-BY-2.0": { + "licenseName": "Creative Commons Attribution 2.0 Generic", + "identifier": "CC-BY-2.0", + "canonicalUrl": [ + "https://creativecommons.org/licenses/by/2.0/" + ], + "licenseFragments": [] + }, + "CC-BY-2.5": { + "licenseName": "Creative Commons Attribution 2.5 Generic", + "identifier": "CC-BY-2.5", + "canonicalUrl": [ + "https://creativecommons.org/licenses/by/2.5/" + ], + "licenseFragments": [] + }, + "CC-BY-3.0": { + "licenseName": "Creative Commons Attribution 3.0 Unported", + "identifier": "CC-BY-3.0", + "canonicalUrl": [ + "https://creativecommons.org/licenses/by/3.0/" + ], + "licenseFragments": [] + }, + "CC-BY-4.0": { + "licenseName": "Creative Commons Attribution 4.0 International", + "identifier": "CC-BY-4.0", + "canonicalUrl": [ + "https://creativecommons.org/licenses/by/4.0/" + ], + "licenseFragments": [] + }, + "CC-BY-SA-1.0": { + "licenseName": "Creative Commons Attribution-ShareAlike 1.0 Generic", + "identifier": "CC-BY-SA-1.0", + "canonicalUrl": [ + "https://creativecommons.org/licenses/by-sa/1.0/" + ], + "licenseFragments": [] + }, + "CC-BY-SA-2.0": { + "licenseName": "Creative Commons Attribution-ShareAlike 2.0 Generic", + "identifier": "CC-BY-SA-2.0", + "canonicalUrl": [ + "https://creativecommons.org/licenses/by-sa/2.0/" + ], + "licenseFragments": [] + }, + "CC-BY-SA-2.5": { + "licenseName": "Creative Commons Attribution-ShareAlike 2.5 Generic", + "identifier": "CC-BY-SA-2.5", + "canonicalUrl": [ + "https://creativecommons.org/licenses/by-sa/2.5/" + ], + "licenseFragments": [] + }, + "CC-BY-SA-3.0": { + "licenseName": "Creative Commons Attribution-ShareAlike 3.0 Unported", + "identifier": "CC-BY-SA-3.0", + "canonicalUrl": [ + "https://creativecommons.org/licenses/by-sa/3.0/" + ], + "licenseFragments": [] + }, + "CC-BY-SA-4.0": { + "licenseName": "Creative Commons Attribution-ShareAlike 4.0 International", + "identifier": "CC-BY-SA-4.0", + "canonicalUrl": [ + "https://creativecommons.org/licenses/by-sa/4.0/" + ], + "licenseFragments": [] + }, + "CC0-1.0": { + "licenseName": "Creative Commons CC0 1.0 Universal", + "identifier": "CC0-1.0", + "canonicalUrl": [ + "http://creativecommons.org/publicdomain/zero/1.0/legalcode", + "magnet:?xt=urn:btih:90dc5c0be029de84e523b9b3922520e79e0e6f08&dn=cc0.txt" + ], + "licenseFragments": [] + }, + "CECILL-2.0": { + "licenseName": "CeCILL Free Software License Agreement v2.0", + "identifier": "CECILL-2.0", + "canonicalUrl": [ + "https://www.cecill.info/licences/Licence_CeCILL_V2-en.txt", + "magnet:?xt=urn:btih:dda0473d240d7febeac8fa265da27286ead0b1ce&dn=cecill-2.0.txt" + ], + "licenseFragments": [] + }, + "CPAL-1.0": { + "licenseName": "Common Public Attribution License Version 1.0 (CPAL)", + "identifier": "CPAL-1.0", + "canonicalUrl": [ + "http://opensource.org/licenses/cpal_1.0", + "magnet:?xt=urn:btih:84143bc45939fc8fa42921d619a95462c2031c5c&dn=cpal-1.0.txt" + ], + "licenseFragments": [ + { + "text": "The contents of this file are subject to the Common Public Attribution License Version 1.0", + "type": "short" + }, + { + "text": "The term \"External Deployment\" means the use, distribution, or communication of the Original Code or Modifications in any way such that the Original Code or Modifications may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Code or Modifications as a distribution under section 3.1 and make Source Code available under Section 3.2.", + "type": "short" + } + ] + }, + "EPL-1.0": { + "licenseName": "Eclipse Public License Version 1.0", + "identifier": "EPL-1.0", + "canonicalUrl": [ + "http://www.eclipse.org/legal/epl-v10.html", + "magnet:?xt=urn:btih:4c6a2ad0018cd461e9b0fc44e1b340d2c1828b22&dn=epl-1.0.txt" + ], + "licenseFragments": [ + { + "text": "THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.", + "type": "short" + } + ] + }, + "Expat": { + "licenseName": "Expat License (sometimes called MIT Licensed)", + "identifier": "Expat", + "canonicalUrl": [ + "http://www.jclark.com/xml/copying.txt", + "magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt" + ], + "licenseFragments": [ + { + "text": "Copyright <YEAR> <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.", + "type": "short" + } + ] + }, + "FreeBSD": { + "licenseName": "FreeBSD License", + "identifier": "FreeBSD", + "canonicalUrl": [ + "http://www.freebsd.org/copyright/freebsd-license.html", + "magnet:?xt=urn:btih:87f119ba0b429ba17a44b4bffcab33165ebdacc0&dn=freebsd.txt" + ], + "licenseFragments": [ + { + "text": "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\nRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.", + "type": "short" + } + ] + }, + "GNU-All-Permissive": { + "licenseName": "GNU All-Permissive License", + "identifier": "GNU-All-Permissive", + "canonicalUrl": [], + "licenseFragments": [ + { + "text": "Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.", + "type": "short" + } + ] + }, + "GPL-2.0": { + "licenseName": "GNU General Public License (GPL) version 2", + "identifier": "GPL-2.0", + "canonicalUrl": [ + "http://www.gnu.org/licenses/gpl-2.0.html", + "magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt" + ], + "licenseFragments": [ + { + "text": "<THISPROGRAM> is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.", + "type": "short" + }, + { + "text": "Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the \"GPL\"), or the GNU Lesser General Public License Version 2.1 or later (the \"LGPL\"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to use your version of this file under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL.", + "type": "short" + } + ] + }, + "GPL-3.0": { + "licenseName": "GNU General Public License (GPL) version 3", + "identifier": "GPL-3.0", + "canonicalUrl": [ + "http://www.gnu.org/licenses/gpl-3.0.html", + "magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt" + ], + "licenseFragments": [ + { + "text": "<THISPROGRAM> is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License (GNU GPL) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The code is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. As additional permission under GNU GPL version 3 section 7, you may distribute non-source (e.g., minimized or compacted) forms of that code without the copy of the GNU GPL normally required by section 4, provided you include this license notice and a URL through which recipients can access the Corresponding Source.", + "type": "short" + }, + { + "text": "<THISPROGRAM> is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.", + "type": "short" + } + ] + }, + "ISC": { + "licenseName": "The ISC License", + "identifier": "ISC", + "canonicalUrl": [ + "https://www.isc.org/downloads/software-support-policy/isc-license/", + "magnet:?xt=urn:btih:b8999bbaf509c08d127678643c515b9ab0836bae&dn=ISC.txt" + ], + "licenseFragments": [ + { + "text": "Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.", + "type": "short" + }, + { + "text": "Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.", + "type": "short" + } + ] + }, + "jQueryTools": { + "licenseName": "jQuery Tools", + "identifier": "jQueryTools", + "canonicalUrl": [], + "licenseFragments": [ + { + "text": "NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.", + "type": "short" + } + ] + }, + "LGPL-2.1": { + "licenseName": "GNU Lesser General Public License, version 2.1", + "identifier": "LGPL-2.1", + "canonicalUrl": [ + "http://www.gnu.org/licenses/lgpl-2.1.html", + "magnet:?xt=urn:btih:5de60da917303dbfad4f93fb1b985ced5a89eac2&dn=lgpl-2.1.txt" + ], + "licenseFragments": [ + { + "text": "<THISLIBRARY> is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.", + "type": "short" + } + ] + }, + "LGPL-3.0": { + "licenseName": "GNU Lesser General Public License, version 3", + "identifier": "LGPL-3.0", + "canonicalUrl": [ + "http://www.gnu.org/licenses/lgpl-3.0.html", + "magnet:?xt=urn:btih:0ef1b8170b3b615170ff270def6427c317705f85&dn=lgpl-3.0.txt" + ], + "licenseFragments": [ + { + "text": "<THISPROGRAM> is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.", + "type": "short" + } + ] + }, + "MPL-2.0": { + "licenseName": "Mozilla Public License Version 2.0", + "identifier": "MPL-2.0", + "canonicalUrl": [ + "http://www.mozilla.org/MPL/2.0", + "magnet:?xt=urn:btih:3877d6d54b3accd4bc32f8a48bf32ebc0901502a&dn=mpl-2.0.txt" + ], + "licenseFragments": [ + { + "text": "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/.", + "type": "short" + } + ] + }, + "PublicDomain": { + "licenseName": "Public Domain", + "identifier": "PublicDomain", + "canonicalUrl": [ + "magnet:?xt=urn:btih:e95b018ef3580986a04669f1b5879592219e2a7a&dn=public-domain.txt" + ], + "licenseFragments": [] + }, + "Unlicense": { + "licenseName": "Unlicense", + "identifier": "Unlicense", + "canonicalUrl": [ + "http://unlicense.org/UNLICENSE", + "magnet:?xt=urn:btih:5ac446d35272cc2e4e85e4325b146d0b7ca8f50c&dn=unlicense.txt" + ], + "licenseFragments": [ + { + "text": "This is free and unencumbered software released into the public domain.", + "type": "short" + } + ] + }, + "UPL": { + "licenseName": "Universal Permissive License", + "identifier": "UPL-1.0", + "canonicalUrl": [ + "https://oss.oracle.com/licenses/upl/", + "magnet:?xt=urn:btih:478974f4d41c3fa84c4befba25f283527fad107d&dn=upl-1.0.txt" + ], + "licenseFragments": [ + { + "text": "The Universal Permissive License (UPL), Version 1.0", + "type": "short" + } + ] + }, + "WTFPL": { + "licenseName": "Do What The F*ck You Want To Public License (WTFPL)", + "identifier": "WTFPL", + "canonicalUrl": [ + "http://www.wtfpl.net/txt/copying/", + "magnet:?xt=urn:btih:723febf9f6185544f57f0660a41489c7d6b4931b&dn=wtfpl.txt" + ], + "licenseFragments": [ + { + "text": "DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE", + "type": "short" + }, + { + "text": "0. You just DO WHAT THE FUCK YOU WANT TO.", + "type": "short" + } + ] + }, + "X11": { + "licenseName": "X11 License", + "identifier": "X11", + "canonicalUrl": [ + "magnet:?xt=urn:btih:5305d91886084f776adcf57509a648432709a7c7&dn=x11.txt" + ], + "licenseFragments": [ + { + "text": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.", + "type": "short" + } + ] + }, + "XFree86-1.1": { + "licenseName": "XFree86 1.1 License", + "identifier": "XFree86-1.1", + "canonicalUrl": [ + "http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3", + "http://www.xfree86.org/current/LICENSE4.html", + "magnet:?xt=urn:btih:12f2ec9e8de2a3b0002a33d518d6010cc8ab2ae9&dn=xfree86.txt" + ], + "licenseFragments": [ + { + "text": "All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n1. Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer.\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution, and in the same place and form as other copyright, license and disclaimer information.\n3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \"This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors\", in the same place and form as other third-party acknowledgments. Alternately, this acknowledgment may appear in the software itself, in the same form and location as other such third-party acknowledgments.4. Except as contained in this notice, the name of The XFree86 Project, Inc shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The XFree86 Project, Inc.", + "type": "short" + } + ] + }, + "Zlib": { + "licenseName": "zlib License", + "canonicalUrl": [ + "https://www.zlib.net/zlib_license.html", + "https://spdx.org/licenses/Zlib.txt", + "magnet:?xt=urn:btih:922bd98043fa3daf4f9417e3e8fec8406b1961a3&dn=zlib.txt" + ], + "identifier": "Zlib", + "licenseFragments": [] + } +} diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/pattern_utils.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/pattern_utils.js new file mode 100644 index 0000000..e8d62aa --- /dev/null +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/common/pattern_utils.js @@ -0,0 +1,49 @@ +/** + * GNU LibreJS - A browser add-on to block nonfree nontrivial JavaScript. + * * + * Copyright (C) 2011, 2012, 2013, 2014 Loic J. Duros + * Copyright (C) 2014, 2015 Nik Nyby + * Copyright (C) 2022 Yuchen Pei + * + * This file is part of GNU LibreJS. + * + * GNU LibreJS is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * GNU LibreJS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU LibreJS. If not, see <http://www.gnu.org/licenses/>. + */ + +exports.patternUtils = { + /** + * removeNonalpha + * + * Remove all nonalphanumeric values, except for + * < and >, since they are what we use for tokens. + * + */ + removeNonalpha: function(str) { + return str.replace(/[^a-z0-9<>@]+/gi, ''); + }, + + removeWhitespace: function(str) { + return str.replace(/\/\//gmi, '').replace(/\*/gmi, '').replace(/\s+/gmi, ''); + }, + + replaceTokens: function(str) { + return str.replace(/<.*?>/gi, '.*?'); + }, + + removeJsComments: function(str) { + const ml_comments = /\/\*.*?(\*\/)/g; + const il_comments = /\/\/.*/gm; + return str.replace(ml_comments, '').replace(il_comments, ''); + } +}; |