diff options
author | silverwind <me@silverwind.io> | 2020-01-25 19:58:26 +0100 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2020-01-25 20:58:26 +0200 |
commit | 75a124b4490adb7d333046ecafbee209751b2bbe (patch) | |
tree | 8c749302760d2400f3adb58a36630761a7500bea /public | |
parent | 15af6bec601b13dfb3f4ee469446d196a04cbcd1 (diff) | |
download | gitea-75a124b4490adb7d333046ecafbee209751b2bbe.tar.gz gitea-75a124b4490adb7d333046ecafbee209751b2bbe.zip |
remove loadCSS and preload woff2 icon fonts (#9976)
loadCSS was used as a polyfill for rel=preload but it seems we only used
it on a single CSS file which did not help much. Changed the icon CSS to
a blocking load and preload the woff2 variants which does work in modern
browsers (Firefox currently needs the network.preload about:config
setting but should gain proper support soon).
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'public')
-rw-r--r-- | public/vendor/VERSIONS | 3 | ||||
-rw-r--r-- | public/vendor/librejs.html | 10 | ||||
-rw-r--r-- | public/vendor/plugins/cssrelpreload/LICENSE | 21 | ||||
-rw-r--r-- | public/vendor/plugins/cssrelpreload/cssrelpreload.min.js | 2 | ||||
-rw-r--r-- | public/vendor/plugins/cssrelpreload/loadCSS.min.js | 2 |
5 files changed, 0 insertions, 38 deletions
diff --git a/public/vendor/VERSIONS b/public/vendor/VERSIONS index 7593f31491..54280b70e2 100644 --- a/public/vendor/VERSIONS +++ b/public/vendor/VERSIONS @@ -23,9 +23,6 @@ Version: 2.1.10 File(s): /vendor/plugins/emojify/emojify.custom.js Version: 1.1.0 -File(s): /vendor/plugins/cssrelpreload/ -Version: 1.3.1 - File(s): /vendor/plugins/dropzone/dropzone.js Version: 4.2.0 diff --git a/public/vendor/librejs.html b/public/vendor/librejs.html index ddaa8034f8..7d29b35c56 100644 --- a/public/vendor/librejs.html +++ b/public/vendor/librejs.html @@ -61,16 +61,6 @@ <td><a href="https://github.com/Ranks/emojify.js/archive/1.1.0.tar.gz">emojify-1.1.0.tar.gz</a></td> </tr> <tr> - <td><a href="./plugins/cssrelpreload/loadCSS.min.js">loadCSS.min.js</a></td> - <td><a href="http://www.freebsd.org/copyright/freebsd-license.html">Expat</a></td> - <td><a href="https://github.com/filamentgroup/loadCSS/archive/v1.3.1.tar.gz">loadCSS-1.3.1.tar.gz</a></td> - </tr> - <tr> - <td><a href="./plugins/cssrelpreload/cssrelpreload.min.js">cssrelpreload.min.js</a></td> - <td><a href="http://www.freebsd.org/copyright/freebsd-license.html">Expat</a></td> - <td><a href="https://github.com/filamentgroup/loadCSS/archive/v1.3.1.tar.gz">loadCSS-1.3.1.tar.gz</a></td> - </tr> - <tr> <td><a href="./plugins/dropzone/dropzone.js">dropzone.js</a></td> <td><a href="https://github.com/enyo/dropzone/blob/master/LICENSE">Expat</a></td> <td><a href="https://github.com/enyo/dropzone/archive/v4.2.0.tar.gz">dropzone.js-4.2.0.tar.gz</a></td> diff --git a/public/vendor/plugins/cssrelpreload/LICENSE b/public/vendor/plugins/cssrelpreload/LICENSE deleted file mode 100644 index 733395b515..0000000000 --- a/public/vendor/plugins/cssrelpreload/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) @scottjehl, 2016 Filament Group - -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. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/public/vendor/plugins/cssrelpreload/cssrelpreload.min.js b/public/vendor/plugins/cssrelpreload/cssrelpreload.min.js deleted file mode 100644 index 1204401b09..0000000000 --- a/public/vendor/plugins/cssrelpreload/cssrelpreload.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! loadCSS rel=preload polyfill. [c]2017 Filament Group, Inc. MIT License */ -!function(a){if(a.loadCSS){var b=loadCSS.relpreload={};if(b.support=function(){try{return a.document.createElement("link").relList.supports("preload")}catch(b){return!1}},b.poly=function(){for(var b=a.document.getElementsByTagName("link"),c=0;c<b.length;c++){var d=b[c];"preload"===d.rel&&"style"===d.getAttribute("as")&&(a.loadCSS(d.href,d,d.getAttribute("media")),d.rel=null)}},!b.support()){b.poly();var c=a.setInterval(b.poly,300);a.addEventListener&&a.addEventListener("load",function(){b.poly(),a.clearInterval(c)}),a.attachEvent&&a.attachEvent("onload",function(){a.clearInterval(c)})}}}(this);
\ No newline at end of file diff --git a/public/vendor/plugins/cssrelpreload/loadCSS.min.js b/public/vendor/plugins/cssrelpreload/loadCSS.min.js deleted file mode 100644 index 7027506a30..0000000000 --- a/public/vendor/plugins/cssrelpreload/loadCSS.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! loadCSS. [c]2017 Filament Group, Inc. MIT License */ -!function(a){"use strict";var b=function(b,c,d){function e(a){return h.body?a():void setTimeout(function(){e(a)})}function f(){i.addEventListener&&i.removeEventListener("load",f),i.media=d||"all"}var g,h=a.document,i=h.createElement("link");if(c)g=c;else{var j=(h.body||h.getElementsByTagName("head")[0]).childNodes;g=j[j.length-1]}var k=h.styleSheets;i.rel="stylesheet",i.href=b,i.media="only x",e(function(){g.parentNode.insertBefore(i,c?g:g.nextSibling)});var l=function(a){for(var b=i.href,c=k.length;c--;)if(k[c].href===b)return a();setTimeout(function(){l(a)})};return i.addEventListener&&i.addEventListener("load",f),i.onloadcssdefined=l,l(f),i};"undefined"!=typeof exports?exports.loadCSS=b:a.loadCSS=b}("undefined"!=typeof global?global:this);
\ No newline at end of file |