1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-03-01 10:07:51 +01:00

Merge branch 'develop' into 'master'

Develop

Closes #38, #40, #26, #44, #42 und #45

See merge request nobody42/localcdn!12
This commit is contained in:
nobody 2020-04-05 07:09:47 +00:00
commit 7a67eb043d
24 changed files with 133 additions and 580 deletions

View File

@ -98,6 +98,10 @@ var files = {
// jQuery BlockUI // jQuery BlockUI
'resources/jquery.blockUI/2.70/jquery.blockUI.min.jsm': true, 'resources/jquery.blockUI/2.70/jquery.blockUI.min.jsm': true,
// jQuery Migrate
'resources/jquery-migrate/1.4.1/jquery-migrate.min.jsm': true,
'resources/jquery-migrate/3.1.0/jquery-migrate.min.jsm': true,
// jQuery UI // jQuery UI
'resources/jqueryui/1.11.4/jquery-ui.min.jsm': true, 'resources/jqueryui/1.11.4/jquery-ui.min.jsm': true,
@ -129,7 +133,9 @@ var files = {
'resources/p2p-media-loader-core/0.6.2/p2p-media-loader-core.min.jsm': true, 'resources/p2p-media-loader-core/0.6.2/p2p-media-loader-core.min.jsm': true,
// plyr CSS // plyr CSS
'resources/plyr/3.5.10/plyr.min.cssm': true, // CSS cannot be loaded with the file extension .cssm (as shown on www.bitchute.com)
// Please do not change it.
'resources/plyr/3.5.10/plyr.min.css': true,
// Prototype // Prototype
'resources/prototype/1.7.3.0/prototype.jsm': true, 'resources/prototype/1.7.3.0/prototype.jsm': true,
@ -147,6 +153,10 @@ var files = {
// Scriptaculous // Scriptaculous
'resources/scriptaculous/1.9.0/scriptaculous.jsm': true, 'resources/scriptaculous/1.9.0/scriptaculous.jsm': true,
// Select2
'resources/select2/4.0.12/select2.full.min.jsm': true,
'resources/select2/4.0.12/select2.min.cssm': true,
// spin.js // spin.js
'resources/spin.js/2.3.2/spin.min.jsm': true, 'resources/spin.js/2.3.2/spin.min.jsm': true,

View File

@ -84,6 +84,7 @@ var mappings = {
'jquery/{version}/jquery.': resources.jQuery, 'jquery/{version}/jquery.': resources.jQuery,
'jquery/{version}/jquery.min.': resources.jQuery, 'jquery/{version}/jquery.min.': resources.jQuery,
'jquery.blockUI/{version}/jquery.blockUI.min.js': resources.jQueryBlockUI, 'jquery.blockUI/{version}/jquery.blockUI.min.js': resources.jQueryBlockUI,
'jquery-migrate/{version}/jquery-migrate.min.js': resources.jQueryMigrate,
'jqueryui/{version}/jquery-ui.js': resources.jQueryUI, 'jqueryui/{version}/jquery-ui.js': resources.jQueryUI,
'jqueryui/{version}/jquery-ui.min.js': resources.jQueryUI, 'jqueryui/{version}/jquery-ui.min.js': resources.jQueryUI,
'jquery-validate/{version}/jquery.validate.min.js': resources.jqueryValidationPlugin, 'jquery-validate/{version}/jquery.validate.min.js': resources.jqueryValidationPlugin,
@ -98,6 +99,8 @@ var mappings = {
'rickshaw/{version}/rickshaw.min.css': resources.rickshawCSS, 'rickshaw/{version}/rickshaw.min.css': resources.rickshawCSS,
'rickshaw/{version}/rickshaw.min.js': resources.rickshawJS, 'rickshaw/{version}/rickshaw.min.js': resources.rickshawJS,
'scriptaculous/{version}/scriptaculous.': resources.scriptaculous, 'scriptaculous/{version}/scriptaculous.': resources.scriptaculous,
'select2/{version}/js/select2.min.js': resources.select2js,
'select2/{version}/css/select2.min.css': resources.select2css,
'spin.js/{version}/spin.min.js': resources.spinJS, 'spin.js/{version}/spin.min.js': resources.spinJS,
'swfobject/{version}/swfobject.': resources.swfobject, 'swfobject/{version}/swfobject.': resources.swfobject,
'toastr.js/{version}/toastr.min.css': resources.toastrCSS, 'toastr.js/{version}/toastr.min.css': resources.toastrCSS,
@ -480,7 +483,7 @@ var mappings = {
'netdna.bootstrapcdn.com': { 'netdna.bootstrapcdn.com': {
'/bootstrap/': { '/bootstrap/': {
'{version}/js/bootstrap.min.': resources.bootstrapJS, '{version}/js/bootstrap.min.': resources.bootstrapJS,
'{version}/css/bootstrap.min.': resources.bootstrapCSS, '{version}/css/bootstrap.min.': resources.bootstrapCSS
}, },
'/font-awesome/': { '/font-awesome/': {
'{version}/css/font-awesome.css': resources.fontawesome '{version}/css/font-awesome.css': resources.fontawesome

View File

@ -99,6 +99,26 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
versionNumber = resourcePath.match(Resource.VERSION_EXPRESSION); versionNumber = resourcePath.match(Resource.VERSION_EXPRESSION);
resourcePattern = resourcePath.replace(versionNumber, Resource.VERSION_PLACEHOLDER); resourcePattern = resourcePath.replace(versionNumber, Resource.VERSION_PLACEHOLDER);
/*
NOTE:
jsDelivr allows to load several files in one request
This is just a workaround. If there are more websites which use this, we will have to do crazy things here to find and redirect these files.
It's not possible to respond to a request with multiple redirections
https://gitlab.com/nobody42/localcdn/-/issues/45
*/
let regexJsDelivr = RegExp(/\/combine.*jquery.*hogan.*algoliasearch.*autocomplete.*/);
if (channelHost.includes('cdn.jsdelivr.net') && regexJsDelivr.test(channelPath)) {
return {
'source': channelHost,
'version': 'beta',
'path': 'resources/jsdelivr-combine-jquery-hogan-algoliasearch-autocomplete.jsm',
'bundle': ''
};
}
for (let resourceMold of Object.keys(resourceMappings)) { for (let resourceMold of Object.keys(resourceMappings)) {
if (resourcePattern.startsWith(resourceMold)) { if (resourcePattern.startsWith(resourceMold)) {

View File

@ -135,6 +135,11 @@ var resources = {
'path': 'resources/jquery.blockUI/{version}/jquery.blockUI.min.jsm', 'path': 'resources/jquery.blockUI/{version}/jquery.blockUI.min.jsm',
'type': 'application/javascript' 'type': 'application/javascript'
}, },
// jQuery Migrate
'jQueryMigrate': {
'path': 'resources/jquery-migrate/{version}/jquery-migrate.min.jsm',
'type': 'application/javascript'
},
// jQuery UI // jQuery UI
'jQueryUI': { 'jQueryUI': {
'path': 'resources/jqueryui/{version}/jquery-ui.min.jsm', 'path': 'resources/jqueryui/{version}/jquery-ui.min.jsm',
@ -187,7 +192,7 @@ var resources = {
}, },
// plyr CSS // plyr CSS
'plyrCSS': { 'plyrCSS': {
'path': 'resources/plyr/{version}/plyr.min.cssm', 'path': 'resources/plyr/{version}/plyr.min.css',
'type': 'text/css' 'type': 'text/css'
}, },
// Prototype // Prototype
@ -214,6 +219,15 @@ var resources = {
'path': 'resources/scriptaculous/{version}/scriptaculous.jsm', 'path': 'resources/scriptaculous/{version}/scriptaculous.jsm',
'type': 'application/javascript' 'type': 'application/javascript'
}, },
// Select2
'select2css': {
'path': 'resources/select2/{version}/select2.min.cssm',
'type': 'text/css'
},
'select2js': {
'path': 'resources/select2/{version}/select2.full.min.jsm',
'type': 'application/javascript'
},
// spin.js // spin.js
'spinJS': { 'spinJS': {
'path': 'resources/spin.js/{version}/spin.min.jsm', 'path': 'resources/spin.js/{version}/spin.min.jsm',

View File

@ -1,7 +1,7 @@
{ {
"manifest_version": 2, "manifest_version": 2,
"name": "LocalCDN (fork from Decentraleyes)", "name": "LocalCDN (fork from Decentraleyes)",
"version": "2.1.9", "version": "2.1.10",
"browser_specific_settings": { "browser_specific_settings": {
"gecko": { "gecko": {
"id": "{b86e4813-687a-43e6-ab65-0bde4ab75758}", "id": "{b86e4813-687a-43e6-ab65-0bde4ab75758}",

View File

@ -194,6 +194,8 @@ helpers.determineCdnName = function (domainName) {
return 'Cloudflare CDN'; return 'Cloudflare CDN';
case 'akamai-webcdn.kgstatic.net': case 'akamai-webcdn.kgstatic.net':
return 'Akamai WebCDN'; return 'Akamai WebCDN';
case 'netdna.bootstrapcdn.com':
return 'NetDNA';
default: default:
return 'Unknown'; return 'Unknown';
} }
@ -251,6 +253,8 @@ helpers.determineResourceName = function (filename) {
return 'jQuery UI'; return 'jQuery UI';
case 'jquery.blockUI.min.jsm': case 'jquery.blockUI.min.jsm':
return 'jQuery Block UI'; return 'jQuery Block UI';
case 'jquery-migrate.min.jsm':
return 'jQuery Migrate';
case 'jquery.validate.min.jsm': case 'jquery.validate.min.jsm':
return 'jQuery jeditable'; return 'jQuery jeditable';
case 'jquery.jeditable.min.jsm': case 'jquery.jeditable.min.jsm':
@ -283,6 +287,10 @@ helpers.determineResourceName = function (filename) {
return 'rickshaw CSS'; return 'rickshaw CSS';
case 'scriptaculous.jsm': case 'scriptaculous.jsm':
return 'Scriptaculous'; return 'Scriptaculous';
case 'select2.min.cssm':
return 'Select2 CSS';
case 'select2.full.min.jsm':
return 'Select2 JS';
case 'spin.min.jsm': case 'spin.min.jsm':
return 'spin.js'; return 'spin.js';
case 'store.legacy.min.jsm': case 'store.legacy.min.jsm':
@ -303,6 +311,8 @@ helpers.determineResourceName = function (filename) {
return 'Vue.js'; return 'Vue.js';
case 'wow.min.jsm': case 'wow.min.jsm':
return 'WOW'; return 'WOW';
case 'jsdelivr-combine-jquery-hogan-algoliasearch-autocomplete.jsm':
return 'jsDelivr combined';
default: default:
return 'Unknown'; return 'Unknown';
} }
@ -353,8 +363,6 @@ helpers.setLastVersion = function (type, version) {
if(version !== null && version !== undefined) { if(version !== null && version !== undefined) {
requestVersion = version.toString(); requestVersion = version.toString();
} else if (version === null) {
return 'latest';
} }
if (type.includes('/angularjs/1.')) { if (type.includes('/angularjs/1.')) {
version = '1.7.9'; version = '1.7.9';
@ -410,6 +418,10 @@ helpers.setLastVersion = function (type, version) {
version = '1.11.4'; version = '1.11.4';
} else if (type.includes('/jquery.blockUI/2.')) { } else if (type.includes('/jquery.blockUI/2.')) {
version = '2.70'; version = '2.70';
} else if (type.includes('/jquery-migrate/1.')) {
version = '1.4.1';
} else if (type.includes('/jquery-migrate/3.')) {
version = '3.1.0';
} else if (type.includes('/jquery-validate/1.')) { } else if (type.includes('/jquery-validate/1.')) {
version = '1.19.1'; version = '1.19.1';
} else if (type.includes('/jquery-jeditable/1.')) { } else if (type.includes('/jquery-jeditable/1.')) {
@ -438,6 +450,8 @@ helpers.setLastVersion = function (type, version) {
version = '1.6.6'; version = '1.6.6';
} else if (type.includes('/scriptaculous/1.')) { } else if (type.includes('/scriptaculous/1.')) {
version = '1.9.0'; version = '1.9.0';
} else if (type.includes('/select2/4.')) {
version = '4.0.12';
} else if (type.includes('/spin.js/2.')) { } else if (type.includes('/spin.js/2.')) {
version = '2.3.2'; version = '2.3.2';
} else if (type.includes('/store.js/2.')) { } else if (type.includes('/store.js/2.')) {
@ -460,6 +474,8 @@ helpers.setLastVersion = function (type, version) {
version = '6.4.8'; version = '6.4.8';
} else if (type.includes('/wow/1.')) { } else if (type.includes('/wow/1.')) {
version = '1.1.2'; version = '1.1.2';
} else if (version === null) {
version = 'latest';
} }
return version; return version;

View File

@ -292,7 +292,8 @@ popup._createInjectionElement = function (injection) {
if (injection.version !== null) { if (injection.version !== null) {
noteElement = document.createElement('span'); noteElement = document.createElement('span');
noteElement.setAttribute('class', 'side-note'); noteElement.setAttribute('class', 'side-note');
noteTextNode = document.createTextNode(` v${injection.version}`); let versionNode = (injection.version === 'beta') ? ` ${injection.version}` : ` v${injection.version}`;
noteTextNode = document.createTextNode(versionNode);
noteElement.appendChild(noteTextNode); noteElement.appendChild(noteTextNode);
injectionElement.appendChild(noteElement); injectionElement.appendChild(noteElement);
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View File

@ -1,105 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
viewBox="0 0 294.361 294.361"
style="enable-background:new 0 0 294.361 294.361;"
xml:space="preserve"
sodipodi:docname="security-svgrepo-com.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)"><metadata
id="metadata2411"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs2409" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1680"
inkscape:window-height="997"
id="namedview2407"
showgrid="false"
inkscape:zoom="0.80173666"
inkscape:cx="147.1805"
inkscape:cy="147.1805"
inkscape:window-x="0"
inkscape:window-y="25"
inkscape:window-maximized="1"
inkscape:current-layer="Capa_1" />
<g
id="g2374"
style="fill:#058300;fill-opacity:1">
<path
d="M154.444,127.639l26.045,26.044c6.639-18.818,11.328-38.756,13.101-56.781c0.06-0.608-0.276-1.16-0.835-1.373 l-70.484-26.933c-0.152-0.058-0.312-0.088-0.475-0.088c-0.163,0-0.323,0.029-0.475,0.088L50.836,95.529 c-0.551,0.21-0.894,0.775-0.835,1.373c2.922,29.705,13.73,64.62,28.206,91.12c14.162,25.923,30.457,41.4,43.589,41.4 c5.948,0,12.545-3.184,19.298-9.067l-39.684-39.683c-14.644-14.645-14.644-38.388,0-53.033 C116.056,112.995,139.8,112.995,154.444,127.639z"
id="path2368"
style="fill:#058300;fill-opacity:1" />
<path
d="M155.255,234.516c-10.37,9.333-21.651,14.906-33.459,14.906c-46.932,0-85.544-87.976-91.7-150.562 c-0.94-9.56,4.627-18.585,13.6-22.013l70.486-26.933c2.451-0.937,5.032-1.405,7.614-1.405c2.581,0,5.162,0.468,7.613,1.405 l70.484,26.932c8.987,3.434,14.542,12.439,13.6,22.014c-0.969,9.846-2.742,20.322-5.223,30.984l34.029-34.029 c0.432-2.986,0.814-5.947,1.129-8.869c1.339-12.425-5.599-24.245-17.109-29.112L132.822,18.3c-7.048-2.98-15.002-2.98-22.05,0 L17.273,57.833C5.777,62.694-1.174,74.535,0.164,86.945c8.821,81.833,64.496,191.35,121.633,191.35 c19.371,0,38.571-12.598,55.837-32.427c-7.931-1.024-15.598-4.572-21.69-10.664L155.255,234.516z"
id="path2370"
style="fill:#058300;fill-opacity:1" />
<path
d="M288.504,102.645c-7.811-7.811-20.475-7.811-28.285,0l-77.758,77.759l-40.392-40.391 c-7.811-7.811-20.474-7.81-28.284,0.001c-7.811,7.811-7.809,20.474,0.001,28.284l54.533,54.532 c3.905,3.905,9.023,5.857,14.142,5.857c5.118,0,10.237-1.952,14.143-5.857l91.9-91.9 C296.313,123.12,296.313,110.456,288.504,102.645z"
id="path2372"
style="fill:#058300;fill-opacity:1" />
</g>
<g
id="g2376">
</g>
<g
id="g2378">
</g>
<g
id="g2380">
</g>
<g
id="g2382">
</g>
<g
id="g2384">
</g>
<g
id="g2386">
</g>
<g
id="g2388">
</g>
<g
id="g2390">
</g>
<g
id="g2392">
</g>
<g
id="g2394">
</g>
<g
id="g2396">
</g>
<g
id="g2398">
</g>
<g
id="g2400">
</g>
<g
id="g2402">
</g>
<g
id="g2404">
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -1,105 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
viewBox="0 0 283.722 283.722"
style="enable-background:new 0 0 283.722 283.722;"
xml:space="preserve"
sodipodi:docname="disabled-connection-svgrepo-com.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)"><metadata
id="metadata1740"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs1738" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1680"
inkscape:window-height="997"
id="namedview1736"
showgrid="false"
inkscape:zoom="0.83180019"
inkscape:cx="141.86099"
inkscape:cy="141.86099"
inkscape:window-x="0"
inkscape:window-y="25"
inkscape:window-maximized="1"
inkscape:current-layer="Capa_1" />
<g
id="g1703"
style="fill:#be0000;fill-opacity:1">
<path
d="M184.721,128.156c4.398-14.805,7.516-29.864,8.885-43.783c0.06-0.607-0.276-1.159-0.835-1.373l-70.484-26.932 c-0.152-0.058-0.312-0.088-0.475-0.088c-0.163,0-0.322,0.03-0.474,0.088L50.851,83c-0.551,0.21-0.894,0.775-0.835,1.373 c2.922,29.705,13.73,64.62,28.206,91.12c14.162,25.923,30.457,41.4,43.589,41.4c8.439,0,18.183-6.4,27.828-17.846l-16.375-16.375 c-14.645-14.645-14.645-38.389,0-53.033C147.396,115.509,169.996,115.017,184.721,128.156z"
id="path1697"
style="fill:#be0000;fill-opacity:1" />
<path
d="M121.812,236.893c-46.932,0-85.544-87.976-91.7-150.562c-0.94-9.56,4.627-18.585,13.601-22.013l70.486-26.933 c2.451-0.937,5.032-1.405,7.613-1.405c2.581,0,5.162,0.468,7.614,1.405l70.484,26.932c8.987,3.434,14.542,12.439,13.6,22.013 c-1.773,18.028-6.244,38.161-12.826,57.693l11.068,11.068l17.865-17.866c6.907-20.991,11.737-42.285,13.845-61.972 c1.322-12.347-5.53-24.102-16.934-29.017l-93.512-40.3c-7.152-3.082-15.257-3.082-22.409,0l-93.512,40.3 C5.705,51.147-1.159,62.922,0.162,75.255c8.765,81.851,64.476,191.512,121.65,191.512c0.356,0,0.712-0.023,1.068-0.032 c-1.932-10.793,0.888-22.262,8.456-31.06C128.205,236.465,125.029,236.893,121.812,236.893z"
id="path1699"
style="fill:#be0000;fill-opacity:1" />
<path
d="M240.037,208.125c7.327-7.326,30.419-30.419,37.827-37.827c7.81-7.811,7.81-20.475,0-28.285 c-7.811-7.811-20.475-7.811-28.285,0c-7.41,7.41-30.5,30.5-37.827,37.827l-37.827-37.827c-7.81-7.811-20.475-7.811-28.285,0 c-7.811,7.811-7.811,20.475,0,28.285l37.827,37.827c-7.326,7.326-30.419,30.419-37.827,37.827c-7.811,7.811-7.811,20.475,0,28.285 c7.809,7.809,20.474,7.811,28.285,0c7.41-7.41,30.5-30.499,37.827-37.827l37.827,37.827c7.809,7.809,20.474,7.811,28.285,0 c7.81-7.81,7.81-20.475,0-28.285L240.037,208.125z"
id="path1701"
style="fill:#be0000;fill-opacity:1" />
</g>
<g
id="g1705">
</g>
<g
id="g1707">
</g>
<g
id="g1709">
</g>
<g
id="g1711">
</g>
<g
id="g1713">
</g>
<g
id="g1715">
</g>
<g
id="g1717">
</g>
<g
id="g1719">
</g>
<g
id="g1721">
</g>
<g
id="g1723">
</g>
<g
id="g1725">
</g>
<g
id="g1727">
</g>
<g
id="g1729">
</g>
<g
id="g1731">
</g>
<g
id="g1733">
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

View File

@ -1,226 +0,0 @@
/**
* Sections
*/
html {
background-color: #f8fcee;
box-sizing: border-box;
height: 100%;
}
body {
background-color: #eff4e2;
box-sizing: border-box;
color: #777;
font-size: 14px;
margin: 0 auto;
max-width: 982px;
min-height: 100%;
min-width: 256px;
padding: 33px 18px;
}
h1,h2 {
font-family: 'Noto Sans', Arial, sans-serif;
font-size: 24px;
font-weight: 400;
margin: 20px auto;
max-width: 750px;
}
h2 {
font-size: 20px;
}
a {
color: #777;
}
.btn-panel {
cursor: default;
font-family: 'Noto Sans', Arial, sans-serif;
margin: 35px auto;
max-width: 750px;
display: flex;
}
/**
* Fonts
*/
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 400;
src: url('./noto-sans/noto-sans.woff2')
format('woff2');
}
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 600;
src: url('./noto-sans/noto-sans-bold.woff2')
format('woff2');
}
@font-face {
font-family: 'Noto Sans';
font-style: italic;
font-weight: 400;
src: url('./noto-sans/noto-sans-italic.woff2')
format('woff2');
}
/**
* Buttons
*/
.btn {
color: #fff;
font-weight: 600;
margin-right: 15px;
padding: 11px 17px;
text-decoration: none;
text-align: center;
}
.btn-gitlab {
background-color: #24292e;
}
.btn-gitlab:hover {
background-color: #42474c;
}
.btn-website {
background-color: #007bbd;
}
.btn-website:hover {
background-color: #00679e;
}
.btn-donate {
background-color: #f7931a;
}
.btn-donate:hover {
background-color: #f58700;
}
.btn-author {
background-color: #00bd7f;
}
.btn-author:hover {
background-color: #009e69;
}
/**
* Miscellaneous
*/
.notice {
align-items: center;
font-family: 'Noto Sans', Arial, sans-serif;
margin-left: auto;
margin-right: auto;
max-width: 750px;
text-align: left;
}
.logo {
display: block;
height: 145px;
margin: 15px auto 50px;
}
.subtle-hint {
background-color: #fcfcfc;
border-radius: 4px;
border: 1px solid #e6e6e6;
color: #777;
font-size: 14px;
margin-bottom: 20px;
padding: 8px 11px;
}
.message {
background-color: #fff;
border-bottom: 1px solid #f5f5f5;
color: #575757;
overflow: hidden;
padding: 15px 15px 12px;
font-weight: bold;
}
.message-information {
background-color: #fff;
border: 1px solid #e3e3e3;
-webkit-box-shadow: none;
box-shadow: none;
color: #fff;
margin-top: 25px;
padding: 0;
}
.message-header {
background-color: #f3f3f3;
border-right: 1px solid #e9e9e9;
font-size: 20px;
margin-right: 8px;
padding: 16px 14.4px;
padding: 1rem .9rem;
vertical-align: middle;
}
.message-body, .message-header {
-webkit-box-sizing: border-box;
box-sizing: border-box;
display: table-cell;
}
.message-body {
background-color: #fff;
color: #5f5f5f;
font-weight: 400;
padding: 16px;
padding: 1rem;
}
.message-warning {
color: #c57400;
}
.message-success {
color: #339a6f;
}
.message-success a {
color: #268f5c;
}
.message-error {
color: #9a3333;
}
/**
* Media Queries
*/
@media screen and (max-width: 982px) {
body {
box-shadow: none;
}
}
@media screen and (max-width: 733px) {
.btn-panel {
flex-wrap: wrap;
}
.btn {
padding: 13px 18px 12px;
width: 100%;
margin-bottom: 10px;
}
.btn-text {
width: 100%;
}
}

View File

@ -1,39 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>LocalCDN | Testing Utility</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<script type="text/javascript" src="test.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>
<img src="" alt="" class="logo" id="logo"/>
<div class="container">
<h1>LocalCDN | Testing Utility</h1>
<div class="notice">
<div class="subtle-hint">
<div id="message-log" class="log">
<div id="progress-indicator" class="message"><i class="message-icon far fa-cog fa-fw"></i> Determining status...</div>
</div>
<noscript>
<br><span style="color: #9a3333; font-weight: 600;">This tool relies on JavaScript. Please enable it, and try again.</span>
</noscript>
</div>
</div>
<h2>Learn more, or contribute</h2>
<div class="btn-panel">
<a class="btn btn-website" href="https://decentraleyes.org" target="_blank"><i class="btn-icon fai fa-globe" data-fa-transform="grow-2"></i><span class="btn-text">Website of Decentraleyes</span></a>
<a class="btn btn-gitlab" href="https://gitlab.com/nobody42/localcdn" target="_blank"><i class="btn-icon fai fa-gitlab" data-fa-transform="grow-2"></i><span class="btn-text">LocalCDN @GitLab</span></a>
<a class="btn btn-gitlab" href="https://git.synz.io/Synzvato/decentraleyes" target="_blank"><i class="btn-icon fai fa-gitlab" data-fa-transform="grow-2"></i><span class="btn-text">Decentraleyes @GitLab</span></a>
<a class="btn btn-donate" href="https://decentraleyes.org/donate" target="_blank"><i class="btn-icon fai fa-donate" data-fa-transform="grow-2"></i><span class="btn-text">Donate to Decentraleyes</span></a>
<a class="btn btn-author" href="https://synz.io" target="_blank"><i class="btn-icon fai fa-user-circle" data-fa-transform="grow-3"></i><span class="btn-text">Author of Decentraleyes</span></a>
</div>
</div>
</body>
</html>

View File

@ -1,83 +0,0 @@
function _logMessage(message) {
var messageLog = document.getElementById('message-log');
var contents = messageLog.innerHTML;
contents = contents + message;
messageLog.innerHTML = contents;
}
function _logWarningMessage(warningMessage) {
_logMessage('<div class="message message-warning"><i class="message-icon far fa-exclamation-triangle fa-fw"></i> ' + warningMessage + '</div>');
}
function _logSuccessMessage(successMessage) {
_logMessage('<div class="message message-success"><i class="message-icon far fa-check-circle fa-fw"></i> ' + successMessage + '</div>');
}
function _logErrorMessage(errorMessage) {
_logMessage('<div class="message message-error"><i class="message-icon far fa-times-hexagon fa-fw"></i> ' + errorMessage + '</div>');
}
function _logoUnprotected() {
document.getElementById('logo').src = "logo-unprotected.svg";
}
function _logoProtected() {
document.getElementById('logo').src = "logo-protected.svg";
}
function updateProgress() {
var progressIndicatorElement = document.getElementById('progress-indicator');
progressIndicatorElement.innerHTML = '<i class="message-icon far fa-comment-alt-lines fa-fw"></i> All tests completed.';
}
function logOperationalNotice() {
_logSuccessMessage('LocalCDN is fully operational.');
_logoProtected();
}
function logUnprotectedNotice() {
_logWarningMessage('Your browser was able to connect to a blacklisted CDN.');
_logErrorMessage('LocalCDN is not working as intended.');
_logoUnprotected();
}
function logUnavailableNotice() {
_logWarningMessage('The test resource could not be fetched locally or remotely.');
_logErrorMessage('LocalCDN is not working as intended.');
}
window.onload = function () {
if (window.jQuery) {
jQuery.globalEval = function () {};
$.get('https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js', function (data, status, response) {
updateProgress('completed');
if (response.getResponseHeader('cache-control') === 'no-cache') {
logOperationalNotice();
} else if (response.getResponseHeader('content-type') === 'application/javascript;charset=UTF-8') {
logOperationalNotice();
} else {
logUnprotectedNotice();
}
}).fail(function() {
updateProgress('completed');
logOperationalNotice();
});
} else {
updateProgress('completed');
logUnavailableNotice();
}
};

View File

@ -22,6 +22,29 @@
<div class="topic-label"> <div class="topic-label">
New in LocalCDN: New in LocalCDN:
</div> </div>
<ul>
<li>Fixed <a href="https://gitlab.com/nobody42/localcdn/-/issues/38">"#38"</a></li>
<li>Fixed <a href="https://gitlab.com/nobody42/localcdn/-/issues/26">"#26"</a> (bitchute.com)</li>
<li>Added: Select2 v4.0.12 (<a href="https://gitlab.com/nobody42/localcdn/-/issues/44">"Fixed #44"</a>)</li>
<li>Added: jQuery Migrate v3.1.0 and v1.4.1 (<a href="https://gitlab.com/nobody42/localcdn/-/issues/42">"Fixed #42"</a>)</li>
<li>Fixed: jsDelivr combined file (jQuery v2.2.4, Hogan.js v3.0.2, AlgoliaSearch v3.30.0 and Autocomplete.js v0.31.0) <a href="https://gitlab.com/nobody42/localcdn/-/issues/45">"Issue#45"</a> <strong>(Just a workaround!)</strong></li>
</ul>
<div class="topic-label">
Please update your uBlock/uMatrix rules
</div>
<div class="ruleset-generator">
<input id="generate-ublock-rules" name="rule-sets" data-option="uBlock" type="radio" value="uBlock">
<label for="generate-ublock-rules">uBlock</label>
</div>
<div class="ruleset-generator">
<input id="generate-umatrix-rules" name="rule-sets" data-option="uMatrix" type="radio" value="uMatrix">
<label for="generate-umatrix-rules">uMatrix</label>
</div>
<textarea rows="12" cols="15" id="generated-rules" readonly></textarea>
<input id="button-copy-rule-set" type="button" value="Copy">
<hr/>
<h2>History</h2>
<p>2020-03-29 (v2.1.9)</p><br/>
<ul> <ul>
<li>Added animate.css v3.7.2</li> <li>Added animate.css v3.7.2</li>
<li>Fixed bootstrap-slider</li> <li>Fixed bootstrap-slider</li>
@ -46,21 +69,6 @@
<li>Added flv.js v1.5.0 and hls.js v0.13.2</li> <li>Added flv.js v1.5.0 and hls.js v0.13.2</li>
<li>Logging implemented (Wiki page: <a href="https://gitlab.com/nobody42/localcdn/-/wikis/How-to-logging">How to logging</a>)</li> <li>Logging implemented (Wiki page: <a href="https://gitlab.com/nobody42/localcdn/-/wikis/How-to-logging">How to logging</a>)</li>
</ul> </ul>
<div class="topic-label">
Please update your uBlock/uMatrix rules
</div>
<div class="ruleset-generator">
<input id="generate-ublock-rules" name="rule-sets" data-option="uBlock" type="radio" value="uBlock">
<label for="generate-ublock-rules">uBlock</label>
</div>
<div class="ruleset-generator">
<input id="generate-umatrix-rules" name="rule-sets" data-option="uMatrix" type="radio" value="uMatrix">
<label for="generate-umatrix-rules">uMatrix</label>
</div>
<textarea rows="12" cols="15" id="generated-rules" readonly></textarea>
<input id="button-copy-rule-set" type="button" value="Copy">
<hr/>
<h2>History</h2>
<p>2020-03-25 (v2.1.7)</p><br/> <p>2020-03-25 (v2.1.7)</p><br/>
<ul> <ul>
<li>New CDN: "akamai-webcdn.kgstatic.net" (Akamai WebCDN)</li> <li>New CDN: "akamai-webcdn.kgstatic.net" (Akamai WebCDN)</li>

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