mirror of
https://github.com/danog/inline-critical.git
synced 2025-01-22 05:41:54 +01:00
Upgrade loadCSS dep to 2.0.0 and update code and make it work with this version (#229)
This commit is contained in:
parent
bee3708791
commit
5317ba2f55
2
index.js
2
index.js
@ -33,7 +33,7 @@ function getScript() {
|
||||
const loadCssMain = resolve.sync('fg-loadcss');
|
||||
const loadCssBase = path.dirname(loadCssMain);
|
||||
|
||||
const loadCSS = read(loadCssMain) + read(path.join(loadCssBase, 'cssrelpreload.js'));
|
||||
const loadCSS = read(path.join(loadCssBase, 'cssrelpreload.js'));
|
||||
return UglifyJS.minify(loadCSS).code;
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
"css": "2.2.1",
|
||||
"detect-indent": "5.0.0",
|
||||
"dom-serializer": "0.1.0",
|
||||
"fg-loadcss": "1.3.1",
|
||||
"fg-loadcss": "^2.0.0",
|
||||
"get-stdin": "5.0.1",
|
||||
"indent-string": "3.1.0",
|
||||
"lodash": "4.17.4",
|
||||
|
@ -293,7 +293,7 @@
|
||||
<noscript><link rel="stylesheet" href="/css/cartoon.18d89c7f.css"></noscript>
|
||||
<link rel="preload" href="/bower_components/bootstrap/dist/css/bootstrap.d561412a.css" as="style" onload="this.rel='stylesheet'">
|
||||
<noscript><link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.d561412a.css"></noscript>
|
||||
<script>!function(e){"use strict";var t=function(t,n,r){function o(e){if(i.body)return e();setTimeout(function(){o(e)})}function a(){d.addEventListener&&d.removeEventListener("load",a),d.media=r||"all"}var l,i=e.document,d=i.createElement("link");if(n)l=n;else{var s=(i.body||i.getElementsByTagName("head")[0]).childNodes;l=s[s.length-1]}var u=i.styleSheets;d.rel="stylesheet",d.href=t,d.media="only x",o(function(){l.parentNode.insertBefore(d,n?l:l.nextSibling)});var f=function(e){for(var t=d.href,n=u.length;n--;)if(u[n].href===t)return e();setTimeout(function(){f(e)})};return d.addEventListener&&d.addEventListener("load",a),d.onloadcssdefined=f,f(a),d};"undefined"!=typeof exports?exports.loadCSS=t:e.loadCSS=t}("undefined"!=typeof global?global:this),function(e){if(e.loadCSS){var t=loadCSS.relpreload={};if(t.support=function(){try{return e.document.createElement("link").relList.supports("preload")}catch(e){return!1}},t.poly=function(){for(var t=e.document.getElementsByTagName("link"),n=0;n<t.length;n++){var r=t[n];"preload"===r.rel&&"style"===r.getAttribute("as")&&(e.loadCSS(r.href,r,r.getAttribute("media")),r.rel=null)}},!t.support()){t.poly();var n=e.setInterval(t.poly,300);e.addEventListener&&e.addEventListener("load",function(){t.poly(),e.clearInterval(n)}),e.attachEvent&&e.attachEvent("onload",function(){e.clearInterval(n)})}}}(this);</script>
|
||||
<script>!function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};e.support=function(){try{return t.document.createElement("link").relList.supports("preload")}catch(t){return!1}},e.bindMediaToggle=function(t,e){function a(){t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),setTimeout(a,3e3)},e.poly=function(){if(!e.support()){for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];if("preload"===o.rel&&"style"===o.getAttribute("as")&&!o.getAttribute("data-loadcss")){var l=o.media||"all";e.bindMediaToggle(o,l),o.media="x",o.rel="stylesheet",o.setAttribute("data-loadcss",!0)}}var d=t.setInterval(e.poly,300);t.addEventListener?t.addEventListener("load",function(){e.poly(),t.clearInterval(d)}):t.attachEvent&&t.attachEvent("onload",function(){e.poly(),t.clearInterval(d)})}},e.poly(),"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}("undefined"!=typeof global?global:this);</script>
|
||||
<!-- endbuild -->
|
||||
|
||||
</head>
|
||||
|
@ -293,7 +293,7 @@
|
||||
<noscript><link rel="stylesheet" href="css/cartoon.18d89c7f.css"></noscript>
|
||||
<link rel="preload" href="bower_components/bootstrap/dist/css/bootstrap.d561412a.css" as="style" onload="this.rel='stylesheet'">
|
||||
<noscript><link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.d561412a.css"></noscript>
|
||||
<script>!function(e){"use strict";var t=function(t,n,r){function o(e){if(i.body)return e();setTimeout(function(){o(e)})}function a(){d.addEventListener&&d.removeEventListener("load",a),d.media=r||"all"}var l,i=e.document,d=i.createElement("link");if(n)l=n;else{var s=(i.body||i.getElementsByTagName("head")[0]).childNodes;l=s[s.length-1]}var u=i.styleSheets;d.rel="stylesheet",d.href=t,d.media="only x",o(function(){l.parentNode.insertBefore(d,n?l:l.nextSibling)});var f=function(e){for(var t=d.href,n=u.length;n--;)if(u[n].href===t)return e();setTimeout(function(){f(e)})};return d.addEventListener&&d.addEventListener("load",a),d.onloadcssdefined=f,f(a),d};"undefined"!=typeof exports?exports.loadCSS=t:e.loadCSS=t}("undefined"!=typeof global?global:this),function(e){if(e.loadCSS){var t=loadCSS.relpreload={};if(t.support=function(){try{return e.document.createElement("link").relList.supports("preload")}catch(e){return!1}},t.poly=function(){for(var t=e.document.getElementsByTagName("link"),n=0;n<t.length;n++){var r=t[n];"preload"===r.rel&&"style"===r.getAttribute("as")&&(e.loadCSS(r.href,r,r.getAttribute("media")),r.rel=null)}},!t.support()){t.poly();var n=e.setInterval(t.poly,300);e.addEventListener&&e.addEventListener("load",function(){t.poly(),e.clearInterval(n)}),e.attachEvent&&e.attachEvent("onload",function(){e.clearInterval(n)})}}}(this);</script>
|
||||
<script>!function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};e.support=function(){try{return t.document.createElement("link").relList.supports("preload")}catch(t){return!1}},e.bindMediaToggle=function(t,e){function a(){t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),setTimeout(a,3e3)},e.poly=function(){if(!e.support()){for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];if("preload"===o.rel&&"style"===o.getAttribute("as")&&!o.getAttribute("data-loadcss")){var l=o.media||"all";e.bindMediaToggle(o,l),o.media="x",o.rel="stylesheet",o.setAttribute("data-loadcss",!0)}}var d=t.setInterval(e.poly,300);t.addEventListener?t.addEventListener("load",function(){e.poly(),t.clearInterval(d)}):t.attachEvent&&t.attachEvent("onload",function(){e.poly(),t.clearInterval(d)})}},e.poly(),"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}("undefined"!=typeof global?global:this);</script>
|
||||
<!-- endbuild -->
|
||||
|
||||
</head>
|
||||
|
@ -295,7 +295,7 @@
|
||||
<noscript><link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css"></noscript>
|
||||
<link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="preload" type="text/css" as="style" onload="this.rel='stylesheet'">
|
||||
<noscript><link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css"></noscript>
|
||||
<script>!function(e){"use strict";var t=function(t,n,r){function o(e){if(i.body)return e();setTimeout(function(){o(e)})}function a(){d.addEventListener&&d.removeEventListener("load",a),d.media=r||"all"}var l,i=e.document,d=i.createElement("link");if(n)l=n;else{var s=(i.body||i.getElementsByTagName("head")[0]).childNodes;l=s[s.length-1]}var u=i.styleSheets;d.rel="stylesheet",d.href=t,d.media="only x",o(function(){l.parentNode.insertBefore(d,n?l:l.nextSibling)});var f=function(e){for(var t=d.href,n=u.length;n--;)if(u[n].href===t)return e();setTimeout(function(){f(e)})};return d.addEventListener&&d.addEventListener("load",a),d.onloadcssdefined=f,f(a),d};"undefined"!=typeof exports?exports.loadCSS=t:e.loadCSS=t}("undefined"!=typeof global?global:this),function(e){if(e.loadCSS){var t=loadCSS.relpreload={};if(t.support=function(){try{return e.document.createElement("link").relList.supports("preload")}catch(e){return!1}},t.poly=function(){for(var t=e.document.getElementsByTagName("link"),n=0;n<t.length;n++){var r=t[n];"preload"===r.rel&&"style"===r.getAttribute("as")&&(e.loadCSS(r.href,r,r.getAttribute("media")),r.rel=null)}},!t.support()){t.poly();var n=e.setInterval(t.poly,300);e.addEventListener&&e.addEventListener("load",function(){t.poly(),e.clearInterval(n)}),e.attachEvent&&e.attachEvent("onload",function(){e.clearInterval(n)})}}}(this);</script>
|
||||
<script>!function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};e.support=function(){try{return t.document.createElement("link").relList.supports("preload")}catch(t){return!1}},e.bindMediaToggle=function(t,e){function a(){t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),setTimeout(a,3e3)},e.poly=function(){if(!e.support()){for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];if("preload"===o.rel&&"style"===o.getAttribute("as")&&!o.getAttribute("data-loadcss")){var l=o.media||"all";e.bindMediaToggle(o,l),o.media="x",o.rel="stylesheet",o.setAttribute("data-loadcss",!0)}}var d=t.setInterval(e.poly,300);t.addEventListener?t.addEventListener("load",function(){e.poly(),t.clearInterval(d)}):t.attachEvent&&t.attachEvent("onload",function(){e.poly(),t.clearInterval(d)})}},e.poly(),"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}("undefined"!=typeof global?global:this);</script>
|
||||
<!-- endbuild -->
|
||||
|
||||
</head>
|
||||
|
@ -295,7 +295,7 @@
|
||||
<noscript><link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.d561412a.css"></noscript>
|
||||
<link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="preload" type="text/css" as="style" onload="this.rel='stylesheet'">
|
||||
<noscript><link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css"></noscript>
|
||||
<script>!function(e){"use strict";var t=function(t,n,r){function o(e){if(i.body)return e();setTimeout(function(){o(e)})}function a(){d.addEventListener&&d.removeEventListener("load",a),d.media=r||"all"}var l,i=e.document,d=i.createElement("link");if(n)l=n;else{var s=(i.body||i.getElementsByTagName("head")[0]).childNodes;l=s[s.length-1]}var u=i.styleSheets;d.rel="stylesheet",d.href=t,d.media="only x",o(function(){l.parentNode.insertBefore(d,n?l:l.nextSibling)});var f=function(e){for(var t=d.href,n=u.length;n--;)if(u[n].href===t)return e();setTimeout(function(){f(e)})};return d.addEventListener&&d.addEventListener("load",a),d.onloadcssdefined=f,f(a),d};"undefined"!=typeof exports?exports.loadCSS=t:e.loadCSS=t}("undefined"!=typeof global?global:this),function(e){if(e.loadCSS){var t=loadCSS.relpreload={};if(t.support=function(){try{return e.document.createElement("link").relList.supports("preload")}catch(e){return!1}},t.poly=function(){for(var t=e.document.getElementsByTagName("link"),n=0;n<t.length;n++){var r=t[n];"preload"===r.rel&&"style"===r.getAttribute("as")&&(e.loadCSS(r.href,r,r.getAttribute("media")),r.rel=null)}},!t.support()){t.poly();var n=e.setInterval(t.poly,300);e.addEventListener&&e.addEventListener("load",function(){t.poly(),e.clearInterval(n)}),e.attachEvent&&e.attachEvent("onload",function(){e.clearInterval(n)})}}}(this);</script>
|
||||
<script>!function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};e.support=function(){try{return t.document.createElement("link").relList.supports("preload")}catch(t){return!1}},e.bindMediaToggle=function(t,e){function a(){t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),setTimeout(a,3e3)},e.poly=function(){if(!e.support()){for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];if("preload"===o.rel&&"style"===o.getAttribute("as")&&!o.getAttribute("data-loadcss")){var l=o.media||"all";e.bindMediaToggle(o,l),o.media="x",o.rel="stylesheet",o.setAttribute("data-loadcss",!0)}}var d=t.setInterval(e.poly,300);t.addEventListener?t.addEventListener("load",function(){e.poly(),t.clearInterval(d)}):t.attachEvent&&t.attachEvent("onload",function(){e.poly(),t.clearInterval(d)})}},e.poly(),"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}("undefined"!=typeof global?global:this);</script>
|
||||
<!-- endbuild -->
|
||||
|
||||
</head>
|
||||
|
@ -294,7 +294,7 @@
|
||||
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
|
||||
<link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="preload" type="text/css" as="style" onload="this.rel='stylesheet'">
|
||||
<noscript><link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css"></noscript>
|
||||
<script>!function(e){"use strict";var t=function(t,n,r){function o(e){if(i.body)return e();setTimeout(function(){o(e)})}function a(){d.addEventListener&&d.removeEventListener("load",a),d.media=r||"all"}var l,i=e.document,d=i.createElement("link");if(n)l=n;else{var s=(i.body||i.getElementsByTagName("head")[0]).childNodes;l=s[s.length-1]}var u=i.styleSheets;d.rel="stylesheet",d.href=t,d.media="only x",o(function(){l.parentNode.insertBefore(d,n?l:l.nextSibling)});var f=function(e){for(var t=d.href,n=u.length;n--;)if(u[n].href===t)return e();setTimeout(function(){f(e)})};return d.addEventListener&&d.addEventListener("load",a),d.onloadcssdefined=f,f(a),d};"undefined"!=typeof exports?exports.loadCSS=t:e.loadCSS=t}("undefined"!=typeof global?global:this),function(e){if(e.loadCSS){var t=loadCSS.relpreload={};if(t.support=function(){try{return e.document.createElement("link").relList.supports("preload")}catch(e){return!1}},t.poly=function(){for(var t=e.document.getElementsByTagName("link"),n=0;n<t.length;n++){var r=t[n];"preload"===r.rel&&"style"===r.getAttribute("as")&&(e.loadCSS(r.href,r,r.getAttribute("media")),r.rel=null)}},!t.support()){t.poly();var n=e.setInterval(t.poly,300);e.addEventListener&&e.addEventListener("load",function(){t.poly(),e.clearInterval(n)}),e.attachEvent&&e.attachEvent("onload",function(){e.clearInterval(n)})}}}(this);</script>
|
||||
<script>!function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};e.support=function(){try{return t.document.createElement("link").relList.supports("preload")}catch(t){return!1}},e.bindMediaToggle=function(t,e){function a(){t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),setTimeout(a,3e3)},e.poly=function(){if(!e.support()){for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];if("preload"===o.rel&&"style"===o.getAttribute("as")&&!o.getAttribute("data-loadcss")){var l=o.media||"all";e.bindMediaToggle(o,l),o.media="x",o.rel="stylesheet",o.setAttribute("data-loadcss",!0)}}var d=t.setInterval(e.poly,300);t.addEventListener?t.addEventListener("load",function(){e.poly(),t.clearInterval(d)}):t.attachEvent&&t.attachEvent("onload",function(){e.poly(),t.clearInterval(d)})}},e.poly(),"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}("undefined"!=typeof global?global:this);</script>
|
||||
<!-- endbuild -->
|
||||
|
||||
</head>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<noscript><link rel="stylesheet" href="css/main.css"></noscript>
|
||||
<link rel="preload" href="bower_components/bootstrap/dist/css/bootstrap.css" as="style" onload="this.rel='stylesheet'">
|
||||
<noscript><link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css"></noscript>
|
||||
<script>!function(e){"use strict";var t=function(t,n,r){function o(e){if(i.body)return e();setTimeout(function(){o(e)})}function a(){d.addEventListener&&d.removeEventListener("load",a),d.media=r||"all"}var l,i=e.document,d=i.createElement("link");if(n)l=n;else{var s=(i.body||i.getElementsByTagName("head")[0]).childNodes;l=s[s.length-1]}var u=i.styleSheets;d.rel="stylesheet",d.href=t,d.media="only x",o(function(){l.parentNode.insertBefore(d,n?l:l.nextSibling)});var f=function(e){for(var t=d.href,n=u.length;n--;)if(u[n].href===t)return e();setTimeout(function(){f(e)})};return d.addEventListener&&d.addEventListener("load",a),d.onloadcssdefined=f,f(a),d};"undefined"!=typeof exports?exports.loadCSS=t:e.loadCSS=t}("undefined"!=typeof global?global:this),function(e){if(e.loadCSS){var t=loadCSS.relpreload={};if(t.support=function(){try{return e.document.createElement("link").relList.supports("preload")}catch(e){return!1}},t.poly=function(){for(var t=e.document.getElementsByTagName("link"),n=0;n<t.length;n++){var r=t[n];"preload"===r.rel&&"style"===r.getAttribute("as")&&(e.loadCSS(r.href,r,r.getAttribute("media")),r.rel=null)}},!t.support()){t.poly();var n=e.setInterval(t.poly,300);e.addEventListener&&e.addEventListener("load",function(){t.poly(),e.clearInterval(n)}),e.attachEvent&&e.attachEvent("onload",function(){e.clearInterval(n)})}}}(this);</script>
|
||||
<script>!function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};e.support=function(){try{return t.document.createElement("link").relList.supports("preload")}catch(t){return!1}},e.bindMediaToggle=function(t,e){function a(){t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),setTimeout(a,3e3)},e.poly=function(){if(!e.support()){for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];if("preload"===o.rel&&"style"===o.getAttribute("as")&&!o.getAttribute("data-loadcss")){var l=o.media||"all";e.bindMediaToggle(o,l),o.media="x",o.rel="stylesheet",o.setAttribute("data-loadcss",!0)}}var d=t.setInterval(e.poly,300);t.addEventListener?t.addEventListener("load",function(){e.poly(),t.clearInterval(d)}):t.attachEvent&&t.attachEvent("onload",function(){e.poly(),t.clearInterval(d)})}},e.poly(),"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}("undefined"!=typeof global?global:this);</script>
|
||||
<!-- endbuild -->
|
||||
|
||||
</head>
|
||||
|
@ -293,7 +293,7 @@
|
||||
<noscript><link rel="stylesheet" href="/css/main.css"></noscript>
|
||||
<link rel="preload" href="/bower_components/bootstrap/dist/css/bootstrap.css" as="style" onload="this.rel='stylesheet'">
|
||||
<noscript><link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.css"></noscript>
|
||||
<script>!function(e){"use strict";var t=function(t,n,r){function o(e){if(i.body)return e();setTimeout(function(){o(e)})}function a(){d.addEventListener&&d.removeEventListener("load",a),d.media=r||"all"}var l,i=e.document,d=i.createElement("link");if(n)l=n;else{var s=(i.body||i.getElementsByTagName("head")[0]).childNodes;l=s[s.length-1]}var u=i.styleSheets;d.rel="stylesheet",d.href=t,d.media="only x",o(function(){l.parentNode.insertBefore(d,n?l:l.nextSibling)});var f=function(e){for(var t=d.href,n=u.length;n--;)if(u[n].href===t)return e();setTimeout(function(){f(e)})};return d.addEventListener&&d.addEventListener("load",a),d.onloadcssdefined=f,f(a),d};"undefined"!=typeof exports?exports.loadCSS=t:e.loadCSS=t}("undefined"!=typeof global?global:this),function(e){if(e.loadCSS){var t=loadCSS.relpreload={};if(t.support=function(){try{return e.document.createElement("link").relList.supports("preload")}catch(e){return!1}},t.poly=function(){for(var t=e.document.getElementsByTagName("link"),n=0;n<t.length;n++){var r=t[n];"preload"===r.rel&&"style"===r.getAttribute("as")&&(e.loadCSS(r.href,r,r.getAttribute("media")),r.rel=null)}},!t.support()){t.poly();var n=e.setInterval(t.poly,300);e.addEventListener&&e.addEventListener("load",function(){t.poly(),e.clearInterval(n)}),e.attachEvent&&e.attachEvent("onload",function(){e.clearInterval(n)})}}}(this);</script>
|
||||
<script>!function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};e.support=function(){try{return t.document.createElement("link").relList.supports("preload")}catch(t){return!1}},e.bindMediaToggle=function(t,e){function a(){t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),setTimeout(a,3e3)},e.poly=function(){if(!e.support()){for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];if("preload"===o.rel&&"style"===o.getAttribute("as")&&!o.getAttribute("data-loadcss")){var l=o.media||"all";e.bindMediaToggle(o,l),o.media="x",o.rel="stylesheet",o.setAttribute("data-loadcss",!0)}}var d=t.setInterval(e.poly,300);t.addEventListener?t.addEventListener("load",function(){e.poly(),t.clearInterval(d)}):t.attachEvent&&t.attachEvent("onload",function(){e.poly(),t.clearInterval(d)})}},e.poly(),"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}("undefined"!=typeof global?global:this);</script>
|
||||
<!-- endbuild -->
|
||||
|
||||
</head>
|
||||
|
@ -293,7 +293,7 @@
|
||||
<noscript><link rel="stylesheet" href="css/main.css"></noscript>
|
||||
<link rel="preload" href="bower_components/bootstrap/dist/css/bootstrap.css" as="style" onload="this.rel='stylesheet'">
|
||||
<noscript><link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css"></noscript>
|
||||
<script>!function(e){"use strict";var t=function(t,n,r){function o(e){if(i.body)return e();setTimeout(function(){o(e)})}function a(){d.addEventListener&&d.removeEventListener("load",a),d.media=r||"all"}var l,i=e.document,d=i.createElement("link");if(n)l=n;else{var s=(i.body||i.getElementsByTagName("head")[0]).childNodes;l=s[s.length-1]}var u=i.styleSheets;d.rel="stylesheet",d.href=t,d.media="only x",o(function(){l.parentNode.insertBefore(d,n?l:l.nextSibling)});var f=function(e){for(var t=d.href,n=u.length;n--;)if(u[n].href===t)return e();setTimeout(function(){f(e)})};return d.addEventListener&&d.addEventListener("load",a),d.onloadcssdefined=f,f(a),d};"undefined"!=typeof exports?exports.loadCSS=t:e.loadCSS=t}("undefined"!=typeof global?global:this),function(e){if(e.loadCSS){var t=loadCSS.relpreload={};if(t.support=function(){try{return e.document.createElement("link").relList.supports("preload")}catch(e){return!1}},t.poly=function(){for(var t=e.document.getElementsByTagName("link"),n=0;n<t.length;n++){var r=t[n];"preload"===r.rel&&"style"===r.getAttribute("as")&&(e.loadCSS(r.href,r,r.getAttribute("media")),r.rel=null)}},!t.support()){t.poly();var n=e.setInterval(t.poly,300);e.addEventListener&&e.addEventListener("load",function(){t.poly(),e.clearInterval(n)}),e.attachEvent&&e.attachEvent("onload",function(){e.clearInterval(n)})}}}(this);</script>
|
||||
<script>!function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};e.support=function(){try{return t.document.createElement("link").relList.supports("preload")}catch(t){return!1}},e.bindMediaToggle=function(t,e){function a(){t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),setTimeout(a,3e3)},e.poly=function(){if(!e.support()){for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];if("preload"===o.rel&&"style"===o.getAttribute("as")&&!o.getAttribute("data-loadcss")){var l=o.media||"all";e.bindMediaToggle(o,l),o.media="x",o.rel="stylesheet",o.setAttribute("data-loadcss",!0)}}var d=t.setInterval(e.poly,300);t.addEventListener?t.addEventListener("load",function(){e.poly(),t.clearInterval(d)}):t.attachEvent&&t.attachEvent("onload",function(){e.poly(),t.clearInterval(d)})}},e.poly(),"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}("undefined"!=typeof global?global:this);</script>
|
||||
<!-- endbuild -->
|
||||
|
||||
</head>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<noscript><link rel="stylesheet" href="css/main.css"></noscript>
|
||||
<link rel="preload" href="bower_components/bootstrap/dist/css/bootstrap.css" as="style" onload="this.rel='stylesheet'">
|
||||
<noscript><link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css"></noscript>
|
||||
<script>!function(e){"use strict";var t=function(t,n,r){function o(e){if(i.body)return e();setTimeout(function(){o(e)})}function a(){d.addEventListener&&d.removeEventListener("load",a),d.media=r||"all"}var l,i=e.document,d=i.createElement("link");if(n)l=n;else{var s=(i.body||i.getElementsByTagName("head")[0]).childNodes;l=s[s.length-1]}var u=i.styleSheets;d.rel="stylesheet",d.href=t,d.media="only x",o(function(){l.parentNode.insertBefore(d,n?l:l.nextSibling)});var f=function(e){for(var t=d.href,n=u.length;n--;)if(u[n].href===t)return e();setTimeout(function(){f(e)})};return d.addEventListener&&d.addEventListener("load",a),d.onloadcssdefined=f,f(a),d};"undefined"!=typeof exports?exports.loadCSS=t:e.loadCSS=t}("undefined"!=typeof global?global:this),function(e){if(e.loadCSS){var t=loadCSS.relpreload={};if(t.support=function(){try{return e.document.createElement("link").relList.supports("preload")}catch(e){return!1}},t.poly=function(){for(var t=e.document.getElementsByTagName("link"),n=0;n<t.length;n++){var r=t[n];"preload"===r.rel&&"style"===r.getAttribute("as")&&(e.loadCSS(r.href,r,r.getAttribute("media")),r.rel=null)}},!t.support()){t.poly();var n=e.setInterval(t.poly,300);e.addEventListener&&e.addEventListener("load",function(){t.poly(),e.clearInterval(n)}),e.attachEvent&&e.attachEvent("onload",function(){e.clearInterval(n)})}}}(this);</script>
|
||||
<script>!function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};e.support=function(){try{return t.document.createElement("link").relList.supports("preload")}catch(t){return!1}},e.bindMediaToggle=function(t,e){function a(){t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),setTimeout(a,3e3)},e.poly=function(){if(!e.support()){for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];if("preload"===o.rel&&"style"===o.getAttribute("as")&&!o.getAttribute("data-loadcss")){var l=o.media||"all";e.bindMediaToggle(o,l),o.media="x",o.rel="stylesheet",o.setAttribute("data-loadcss",!0)}}var d=t.setInterval(e.poly,300);t.addEventListener?t.addEventListener("load",function(){e.poly(),t.clearInterval(d)}):t.attachEvent&&t.attachEvent("onload",function(){e.poly(),t.clearInterval(d)})}},e.poly(),"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}("undefined"!=typeof global?global:this);</script>
|
||||
<!-- endbuild -->
|
||||
|
||||
</head>
|
||||
|
@ -16,7 +16,7 @@
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
</noscript>
|
||||
<script id="loadcss">
|
||||
!function(e){"use strict";var t=function(t,n,r){function o(e){return i.body?e():void setTimeout(function(){o(e)})}function a(){d.addEventListener&&d.removeEventListener("load",a),d.media=r||"all"}var l,i=e.document,d=i.createElement("link");if(n)l=n;else{var s=(i.body||i.getElementsByTagName("head")[0]).childNodes;l=s[s.length-1]}var u=i.styleSheets;d.rel="stylesheet",d.href=t,d.media="only x",o(function(){l.parentNode.insertBefore(d,n?l:l.nextSibling)});var f=function(e){for(var t=d.href,n=u.length;n--;)if(u[n].href===t)return e();setTimeout(function(){f(e)})};return d.addEventListener&&d.addEventListener("load",a),d.onloadcssdefined=f,f(a),d};"undefined"!=typeof exports?exports.loadCSS=t:e.loadCSS=t}("undefined"!=typeof global?global:this),function(e){if(e.loadCSS){var t=loadCSS.relpreload={};if(t.support=function(){try{return e.document.createElement("link").relList.supports("preload")}catch(t){return!1}},t.poly=function(){for(var t=e.document.getElementsByTagName("link"),n=0;n<t.length;n++){var r=t[n];"preload"===r.rel&&"style"===r.getAttribute("as")&&(e.loadCSS(r.href,r),r.rel=null)}},!t.support()){t.poly();var n=e.setInterval(t.poly,300);e.addEventListener&&e.addEventListener("load",function(){e.clearInterval(n)}),e.attachEvent&&e.attachEvent("onload",function(){e.clearInterval(n)})}}}(this);
|
||||
!function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};e.support=function(){try{return t.document.createElement("link").relList.supports("preload")}catch(t){return!1}},e.bindMediaToggle=function(t,e){function a(){t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),setTimeout(a,3e3)},e.poly=function(){if(!e.support()){for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];if("preload"===o.rel&&"style"===o.getAttribute("as")&&!o.getAttribute("data-loadcss")){var l=o.media||"all";e.bindMediaToggle(o,l),o.media="x",o.rel="stylesheet",o.setAttribute("data-loadcss",!0)}}var d=t.setInterval(e.poly,300);t.addEventListener?t.addEventListener("load",function(){e.poly(),t.clearInterval(d)}):t.attachEvent&&t.attachEvent("onload",function(){e.poly(),t.clearInterval(d)})}},e.poly(),"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}("undefined"!=typeof global?global:this);
|
||||
</script>
|
||||
|
||||
<!-- endbuild -->
|
||||
|
@ -18,7 +18,7 @@
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
|
||||
</noscript>
|
||||
<script>!function(e){"use strict";var t=function(t,n,r){function o(e){if(i.body)return e();setTimeout(function(){o(e)})}function a(){d.addEventListener&&d.removeEventListener("load",a),d.media=r||"all"}var l,i=e.document,d=i.createElement("link");if(n)l=n;else{var s=(i.body||i.getElementsByTagName("head")[0]).childNodes;l=s[s.length-1]}var u=i.styleSheets;d.rel="stylesheet",d.href=t,d.media="only x",o(function(){l.parentNode.insertBefore(d,n?l:l.nextSibling)});var f=function(e){for(var t=d.href,n=u.length;n--;)if(u[n].href===t)return e();setTimeout(function(){f(e)})};return d.addEventListener&&d.addEventListener("load",a),d.onloadcssdefined=f,f(a),d};"undefined"!=typeof exports?exports.loadCSS=t:e.loadCSS=t}("undefined"!=typeof global?global:this),function(e){if(e.loadCSS){var t=loadCSS.relpreload={};if(t.support=function(){try{return e.document.createElement("link").relList.supports("preload")}catch(e){return!1}},t.poly=function(){for(var t=e.document.getElementsByTagName("link"),n=0;n<t.length;n++){var r=t[n];"preload"===r.rel&&"style"===r.getAttribute("as")&&(e.loadCSS(r.href,r,r.getAttribute("media")),r.rel=null)}},!t.support()){t.poly();var n=e.setInterval(t.poly,300);e.addEventListener&&e.addEventListener("load",function(){t.poly(),e.clearInterval(n)}),e.attachEvent&&e.attachEvent("onload",function(){e.clearInterval(n)})}}}(this);</script>
|
||||
<script>!function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};e.support=function(){try{return t.document.createElement("link").relList.supports("preload")}catch(t){return!1}},e.bindMediaToggle=function(t,e){function a(){t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),setTimeout(a,3e3)},e.poly=function(){if(!e.support()){for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];if("preload"===o.rel&&"style"===o.getAttribute("as")&&!o.getAttribute("data-loadcss")){var l=o.media||"all";e.bindMediaToggle(o,l),o.media="x",o.rel="stylesheet",o.setAttribute("data-loadcss",!0)}}var d=t.setInterval(e.poly,300);t.addEventListener?t.addEventListener("load",function(){e.poly(),t.clearInterval(d)}):t.attachEvent&&t.attachEvent("onload",function(){e.poly(),t.clearInterval(d)})}},e.poly(),"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}("undefined"!=typeof global?global:this);</script>
|
||||
</head>
|
||||
<body>
|
||||
<!--[if lt IE 10]>
|
||||
|
2
test/fixtures/loadcss.html
vendored
2
test/fixtures/loadcss.html
vendored
@ -13,7 +13,7 @@
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
</noscript>
|
||||
<script id="loadcss">
|
||||
!function(e){"use strict";var t=function(t,n,r){function o(e){return i.body?e():void setTimeout(function(){o(e)})}function a(){d.addEventListener&&d.removeEventListener("load",a),d.media=r||"all"}var l,i=e.document,d=i.createElement("link");if(n)l=n;else{var s=(i.body||i.getElementsByTagName("head")[0]).childNodes;l=s[s.length-1]}var u=i.styleSheets;d.rel="stylesheet",d.href=t,d.media="only x",o(function(){l.parentNode.insertBefore(d,n?l:l.nextSibling)});var f=function(e){for(var t=d.href,n=u.length;n--;)if(u[n].href===t)return e();setTimeout(function(){f(e)})};return d.addEventListener&&d.addEventListener("load",a),d.onloadcssdefined=f,f(a),d};"undefined"!=typeof exports?exports.loadCSS=t:e.loadCSS=t}("undefined"!=typeof global?global:this),function(e){if(e.loadCSS){var t=loadCSS.relpreload={};if(t.support=function(){try{return e.document.createElement("link").relList.supports("preload")}catch(t){return!1}},t.poly=function(){for(var t=e.document.getElementsByTagName("link"),n=0;n<t.length;n++){var r=t[n];"preload"===r.rel&&"style"===r.getAttribute("as")&&(e.loadCSS(r.href,r),r.rel=null)}},!t.support()){t.poly();var n=e.setInterval(t.poly,300);e.addEventListener&&e.addEventListener("load",function(){e.clearInterval(n)}),e.attachEvent&&e.attachEvent("onload",function(){e.clearInterval(n)})}}}(this);
|
||||
!function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};e.support=function(){try{return t.document.createElement("link").relList.supports("preload")}catch(t){return!1}},e.bindMediaToggle=function(t,e){function a(){t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),setTimeout(a,3e3)},e.poly=function(){if(!e.support()){for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];if("preload"===o.rel&&"style"===o.getAttribute("as")&&!o.getAttribute("data-loadcss")){var l=o.media||"all";e.bindMediaToggle(o,l),o.media="x",o.rel="stylesheet",o.setAttribute("data-loadcss",!0)}}var d=t.setInterval(e.poly,300);t.addEventListener?t.addEventListener("load",function(){e.poly(),t.clearInterval(d)}):t.attachEvent&&t.attachEvent("onload",function(){e.poly(),t.clearInterval(d)})}},e.poly(),"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}("undefined"!=typeof global?global:this);
|
||||
</script>
|
||||
|
||||
<!-- endbuild -->
|
||||
|
@ -1058,9 +1058,9 @@ fast-levenshtein@~2.0.4:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz#bd33145744519ab1c36c3ee9f31f08e9079b67f2"
|
||||
|
||||
fg-loadcss@1.3.1:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/fg-loadcss/-/fg-loadcss-1.3.1.tgz#8930e820959faafbb242850eeec4f2d0259430cb"
|
||||
fg-loadcss@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fg-loadcss/-/fg-loadcss-2.0.0.tgz#cdf78ab1d2ca4e7d7ad927ff8d36dbbaf8cf1765"
|
||||
|
||||
figures@^1.3.5:
|
||||
version "1.7.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user