Added Findify v6.9.15 and detection of framework-bundles
This commit is contained in:
parent
7007aee18a
commit
447c6d2c97
|
@ -55,6 +55,16 @@ var files = {
|
|||
// Ext Core
|
||||
'resources/ext-core/3.1.0/ext-core.jsm': true,
|
||||
|
||||
// Finify bundle
|
||||
'resources/findify-bundle/6.9.15/bundle.js': true,
|
||||
'resources/findify-bundle/6.9.15/components.js': true,
|
||||
'resources/findify-bundle/6.9.15/config.js': true,
|
||||
'resources/findify-bundle/6.9.15/initializer.js': true,
|
||||
'resources/findify-bundle/6.9.15/polyfill.js': true,
|
||||
'resources/findify-bundle/6.9.15/vendors~components~initializer.js': true,
|
||||
'resources/findify-bundle/6.9.15/vendors~initializer.js': true,
|
||||
'resources/findify-bundle/6.9.15/vendors~sentry.js': true,
|
||||
|
||||
// Font Awesome
|
||||
'resources/fontawesome/4.7.0/css/font-awesome.min.css': true,
|
||||
'resources/fontawesome/5.7.2/css/all.css': true,
|
||||
|
|
|
@ -117,6 +117,14 @@ var mappings = {
|
|||
'ember-source@{version}/dist/ember.min.': resources.ember,
|
||||
'ember-source@{version}/dist/legacy/ember.': resources.ember,
|
||||
'ember-source@{version}/dist/legacy/ember.min.': resources.ember,
|
||||
'@findify/bundle@{version}/dist/bundle.js': resources.findifyBundle,
|
||||
'@findify/bundle@{version}/dist/components.js': resources.findifyBundle,
|
||||
'@findify/bundle@{version}/dist/config.js': resources.findifyBundle,
|
||||
'@findify/bundle@{version}/dist/initializer.js': resources.findifyBundle,
|
||||
'@findify/bundle@{version}/dist/polyfill.js': resources.findifyBundle,
|
||||
'@findify/bundle@{version}/dist/vendors~components~initializer.js': resources.findifyBundle,
|
||||
'@findify/bundle@{version}/dist/vendors~initializer.js': resources.findifyBundle,
|
||||
'@findify/bundle@{version}/dist/vendors~sentry.js': resources.findifyBundle,
|
||||
'jquery@{version}/dist/jquery.': resources.jQuery,
|
||||
'jquery@{version}/dist/jquery.min.': resources.jQuery,
|
||||
'jquery-ui@{version}/jquery-ui.js': resources.jQueryUI,
|
||||
|
|
|
@ -89,7 +89,7 @@ requestAnalyzer._matchBasePath = function (hostMappings, channelPath) {
|
|||
|
||||
requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channelHost, channelPath) {
|
||||
|
||||
let resourcePath, versionNumber, resourcePattern;
|
||||
let resourcePath, versionNumber, resourcePattern, filename, bundle;
|
||||
|
||||
resourcePath = channelPath.replace(basePath, '');
|
||||
|
||||
|
@ -122,11 +122,19 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
|
|||
version = versionNumber && versionNumber[0] || targetPath.match(Resource.VERSION_EXPRESSION);
|
||||
}
|
||||
|
||||
// Get bundle name
|
||||
bundle = helpers.determineBundle(channelPath);
|
||||
if(bundle !== '') {
|
||||
filename = channelPath.split('/').pop();
|
||||
targetPath = targetPath + filename;
|
||||
}
|
||||
|
||||
// Prepare and return a local target.
|
||||
return {
|
||||
'source': channelHost,
|
||||
'version': version,
|
||||
'path': targetPath
|
||||
'path': targetPath,
|
||||
'bundle': bundle
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,6 +75,11 @@ var resources = {
|
|||
'path': 'resources/ext-core/{version}/ext-core.jsm',
|
||||
'type': 'application/javascript'
|
||||
},
|
||||
// Finify bundle
|
||||
'findifyBundle': {
|
||||
'path': 'resources/findify-bundle/{version}/',
|
||||
'type': 'application/javascript'
|
||||
},
|
||||
// Font Awesome
|
||||
'fontawesome4': {
|
||||
'path': 'resources/fontawesome/{version}/css/font-awesome.min.css',
|
||||
|
|
|
@ -245,6 +245,14 @@ helpers.determineResourceName = function (filename) {
|
|||
}
|
||||
};
|
||||
|
||||
helpers.determineBundle = function (path = '') {
|
||||
if (path.includes('findify')) {
|
||||
return 'Findify';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
helpers.determineScriptDirection = function (language) {
|
||||
|
||||
let rightToLeftLanguages, scriptDirection;
|
||||
|
@ -308,6 +316,8 @@ helpers.setLastVersion = function (type, versionNumber) {
|
|||
version = '3.12.3';
|
||||
} else if (type.includes('/ext-core/3.')) {
|
||||
version = '3.1.0';
|
||||
} else if (type.includes('findify')) {
|
||||
version = '6.9.15';
|
||||
} else if (type.includes('/fontawesome/4.')) {
|
||||
version = '4.7.0';
|
||||
} else if (type.includes('/fontawesome/5.')) {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* Belongs to Decentraleyes.
|
||||
*
|
||||
* @author Thomas Rientjes
|
||||
* @author nobody42
|
||||
* @since 2016-08-09
|
||||
* @license MPL 2.0
|
||||
*
|
||||
|
@ -251,11 +252,17 @@ popup._createInjectionGroupElement = function (source, cdn) {
|
|||
|
||||
let injectionGroupElement;
|
||||
|
||||
// Filter duplicates
|
||||
let bundle = [];
|
||||
for (let injection of cdn) {
|
||||
bundle.push(injection);
|
||||
}
|
||||
let filtered = popup._filterDuplicates(bundle, 'bundle');
|
||||
|
||||
injectionGroupElement = document.createElement('ul');
|
||||
injectionGroupElement.setAttribute('class', 'sublist');
|
||||
|
||||
for (let injection of cdn) {
|
||||
|
||||
for (let injection of filtered) {
|
||||
let injectionElement = popup._createInjectionElement(injection);
|
||||
injectionGroupElement.appendChild(injectionElement);
|
||||
}
|
||||
|
@ -271,7 +278,13 @@ popup._createInjectionElement = function (injection) {
|
|||
injectionElement.setAttribute('class', 'sublist-item');
|
||||
|
||||
filename = helpers.extractFilenameFromPath(injection.path);
|
||||
name = helpers.determineResourceName(filename);
|
||||
|
||||
// If bundle empty, use filename
|
||||
if (injection.bundle === ''){
|
||||
name = helpers.determineResourceName(filename);
|
||||
} else {
|
||||
name = injection.bundle + ' (Bundle)'
|
||||
}
|
||||
|
||||
nameTextNode = document.createTextNode(`- ${name}`);
|
||||
injectionElement.appendChild(nameTextNode);
|
||||
|
@ -350,6 +363,22 @@ popup._onProtectionToggled = function () {
|
|||
popup._close();
|
||||
};
|
||||
|
||||
popup._filterDuplicates = function(array, key) {
|
||||
/**
|
||||
* Function to remove duplicates from an array, depending on 'key'.
|
||||
* Ignore empty values of the 'key'
|
||||
*
|
||||
*/
|
||||
|
||||
let filtered = array
|
||||
.map(e => e[key])
|
||||
.map((value, index, newArray) => (value != '') ? (newArray.indexOf(value) === index && index) : index )
|
||||
.filter(e => array[e])
|
||||
.map(e => array[e]);
|
||||
|
||||
return filtered;
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializations
|
||||
*/
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
</div>
|
||||
<ul>
|
||||
<li>Added lozad v1.14.0</li>
|
||||
<li>Added Findify v6.9.15</li>
|
||||
<li>Added detection of framework-bundles (e.g. Findify)</li>
|
||||
</ul>
|
||||
<div class="topic-label">
|
||||
Please update your uBlock/uMatrix rules
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,2 @@
|
|||
(window.findifyJsonp=window.findifyJsonp||[]).push([[4],{"T/88":function(e,n,_){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,"development"!==process.env.NODE_ENV&&__CONFIG__,n.default=__CONFIG__}}]);
|
||||
//# sourceMappingURL=config.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue