mirror of
https://github.com/danog/inline-critical.git
synced 2024-11-30 04:29:07 +01:00
Bump deps
This commit is contained in:
parent
d65ec309b7
commit
9a63dc291d
4
index.js
4
index.js
@ -22,8 +22,8 @@ var parse = require('cheerio/lib/parse');
|
||||
var CleanCSS = require('clean-css');
|
||||
var slash = require('slash');
|
||||
var normalizeNewline = require('normalize-newline');
|
||||
// get loadCSS
|
||||
var loadCSS = read(path.join(__dirname, 'lib', 'loadCSS.js'));
|
||||
var resolve = require('resolve');
|
||||
var loadCSS = read(resolve.sync('fg-loadcss'));
|
||||
loadCSS = UglifyJS.minify(loadCSS, {fromString: true}).code;
|
||||
|
||||
|
||||
|
@ -1,48 +0,0 @@
|
||||
/*!
|
||||
loadCSS: load a CSS file asynchronously.
|
||||
[c]2014 @scottjehl, Filament Group, Inc.
|
||||
Licensed MIT
|
||||
*/
|
||||
|
||||
/* exported loadCSS */
|
||||
function loadCSS( href, before, media ){
|
||||
"use strict";
|
||||
// Arguments explained:
|
||||
// `href` is the URL for your CSS file.
|
||||
// `before` optionally defines the element we'll use as a reference for injecting our <link>
|
||||
// By default, `before` uses the first <script> element in the page.
|
||||
// However, since the order in which stylesheets are referenced matters, you might need a more specific location in your document.
|
||||
// If so, pass a different reference element to the `before` argument and it'll insert before that instead
|
||||
// note: `insertBefore` is used instead of `appendChild`, for safety re: http://www.paulirish.com/2011/surefire-dom-element-insertion/
|
||||
var ss = window.document.createElement( "link" );
|
||||
var ref = before || window.document.getElementsByTagName( "script" )[ 0 ];
|
||||
var sheets = window.document.styleSheets;
|
||||
ss.rel = "stylesheet";
|
||||
ss.href = href;
|
||||
// temporarily, set media to something non-matching to ensure it'll fetch without blocking render
|
||||
ss.media = "only x";
|
||||
|
||||
// inject link
|
||||
ref.parentNode.insertBefore( ss, ref );
|
||||
// This function sets the link's media back to `all` so that the stylesheet applies once it loads
|
||||
// It is designed to poll until document.styleSheets includes the new sheet.
|
||||
ss.onloadcssdefined = function( cb ){
|
||||
var defined;
|
||||
for( var i = 0; i < sheets.length; i++ ){
|
||||
if( sheets[ i ].href && sheets[ i ].href === ss.href ){
|
||||
defined = true;
|
||||
}
|
||||
}
|
||||
if( defined ){
|
||||
cb();
|
||||
} else {
|
||||
setTimeout(function() {
|
||||
ss.onloadcssdefined( cb );
|
||||
});
|
||||
}
|
||||
};
|
||||
ss.onloadcssdefined(function() {
|
||||
ss.media = media || "all";
|
||||
});
|
||||
return ss;
|
||||
}
|
@ -30,18 +30,19 @@
|
||||
"dependencies": {
|
||||
"cave": "2.0.0",
|
||||
"cheerio": "0.19.0",
|
||||
"clean-css": "3.4.7",
|
||||
"clean-css": "3.4.8",
|
||||
"css": "2.2.1",
|
||||
"dom-serializer": "0.1.0",
|
||||
"fg-loadcss": "0.1.8",
|
||||
"get-stdin": "5.0.0",
|
||||
"fg-loadcss": "0.2.4",
|
||||
"get-stdin": "5.0.1",
|
||||
"indent-string": "2.1.0",
|
||||
"lodash": "3.10.1",
|
||||
"meow": "3.5.0",
|
||||
"normalize-newline": "1.0.2",
|
||||
"reaver": "2.0.0",
|
||||
"resolve": "1.1.6",
|
||||
"slash": "1.0.0",
|
||||
"uglify-js": "2.5.0"
|
||||
"uglify-js": "2.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chai": "3.4.1",
|
||||
|
@ -301,7 +301,7 @@ ul{
|
||||
}
|
||||
</style>
|
||||
<script id="loadcss">
|
||||
(function(u,s){function loadCSS(e,n,t){"use strict";var o=window.document.createElement("link"),d=n||window.document.getElementsByTagName("script")[0],i=window.document.styleSheets;return o.rel="stylesheet",o.href=e,o.media="only x",d.parentNode.insertBefore(o,d),o.onloadcssdefined=function(e){for(var n,t=0;t<i.length;t++)i[t].href&&i[t].href===o.href&&(n=!0);n?e():setTimeout(function(){o.onloadcssdefined(e)})},o.onloadcssdefined(function(){o.media=t||"all"}),o}for(var i in u){loadCSS(u[i],s);}}(['/css/cartoon.18d89c7f.css','/bower_components/bootstrap/dist/css/bootstrap.d561412a.css'],document.getElementById("loadcss")));
|
||||
(function(u,s){!function(e){"use strict";var n=function(n,t,o){var l,r=e.document,i=r.createElement("link");if(t)l=t;else{var a=(r.body||r.getElementsByTagName("head")[0]).childNodes;l=a[a.length-1]}var d=r.styleSheets;i.rel="stylesheet",i.href=n,i.media="only x",l.parentNode.insertBefore(i,t?l:l.nextSibling);var f=function(e){for(var n=i.href,t=d.length;t--;)if(d[t].href===n)return e();setTimeout(function(){f(e)})};return i.onloadcssdefined=f,f(function(){i.media=o||"all"}),i};"undefined"!=typeof module?module.exports=n:e.loadCSS=n}("undefined"!=typeof global?global:this);for(var i in u){loadCSS(u[i],s);}}(['/css/cartoon.18d89c7f.css','/bower_components/bootstrap/dist/css/bootstrap.d561412a.css'],document.getElementById("loadcss")));
|
||||
</script>
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="/css/cartoon.18d89c7f.css">
|
||||
|
@ -301,7 +301,7 @@ ul{
|
||||
}
|
||||
</style>
|
||||
<script id="loadcss">
|
||||
(function(u,s){function loadCSS(e,n,t){"use strict";var o=window.document.createElement("link"),d=n||window.document.getElementsByTagName("script")[0],i=window.document.styleSheets;return o.rel="stylesheet",o.href=e,o.media="only x",d.parentNode.insertBefore(o,d),o.onloadcssdefined=function(e){for(var n,t=0;t<i.length;t++)i[t].href&&i[t].href===o.href&&(n=!0);n?e():setTimeout(function(){o.onloadcssdefined(e)})},o.onloadcssdefined(function(){o.media=t||"all"}),o}for(var i in u){loadCSS(u[i],s);}}(['css/cartoon.18d89c7f.css','bower_components/bootstrap/dist/css/bootstrap.d561412a.css'],document.getElementById("loadcss")));
|
||||
(function(u,s){!function(e){"use strict";var n=function(n,t,o){var l,r=e.document,i=r.createElement("link");if(t)l=t;else{var a=(r.body||r.getElementsByTagName("head")[0]).childNodes;l=a[a.length-1]}var d=r.styleSheets;i.rel="stylesheet",i.href=n,i.media="only x",l.parentNode.insertBefore(i,t?l:l.nextSibling);var f=function(e){for(var n=i.href,t=d.length;t--;)if(d[t].href===n)return e();setTimeout(function(){f(e)})};return i.onloadcssdefined=f,f(function(){i.media=o||"all"}),i};"undefined"!=typeof module?module.exports=n:e.loadCSS=n}("undefined"!=typeof global?global:this);for(var i in u){loadCSS(u[i],s);}}(['css/cartoon.18d89c7f.css','bower_components/bootstrap/dist/css/bootstrap.d561412a.css'],document.getElementById("loadcss")));
|
||||
</script>
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="css/cartoon.18d89c7f.css">
|
||||
|
@ -336,7 +336,7 @@
|
||||
}
|
||||
</style>
|
||||
<script id="loadcss">
|
||||
(function(u,s){function loadCSS(e,n,t){"use strict";var o=window.document.createElement("link"),d=n||window.document.getElementsByTagName("script")[0],i=window.document.styleSheets;return o.rel="stylesheet",o.href=e,o.media="only x",d.parentNode.insertBefore(o,d),o.onloadcssdefined=function(e){for(var n,t=0;t<i.length;t++)i[t].href&&i[t].href===o.href&&(n=!0);n?e():setTimeout(function(){o.onloadcssdefined(e)})},o.onloadcssdefined(function(){o.media=t||"all"}),o}for(var i in u){loadCSS(u[i],s);}}(['css/main.css', 'bower_components/bootstrap/dist/css/bootstrap.css', 'http://fonts.googleapis.com/css?family=Open+Sans'],document.getElementById("loadcss")));
|
||||
(function(u,s){!function(e){"use strict";var n=function(n,t,o){var l,r=e.document,i=r.createElement("link");if(t)l=t;else{var a=(r.body||r.getElementsByTagName("head")[0]).childNodes;l=a[a.length-1]}var d=r.styleSheets;i.rel="stylesheet",i.href=n,i.media="only x",l.parentNode.insertBefore(i,t?l:l.nextSibling);var f=function(e){for(var n=i.href,t=d.length;t--;)if(d[t].href===n)return e();setTimeout(function(){f(e)})};return i.onloadcssdefined=f,f(function(){i.media=o||"all"}),i};"undefined"!=typeof module?module.exports=n:e.loadCSS=n}("undefined"!=typeof global?global:this);for(var i in u){loadCSS(u[i],s);}}(['css/main.css', 'bower_components/bootstrap/dist/css/bootstrap.css', 'http://fonts.googleapis.com/css?family=Open+Sans'],document.getElementById("loadcss")));
|
||||
</script>
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
|
@ -301,7 +301,7 @@
|
||||
}
|
||||
</style>
|
||||
<script id="loadcss">
|
||||
(function(u,s){function loadCSS(e,n,t){"use strict";var o=window.document.createElement("link"),d=n||window.document.getElementsByTagName("script")[0],i=window.document.styleSheets;return o.rel="stylesheet",o.href=e,o.media="only x",d.parentNode.insertBefore(o,d),o.onloadcssdefined=function(e){for(var n,t=0;t<i.length;t++)i[t].href&&i[t].href===o.href&&(n=!0);n?e():setTimeout(function(){o.onloadcssdefined(e)})},o.onloadcssdefined(function(){o.media=t||"all"}),o}for(var i in u){loadCSS(u[i],s);}}(['css/main.158f2990.css','bower_components/bootstrap/dist/css/bootstrap.d561412a.css','http://fonts.googleapis.com/css?family=Open+Sans'],document.getElementById("loadcss")));
|
||||
(function(u,s){!function(e){"use strict";var n=function(n,t,o){var l,r=e.document,i=r.createElement("link");if(t)l=t;else{var a=(r.body||r.getElementsByTagName("head")[0]).childNodes;l=a[a.length-1]}var d=r.styleSheets;i.rel="stylesheet",i.href=n,i.media="only x",l.parentNode.insertBefore(i,t?l:l.nextSibling);var f=function(e){for(var n=i.href,t=d.length;t--;)if(d[t].href===n)return e();setTimeout(function(){f(e)})};return i.onloadcssdefined=f,f(function(){i.media=o||"all"}),i};"undefined"!=typeof module?module.exports=n:e.loadCSS=n}("undefined"!=typeof global?global:this);for(var i in u){loadCSS(u[i],s);}}(['css/main.158f2990.css','bower_components/bootstrap/dist/css/bootstrap.d561412a.css','http://fonts.googleapis.com/css?family=Open+Sans'],document.getElementById("loadcss")));
|
||||
</script>
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="css/main.158f2990.css">
|
||||
|
@ -336,7 +336,7 @@
|
||||
}
|
||||
</style>
|
||||
<script id="loadcss">
|
||||
(function(u,s){function loadCSS(e,n,t){"use strict";var o=window.document.createElement("link"),d=n||window.document.getElementsByTagName("script")[0],i=window.document.styleSheets;return o.rel="stylesheet",o.href=e,o.media="only x",d.parentNode.insertBefore(o,d),o.onloadcssdefined=function(e){for(var n,t=0;t<i.length;t++)i[t].href&&i[t].href===o.href&&(n=!0);n?e():setTimeout(function(){o.onloadcssdefined(e)})},o.onloadcssdefined(function(){o.media=t||"all"}),o}for(var i in u){loadCSS(u[i],s);}}(['css/main.css', 'http://fonts.googleapis.com/css?family=Open+Sans'],document.getElementById("loadcss")));
|
||||
(function(u,s){!function(e){"use strict";var n=function(n,t,o){var l,r=e.document,i=r.createElement("link");if(t)l=t;else{var a=(r.body||r.getElementsByTagName("head")[0]).childNodes;l=a[a.length-1]}var d=r.styleSheets;i.rel="stylesheet",i.href=n,i.media="only x",l.parentNode.insertBefore(i,t?l:l.nextSibling);var f=function(e){for(var n=i.href,t=d.length;t--;)if(d[t].href===n)return e();setTimeout(function(){f(e)})};return i.onloadcssdefined=f,f(function(){i.media=o||"all"}),i};"undefined"!=typeof module?module.exports=n:e.loadCSS=n}("undefined"!=typeof global?global:this);for(var i in u){loadCSS(u[i],s);}}(['css/main.css', 'http://fonts.googleapis.com/css?family=Open+Sans'],document.getElementById("loadcss")));
|
||||
</script>
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
|
@ -7,7 +7,7 @@
|
||||
</style>
|
||||
<title>critical css test</title>
|
||||
<script id="loadcss">
|
||||
(function(u,s){function loadCSS(e,n,t){"use strict";var o=window.document.createElement("link"),d=n||window.document.getElementsByTagName("script")[0],i=window.document.styleSheets;return o.rel="stylesheet",o.href=e,o.media="only x",d.parentNode.insertBefore(o,d),o.onloadcssdefined=function(e){for(var n,t=0;t<i.length;t++)i[t].href&&i[t].href===o.href&&(n=!0);n?e():setTimeout(function(){o.onloadcssdefined(e)})},o.onloadcssdefined(function(){o.media=t||"all"}),o}for(var i in u){loadCSS(u[i],s);}}(['css/main.css','bower_components/bootstrap/dist/css/bootstrap.css'],document.getElementById("loadcss")));
|
||||
(function(u,s){!function(e){"use strict";var n=function(n,t,o){var l,r=e.document,i=r.createElement("link");if(t)l=t;else{var a=(r.body||r.getElementsByTagName("head")[0]).childNodes;l=a[a.length-1]}var d=r.styleSheets;i.rel="stylesheet",i.href=n,i.media="only x",l.parentNode.insertBefore(i,t?l:l.nextSibling);var f=function(e){for(var n=i.href,t=d.length;t--;)if(d[t].href===n)return e();setTimeout(function(){f(e)})};return i.onloadcssdefined=f,f(function(){i.media=o||"all"}),i};"undefined"!=typeof module?module.exports=n:e.loadCSS=n}("undefined"!=typeof global?global:this);for(var i in u){loadCSS(u[i],s);}}(['css/main.css','bower_components/bootstrap/dist/css/bootstrap.css'],document.getElementById("loadcss")));
|
||||
</script>
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
|
@ -301,7 +301,7 @@ ul{
|
||||
}
|
||||
</style>
|
||||
<script id="loadcss">
|
||||
(function(u,s){function loadCSS(e,n,t){"use strict";var o=window.document.createElement("link"),d=n||window.document.getElementsByTagName("script")[0],i=window.document.styleSheets;return o.rel="stylesheet",o.href=e,o.media="only x",d.parentNode.insertBefore(o,d),o.onloadcssdefined=function(e){for(var n,t=0;t<i.length;t++)i[t].href&&i[t].href===o.href&&(n=!0);n?e():setTimeout(function(){o.onloadcssdefined(e)})},o.onloadcssdefined(function(){o.media=t||"all"}),o}for(var i in u){loadCSS(u[i],s);}}(['/css/main.css','/bower_components/bootstrap/dist/css/bootstrap.css'],document.getElementById("loadcss")));
|
||||
(function(u,s){!function(e){"use strict";var n=function(n,t,o){var l,r=e.document,i=r.createElement("link");if(t)l=t;else{var a=(r.body||r.getElementsByTagName("head")[0]).childNodes;l=a[a.length-1]}var d=r.styleSheets;i.rel="stylesheet",i.href=n,i.media="only x",l.parentNode.insertBefore(i,t?l:l.nextSibling);var f=function(e){for(var n=i.href,t=d.length;t--;)if(d[t].href===n)return e();setTimeout(function(){f(e)})};return i.onloadcssdefined=f,f(function(){i.media=o||"all"}),i};"undefined"!=typeof module?module.exports=n:e.loadCSS=n}("undefined"!=typeof global?global:this);for(var i in u){loadCSS(u[i],s);}}(['/css/main.css','/bower_components/bootstrap/dist/css/bootstrap.css'],document.getElementById("loadcss")));
|
||||
</script>
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="/css/main.css">
|
||||
|
@ -301,8 +301,9 @@ ul{
|
||||
}
|
||||
</style>
|
||||
<script id="loadcss">
|
||||
(function(u,s){function loadCSS(e,n,t){"use strict";var o=window.document.createElement("link"),d=n||window.document.getElementsByTagName("script")[0],i=window.document.styleSheets;return o.rel="stylesheet",o.href=e,o.media="only x",d.parentNode.insertBefore(o,d),o.onloadcssdefined=function(e){for(var n,t=0;t<i.length;t++)i[t].href&&i[t].href===o.href&&(n=!0);n?e():setTimeout(function(){o.onloadcssdefined(e)})},o.onloadcssdefined(function(){o.media=t||"all"}),o}for(var i in u){loadCSS(u[i],s);}}(['css/main.css','bower_components/bootstrap/dist/css/bootstrap.css'],document.getElementById("loadcss")));
|
||||
(function(u,s){!function(e){"use strict";var n=function(n,t,o){var l,r=e.document,i=r.createElement("link");if(t)l=t;else{var a=(r.body||r.getElementsByTagName("head")[0]).childNodes;l=a[a.length-1]}var d=r.styleSheets;i.rel="stylesheet",i.href=n,i.media="only x",l.parentNode.insertBefore(i,t?l:l.nextSibling);var f=function(e){for(var n=i.href,t=d.length;t--;)if(d[t].href===n)return e();setTimeout(function(){f(e)})};return i.onloadcssdefined=f,f(function(){i.media=o||"all"}),i};"undefined"!=typeof module?module.exports=n:e.loadCSS=n}("undefined"!=typeof global?global:this);for(var i in u){loadCSS(u[i],s);}}(['css/main.css','bower_components/bootstrap/dist/css/bootstrap.css'],document.getElementById("loadcss")));
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
|
||||
|
@ -12,7 +12,7 @@
|
||||
.header,.jumbotron{border-bottom:1px solid #e5e5e5}.btn,.jumbotron{text-align:center}body{padding-top:20px;padding-bottom:20px}.header{padding-left:15px;padding-right:15px}.header h3{margin-top:0;margin-bottom:0;line-height:40px;padding-bottom:19px}.jumbotron .btn{font-size:21px;padding:14px 24px}@media screen and (min-width:768px){.container{max-width:730px}.header{padding-left:0;padding-right:0;margin-bottom:30px}.jumbotron{border-bottom:0}}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:62.5%;-webkit-tap-highlight-color:transparent}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}h1{margin:.67em 0;font-size:36px}@media print{*{color:#000!important;text-shadow:none!important;background:0 0!important;box-shadow:none!important}a{text-decoration:underline}a[href]:after{content:" (" attr(href)")"}a[href^="#"]:after{content:""}h3,p{orphans:3;widows:3}h3{page-break-after:avoid}}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}a{background:0 0;color:#428bca;text-decoration:none}h1,h3{font-family:inherit;font-weight:500;line-height:1.1;color:inherit;margin-top:20px;margin-bottom:10px}h3{font-size:24px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}.text-muted{color:#999}ul{margin-top:0;margin-bottom:10px}.btn,.nav{margin-bottom:0}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.lead{font-size:21px}.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.btn{display:inline-block;padding:6px 12px;font-size:14px;font-weight:400;line-height:1.42857143;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.nav>li,.nav>li>a{position:relative;display:block}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.nav{padding-left:0;list-style:none}.nav>li>a{padding:10px 15px}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a{color:#fff;background-color:#428bca}.jumbotron,.jumbotron h1{color:inherit}.jumbotron{padding:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1{font-size:63px}}.container:after,.container:before,.nav:after,.nav:before{display:table;content:" "}.container:after,.nav:after{clear:both}.pull-right{float:right!important}
|
||||
</style>
|
||||
<script id="loadcss">
|
||||
(function(u,s){function loadCSS(e,n,t){"use strict";var o=window.document.createElement("link"),d=n||window.document.getElementsByTagName("script")[0],i=window.document.styleSheets;return o.rel="stylesheet",o.href=e,o.media="only x",d.parentNode.insertBefore(o,d),o.onloadcssdefined=function(e){for(var n,t=0;t<i.length;t++)i[t].href&&i[t].href===o.href&&(n=!0);n?e():setTimeout(function(){o.onloadcssdefined(e)})},o.onloadcssdefined(function(){o.media=t||"all"}),o}for(var i in u){loadCSS(u[i],s);}}(['css/main.css','bower_components/bootstrap/dist/css/bootstrap.css'],document.getElementById("loadcss")));
|
||||
(function(u,s){!function(e){"use strict";var n=function(n,t,o){var l,r=e.document,i=r.createElement("link");if(t)l=t;else{var a=(r.body||r.getElementsByTagName("head")[0]).childNodes;l=a[a.length-1]}var d=r.styleSheets;i.rel="stylesheet",i.href=n,i.media="only x",l.parentNode.insertBefore(i,t?l:l.nextSibling);var f=function(e){for(var n=i.href,t=d.length;t--;)if(d[t].href===n)return e();setTimeout(function(){f(e)})};return i.onloadcssdefined=f,f(function(){i.media=o||"all"}),i};"undefined"!=typeof module?module.exports=n:e.loadCSS=n}("undefined"!=typeof global?global:this);for(var i in u){loadCSS(u[i],s);}}(['css/main.css','bower_components/bootstrap/dist/css/bootstrap.css'],document.getElementById("loadcss")));
|
||||
</script>
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
|
@ -12,7 +12,7 @@
|
||||
.header,.jumbotron{border-bottom:1px solid #e5e5e5}.btn,.jumbotron{text-align:center}body{padding-top:20px;padding-bottom:20px}.header{padding-left:15px;padding-right:15px}.header h3{margin-top:0;margin-bottom:0;line-height:40px;padding-bottom:19px}.jumbotron .btn{font-size:21px;padding:14px 24px}@media screen and (min-width:768px){.container{max-width:730px}.header{padding-left:0;padding-right:0;margin-bottom:30px}.jumbotron{border-bottom:0}}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:62.5%;-webkit-tap-highlight-color:transparent}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}h1{margin:.67em 0;font-size:36px}@media print{*{color:#000!important;text-shadow:none!important;background:0 0!important;box-shadow:none!important}a{text-decoration:underline}a[href]:after{content:" (" attr(href)")"}a[href^="#"]:after{content:""}h3,p{orphans:3;widows:3}h3{page-break-after:avoid}}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}a{background:0 0;color:#428bca;text-decoration:none}h1,h3{font-family:inherit;font-weight:500;line-height:1.1;color:inherit;margin-top:20px;margin-bottom:10px}h3{font-size:24px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}.text-muted{color:#999}ul{margin-top:0;margin-bottom:10px}.btn,.nav{margin-bottom:0}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.lead{font-size:21px}.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.btn{display:inline-block;padding:6px 12px;font-size:14px;font-weight:400;line-height:1.42857143;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.nav>li,.nav>li>a{position:relative;display:block}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.nav{padding-left:0;list-style:none}.nav>li>a{padding:10px 15px}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a{color:#fff;background-color:#428bca}.jumbotron,.jumbotron h1{color:inherit}.jumbotron{padding:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1{font-size:63px}}.container:after,.container:before,.nav:after,.nav:before{display:table;content:" "}.container:after,.nav:after{clear:both}.pull-right{float:right!important}
|
||||
</style>
|
||||
<script>
|
||||
(function(u){function loadCSS(e,n,o,t){"use strict";var d=window.document.createElement("link"),i=n||window.document.getElementsByTagName("script")[0],s=window.document.styleSheets;return d.rel="stylesheet",d.href=e,d.media="only x",t&&(d.onload=t),i.parentNode.insertBefore(d,i),d.onloadcssdefined=function(n){for(var o,t=0;t<s.length;t++)s[t].href&&s[t].href.indexOf(e)>-1&&(o=!0);o?n():setTimeout(function(){d.onloadcssdefined(n)})},d.onloadcssdefined(function(){d.media=o||"all"}),d}for(var i in u){loadCSS(u[i]);}}(['css/main.css']));
|
||||
(function(u,s){!function(e){"use strict";var n=function(n,t,o){var l,r=e.document,i=r.createElement("link");if(t)l=t;else{var a=(r.body||r.getElementsByTagName("head")[0]).childNodes;l=a[a.length-1]}var d=r.styleSheets;i.rel="stylesheet",i.href=n,i.media="only x",l.parentNode.insertBefore(i,t?l:l.nextSibling);var f=function(e){for(var n=i.href,t=d.length;t--;)if(d[t].href===n)return e();setTimeout(function(){f(e)})};return i.onloadcssdefined=f,f(function(){i.media=o||"all"}),i};"undefined"!=typeof module?module.exports=n:e.loadCSS=n}("undefined"!=typeof global?global:this);for(var i in u){loadCSS(u[i],s);}}(['css/main.css']));
|
||||
</script>
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
|
@ -12,7 +12,7 @@
|
||||
.header,.jumbotron{border-bottom:1px solid #e5e5e5}.btn,.jumbotron{text-align:center}body{padding-top:20px;padding-bottom:20px}.header{padding-left:15px;padding-right:15px}.header h3{margin-top:0;margin-bottom:0;line-height:40px;padding-bottom:19px}.jumbotron .btn{font-size:21px;padding:14px 24px}@media screen and (min-width:768px){.container{max-width:730px}.header{padding-left:0;padding-right:0;margin-bottom:30px}.jumbotron{border-bottom:0}}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:62.5%;-webkit-tap-highlight-color:transparent}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}h1{margin:.67em 0;font-size:36px}@media print{*{color:#000!important;text-shadow:none!important;background:0 0!important;box-shadow:none!important}a{text-decoration:underline}a[href]:after{content:" (" attr(href)")"}a[href^="#"]:after{content:""}h3,p{orphans:3;widows:3}h3{page-break-after:avoid}}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}a{background:0 0;color:#428bca;text-decoration:none}h1,h3{font-family:inherit;font-weight:500;line-height:1.1;color:inherit;margin-top:20px;margin-bottom:10px}h3{font-size:24px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}.text-muted{color:#999}ul{margin-top:0;margin-bottom:10px}.btn,.nav{margin-bottom:0}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.lead{font-size:21px}.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.btn{display:inline-block;padding:6px 12px;font-size:14px;font-weight:400;line-height:1.42857143;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.nav>li,.nav>li>a{position:relative;display:block}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.nav{padding-left:0;list-style:none}.nav>li>a{padding:10px 15px}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a{color:#fff;background-color:#428bca}.jumbotron,.jumbotron h1{color:inherit}.jumbotron{padding:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1{font-size:63px}}.container:after,.container:before,.nav:after,.nav:before{display:table;content:" "}.container:after,.nav:after{clear:both}.pull-right{float:right!important}
|
||||
</style>
|
||||
<script id="loadcss">
|
||||
(function(u,s){function loadCSS(e,n,t){"use strict";var o=window.document.createElement("link"),d=n||window.document.getElementsByTagName("script")[0],i=window.document.styleSheets;return o.rel="stylesheet",o.href=e,o.media="only x",d.parentNode.insertBefore(o,d),o.onloadcssdefined=function(e){for(var n,t=0;t<i.length;t++)i[t].href&&i[t].href===o.href&&(n=!0);n?e():setTimeout(function(){o.onloadcssdefined(e)})},o.onloadcssdefined(function(){o.media=t||"all"}),o}for(var i in u){loadCSS(u[i],s);}}(['css/main.css'],document.getElementById("loadcss")));
|
||||
(function(u,s){!function(e){"use strict";var n=function(n,t,o){var l,r=e.document,i=r.createElement("link");if(t)l=t;else{var a=(r.body||r.getElementsByTagName("head")[0]).childNodes;l=a[a.length-1]}var d=r.styleSheets;i.rel="stylesheet",i.href=n,i.media="only x",l.parentNode.insertBefore(i,t?l:l.nextSibling);var f=function(e){for(var n=i.href,t=d.length;t--;)if(d[t].href===n)return e();setTimeout(function(){f(e)})};return i.onloadcssdefined=f,f(function(){i.media=o||"all"}),i};"undefined"!=typeof module?module.exports=n:e.loadCSS=n}("undefined"!=typeof global?global:this);for(var i in u){loadCSS(u[i],s);}}(['css/main.css'],document.getElementById("loadcss")));
|
||||
</script>
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
|
2
test/fixtures/loadcss.html
vendored
2
test/fixtures/loadcss.html
vendored
@ -9,7 +9,7 @@
|
||||
|
||||
<!-- build:css styles/main.css -->
|
||||
<script>
|
||||
(function(u){function loadCSS(e,n,o,t){"use strict";var d=window.document.createElement("link"),i=n||window.document.getElementsByTagName("script")[0],s=window.document.styleSheets;return d.rel="stylesheet",d.href=e,d.media="only x",t&&(d.onload=t),i.parentNode.insertBefore(d,i),d.onloadcssdefined=function(n){for(var o,t=0;t<s.length;t++)s[t].href&&s[t].href.indexOf(e)>-1&&(o=!0);o?n():setTimeout(function(){d.onloadcssdefined(n)})},d.onloadcssdefined(function(){d.media=o||"all"}),d}for(var i in u){loadCSS(u[i]);}}(['css/main.css']));
|
||||
(function(u,s){!function(e){"use strict";var n=function(n,t,o){var l,r=e.document,i=r.createElement("link");if(t)l=t;else{var a=(r.body||r.getElementsByTagName("head")[0]).childNodes;l=a[a.length-1]}var d=r.styleSheets;i.rel="stylesheet",i.href=n,i.media="only x",l.parentNode.insertBefore(i,t?l:l.nextSibling);var f=function(e){for(var n=i.href,t=d.length;t--;)if(d[t].href===n)return e();setTimeout(function(){f(e)})};return i.onloadcssdefined=f,f(function(){i.media=o||"all"}),i};"undefined"!=typeof module?module.exports=n:e.loadCSS=n}("undefined"!=typeof global?global:this);for(var i in u){loadCSS(u[i],s);}}(['css/main.css']));
|
||||
</script>
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
|
Loading…
Reference in New Issue
Block a user