mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2024-12-23 00:25:15 +01:00
Fixed: WebFontLoader (#139)
This commit is contained in:
parent
17b3056215
commit
ce6419b601
@ -199,8 +199,8 @@ const Regex = {
|
||||
'JSDELIVR_COMBINE': /cdn\.jsdelivr\.net.*\/combine.*jquery.*hogan.*algoliasearch.*autocomplete.*/,
|
||||
'BOOTSTRAP_DATEPICKER_3': /\/bootstrap-datepicker3.*\.css/,
|
||||
'BOOTSTRAP_DATEPICKER': /\/bootstrap-datepicker.*\.css/,
|
||||
'FONT_AWESOME': /use\.fontawesome\.com\/fa-code\.css/,
|
||||
'FONT_AWESOME_WITH_CODE': /use\.fontawesome\.com\/[a-z0-9]{10}\.js/
|
||||
'FONT_AWESOME': /use\.fontawesome\.com\/fa-loader\.css/,
|
||||
'FONT_AWESOME_WITH_CODE': /use\.fontawesome\.com\/[a-z0-9]{10}\.(js|css)/
|
||||
};
|
||||
|
||||
const Links = {
|
||||
|
@ -800,8 +800,8 @@ mappings.cdn = {
|
||||
'releases/v{version}/css/all': resources.fontawesome5CSS,
|
||||
'releases/v{version}/css/v4-shims': resources.fontawesome5CSSv4shims,
|
||||
'releases/v{version}/js/': resources.fontawesome5JS,
|
||||
'fa-code.js': resources.webfontloaderFontawesomeJS,
|
||||
'fa-code.css': resources.webfontloaderFontawesomeCSS,
|
||||
'fa-loader.js': resources.webfontloaderFontawesomeJS,
|
||||
'fa-loader.css': resources.webfontloaderFontawesomeCSS,
|
||||
'webfontloader/{version}/webfontload': resources.webfontloader
|
||||
}
|
||||
},
|
||||
|
@ -807,11 +807,11 @@ var resources = {
|
||||
'type': 'application/javascript'
|
||||
},
|
||||
'webfontloaderFontawesomeJS': {
|
||||
'path': 'resources/webfont/fa-code.jsm',
|
||||
'path': 'resources/webfont/fa-loader.jsm',
|
||||
'type': 'application/javascript'
|
||||
},
|
||||
'webfontloaderFontawesomeCSS': {
|
||||
'path': 'resources/webfont/fa-code.css',
|
||||
'path': 'resources/webfont/fa-loader.css',
|
||||
'type': 'text/css'
|
||||
},
|
||||
// WebRTC adapter
|
||||
|
@ -79,11 +79,12 @@ shorthands.specialFiles = function (channelHost, channelPath, searchString) {
|
||||
'bundle': ''
|
||||
};
|
||||
} else if (Regex.FONT_AWESOME_WITH_CODE.test(channelHost + channelPath)) {
|
||||
let fileExtension = channelPath.endsWith('css') ? 'css' : 'jsm';
|
||||
return {
|
||||
'source': channelHost,
|
||||
'versionRequested': '4.6.3',
|
||||
'versionDelivered': '4.7.0',
|
||||
'path': 'resources/webfont/fa-loader.jsm',
|
||||
'path': 'resources/webfont/fa-loader.' + fileExtension,
|
||||
'bundle': ''
|
||||
};
|
||||
} else if ((channelHost + channelPath) === 'cdn.jsdelivr.net/npm/vue') {
|
||||
|
@ -30,6 +30,7 @@
|
||||
<li>Updated: Bootstrap v4.5.0 -> v4.5.3 (<a href="https://codeberg.org/nobody/LocalCDN/issues/135">#135</a>)</li>
|
||||
<li>Updated: Terminology (<a href="https://codeberg.org/nobody/LocalCDN/issues/138">#138</a>)</li>
|
||||
<li>Added: Font Awesome 'v4-shims.css' v5.15.1 (<a href="https://codeberg.org/nobody/LocalCDN/issues/137">#137</a>)</li>
|
||||
<li>Fixed: WebFontLoader (<a href="https://codeberg.org/nobody/LocalCDN/issues/139">#139</a>)</li>
|
||||
</ul>
|
||||
<div id="generator-section">
|
||||
<div class="topic-label">
|
||||
|
@ -3,7 +3,7 @@
|
||||
* File modified by nobody/LocalCDN
|
||||
*
|
||||
*/
|
||||
@import url('../fontawesome/4.7.0/css/font-awesome-css.min.css');
|
||||
@import url('../fontawesome/4.7.0/css/font-awesome.min.css');
|
||||
/* FONT PATH
|
||||
* -------------------------- */
|
||||
@font-face {
|
||||
|
@ -7,7 +7,7 @@ window.FontAwesomeConfig = {
|
||||
|
||||
useUrl: "use.fontawesome.com",
|
||||
faCdnUrl: "https://cdn.fontawesome.com:443",
|
||||
code: "fa-code",
|
||||
code: "fa-loader",
|
||||
webFontLoaderVersion: "1.6.24"
|
||||
};
|
||||
window.FontAwesome||(window.FontAwesome={}),function(){function a(a){this.el=a;for(var b=a.className.replace(/^\s+|\s+$/g,"").split(/\s+/),c=0;c<b.length;c++)d.call(this,b[c])}function b(a,b,c){Object.defineProperty?Object.defineProperty(a,b,{get:c}):a.__defineGetter__(b,c)}if(!("undefined"==typeof window.Element||"classList"in document.documentElement)){var c=Array.prototype,d=c.push,e=c.splice,f=c.join;a.prototype={add:function(a){this.contains(a)||(d.call(this,a),this.el.className=this.toString())},contains:function(a){return-1!=this.el.className.indexOf(a)},item:function(a){return this[a]||null},remove:function(a){if(this.contains(a)){for(var b=0;b<this.length&&this[b]!=a;b++);e.call(this,b,1),this.el.className=this.toString()}},toString:function(){return f.call(this," ")},toggle:function(a){return this.contains(a)?this.remove(a):this.add(a),this.contains(a)}},window.DOMTokenList=a,b(Element.prototype,"classList",function(){return new a(this)})}}(),function(a,b,c){function d(){}function e(a){var c,d=[],e=b,f=e.documentElement.doScroll,g="DOMContentLoaded",h=(f?/^loaded|^c/:/^loaded|^i|^c/).test(e.readyState);h||e.addEventListener(g,c=function(){for(e.removeEventListener(g,c),h=1;c=d.shift();)c()}),h?setTimeout(a,0):d.push(a)}function f(a){var b=!1;return p.split(",").forEach(function(c){var d=new RegExp(c.trim().replace(".","\\.").replace("*","(.*)"));a.match(d)&&(b=!0)}),b}function g(){var a,c,d,e=b.querySelectorAll(".fa");Array.prototype.forEach.call(e,function(e){a=e.getAttribute("title"),e.setAttribute("aria-hidden","true"),c=e.nextElementSibling?!e.nextElementSibling.classList.contains("sr-only"):!0,a&&c&&(d=b.createElement("span"),d.innerHTML=a,d.classList.add("sr-only"),e.parentNode.insertBefore(d,e.nextSibling))})}function h(a){"undefined"!=typeof MutationObserver&&new MutationObserver(a).observe(b,{childList:!0,subtree:!0})}function i(){var a=b.createElement("link");a.href="https://"+q+"/"+s+".css",a.media="all",a.rel="stylesheet",b.getElementsByTagName("head")[0].appendChild(a)}function j(){var c,e=b.createElement("script"),f={},g=b.scripts[0];a.WebFontConfig||(a.WebFontConfig={}),f=a.WebFontConfig,f.custom||(f.custom={}),f.custom.families||(f.custom.families=[]),f.custom.urls||(f.custom.urls=[]),f.custom.testStrings||(f.custom.testStrings={}),f.custom.families.push("FontAwesome"),f.custom.urls.push("https://"+q+"/"+s+".css"),f.custom.testStrings.FontAwesome="",c=f.fontactive||d,f.fontactive=function(b,e){var f=(a.FontAwesomeHooks||{}).loaded||d;c(b,e),"FontAwesome"===b&&"n4"===e&&f()},e.src="https://"+q+"/webfontloader/"+t+"/webfontloader.js",g.parentNode.insertBefore(e,g)}function k(){var a=b.createElement("script"),c=b.scripts[0];a.src=r+"/js/stats.js",c.parentNode.appendChild(a)}function l(){return n&&(e(g),h(g)),o&&f(location.host)&&k(),m?j():i()}var m=a.FontAwesomeConfig.asyncEnabled,n=a.FontAwesomeConfig.autoAccessibilityEnabled,o=a.FontAwesomeConfig.reportingEnabled,p=a.FontAwesomeConfig.reportingDomains,q=a.FontAwesomeConfig.useUrl,r=a.FontAwesomeConfig.faCdnUrl,s=a.FontAwesomeConfig.code,t=a.FontAwesomeConfig.webFontLoaderVersion;a.FontAwesome.load=l}(this,document);try{window.FontAwesome.load()}catch(e){}
|
||||
|
Loading…
Reference in New Issue
Block a user