Created
December 14, 2018 16:06
-
-
Save snowleo208/0273860a40d1e8e2d6a2d12fb61f23c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from google | |
<noscript id="deferred-styles"> | |
<link rel="stylesheet" type="text/css" href="small.css"/> | |
</noscript> | |
<script> | |
var loadDeferredStyles = function() { | |
var addStylesNode = document.getElementById("deferred-styles"); | |
var replacement = document.createElement("div"); | |
replacement.innerHTML = addStylesNode.textContent; | |
document.body.appendChild(replacement) | |
addStylesNode.parentElement.removeChild(addStylesNode); | |
}; | |
var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || | |
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; | |
if (raf) raf(function() { window.setTimeout(loadDeferredStyles, 0); }); | |
else window.addEventListener('load', loadDeferredStyles); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<style> | |
.blue{color:blue;} | |
</style> | |
</head> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment