Created
March 13, 2012 15:20
-
-
Save taizooo/2029378 to your computer and use it in GitHub Desktop.
対youpy.css cssonoff
This file contains hidden or 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
function cssonoff(s) { | |
var ns = document.querySelectorAll("style"); | |
[].forEach.call(ns, function (n) { | |
n.disabled = s; | |
}) | |
var xs = document.querySelectorAll("link"); | |
[].forEach.call(xs, function (x) { | |
if (x.rel.match(/stylesheet/i)) { | |
n.disabled = s; | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HTMLStyleElement - MDN
HTMLLinkElement - MDN