From 4283e9f0fd001227bb32eca060a40b7b8397ef37 Mon Sep 17 00:00:00 2001 From: nobody42 <5514211-nobody42@users.noreply.gitlab.com> Date: Tue, 24 Mar 2020 10:02:12 +0100 Subject: [PATCH] Added new endpoint for webfont --- core/mappings.js | 6 +++++- core/resources.js | 4 ++++ modules/internal/helpers.js | 2 +- pages/updates/updates.html | 1 + resources/webfont/1.6.28/webfont.jsm | 17 +++++++++++++++++ 5 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 resources/webfont/1.6.28/webfont.jsm diff --git a/core/mappings.js b/core/mappings.js index 9ed50f9a..6561933f 100644 --- a/core/mappings.js +++ b/core/mappings.js @@ -40,6 +40,8 @@ var mappings = { 'scriptaculous/{version}/scriptaculous.': resources.scriptaculous, 'swfobject/{version}/swfobject.': resources.swfobject, 'webfont/{version}/webfont.': resources.webfont, + 'webfont/{version}/webfontloader.js': resources.webfontloader, + 'webfont/1/webfont.js': resources.webfont } }, @@ -70,6 +72,7 @@ var mappings = { 'dojo/{version}/dojo.': resources.dojo, 'ember.js/{version}/ember.': resources.ember, 'ext-core/{version}/ext-core.': resources.extCore, + 'font-awesome/{version}/css/font-awesome.min.': resources.fontawesome4, 'jquery/{version}/jquery.': resources.jQuery, 'jquery/{version}/jquery.min.': resources.jQuery, 'jqueryui/{version}/jquery-ui.js': resources.jQueryUI, @@ -86,7 +89,8 @@ var mappings = { 'underscore.js/{version}/underscore.': resources.underscore, 'underscore.js/{version}/underscore-min.': resources.underscore, 'vue/{version}/vue.min.js': resources.vueJs, - 'webfont/{version}/webfont': resources.webfont + 'webfont/{version}/webfont.js': resources.webfont, + 'webfont/{version}/webfontloader.js': resources.webfont } }, // jQuery CDN (MaxCDN) diff --git a/core/resources.js b/core/resources.js index f69a632a..e307a96d 100644 --- a/core/resources.js +++ b/core/resources.js @@ -154,5 +154,9 @@ var resources = { 'webfont': { 'path': 'resources/webfont/{version}/webfont.jsm', 'type': 'application/javascript' + }, + 'webfontloader': { + 'path': 'resources/webfont/{version}/webfontloader.jsm', + 'type': 'application/javascript' } }; diff --git a/modules/internal/helpers.js b/modules/internal/helpers.js index 132e2763..f38ea089 100644 --- a/modules/internal/helpers.js +++ b/modules/internal/helpers.js @@ -356,7 +356,7 @@ helpers.setLastVersion = function (type, versionNumber) { version = '1.9.1'; } else if (type.includes('/vue/1.')) { version = '1.0.28'; - } else if (type.includes('/webfont/1.')) { + } else if (type.includes('webfont')) { version = '1.6.28'; } diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 9c66cdc3..c1720a7b 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -29,6 +29,7 @@
  • Fixed Moment.js (File extension and detection of resource name)
  • Added Vue.js v1.0.28 and page.js v1.7.1
  • Fixed file extensions to prevent warnigns of Mozillas validation tests
  • +
  • Added new endpoint for webfont
  • Please update your uBlock/uMatrix rules diff --git a/resources/webfont/1.6.28/webfont.jsm b/resources/webfont/1.6.28/webfont.jsm new file mode 100644 index 00000000..d1e856a2 --- /dev/null +++ b/resources/webfont/1.6.28/webfont.jsm @@ -0,0 +1,17 @@ +/* Web Font Loader v1.6.28 - (c) Adobe Systems, Google. License: Apache 2.0 */(function(){function aa(a,b,c){return a.call.apply(a.bind,arguments)}function ba(a,b,c){if(!a)throw Error();if(2=b.f?e():a.fonts.load(fa(b.a),b.h).then(function(a){1<=a.length?d():setTimeout(f,25)},function(){e()})}f()}),e=null,f=new Promise(function(a,d){e=setTimeout(d,b.f)});Promise.race([f,d]).then(function(){e&&(clearTimeout(e),e=null);b.g(b.a)},function(){b.j(b.a)})};function Q(a,b,c,d,e,f,g){this.v=a;this.B=b;this.c=c;this.a=d;this.s=g||"BESbswy";this.f={};this.w=e||3E3;this.u=f||null;this.m=this.j=this.h=this.g=null;this.g=new M(this.c,this.s);this.h=new M(this.c,this.s);this.j=new M(this.c,this.s);this.m=new M(this.c,this.s);a=new G(this.a.c+",serif",J(this.a));a=O(a);this.g.a.style.cssText=a;a=new G(this.a.c+",sans-serif",J(this.a));a=O(a);this.h.a.style.cssText=a;a=new G("serif",J(this.a));a=O(a);this.j.a.style.cssText=a;a=new G("sans-serif",J(this.a));a= +O(a);this.m.a.style.cssText=a;N(this.g);N(this.h);N(this.j);N(this.m)}var R={D:"serif",C:"sans-serif"},S=null;function T(){if(null===S){var a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);S=!!a&&(536>parseInt(a[1],10)||536===parseInt(a[1],10)&&11>=parseInt(a[2],10))}return S}Q.prototype.start=function(){this.f.serif=this.j.a.offsetWidth;this.f["sans-serif"]=this.m.a.offsetWidth;this.A=q();U(this)}; +function la(a,b,c){for(var d in R)if(R.hasOwnProperty(d)&&b===a.f[R[d]]&&c===a.f[R[d]])return!0;return!1}function U(a){var b=a.g.a.offsetWidth,c=a.h.a.offsetWidth,d;(d=b===a.f.serif&&c===a.f["sans-serif"])||(d=T()&&la(a,b,c));d?q()-a.A>=a.w?T()&&la(a,b,c)&&(null===a.u||a.u.hasOwnProperty(a.a.c))?V(a,a.v):V(a,a.B):ma(a):V(a,a.v)}function ma(a){setTimeout(p(function(){U(this)},a),50)}function V(a,b){setTimeout(p(function(){v(this.g.a);v(this.h.a);v(this.j.a);v(this.m.a);b(this.a)},a),0)};function W(a,b,c){this.c=a;this.a=b;this.f=0;this.m=this.j=!1;this.s=c}var X=null;W.prototype.g=function(a){var b=this.a;b.g&&w(b.f,[b.a.c("wf",a.c,J(a).toString(),"active")],[b.a.c("wf",a.c,J(a).toString(),"loading"),b.a.c("wf",a.c,J(a).toString(),"inactive")]);K(b,"fontactive",a);this.m=!0;na(this)}; +W.prototype.h=function(a){var b=this.a;if(b.g){var c=y(b.f,b.a.c("wf",a.c,J(a).toString(),"active")),d=[],e=[b.a.c("wf",a.c,J(a).toString(),"loading")];c||d.push(b.a.c("wf",a.c,J(a).toString(),"inactive"));w(b.f,d,e)}K(b,"fontinactive",a);na(this)};function na(a){0==--a.f&&a.j&&(a.m?(a=a.a,a.g&&w(a.f,[a.a.c("wf","active")],[a.a.c("wf","loading"),a.a.c("wf","inactive")]),K(a,"active")):L(a.a))};function oa(a){this.j=a;this.a=new ja;this.h=0;this.f=this.g=!0}oa.prototype.load=function(a){this.c=new ca(this.j,a.context||this.j);this.g=!1!==a.events;this.f=!1!==a.classes;pa(this,new ha(this.c,a),a)}; +function qa(a,b,c,d,e){var f=0==--a.h;(a.f||a.g)&&setTimeout(function(){var a=e||null,m=d||null||{};if(0===c.length&&f)L(b.a);else{b.f+=c.length;f&&(b.j=f);var h,l=[];for(h=0;h