Skip to content

Instantly share code, notes, and snippets.

@taizooo
Created March 13, 2012 15:20
Show Gist options
  • Save taizooo/2029378 to your computer and use it in GitHub Desktop.
Save taizooo/2029378 to your computer and use it in GitHub Desktop.
対youpy.css cssonoff
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;
}
})
}
@taizooo
Copy link
Author

taizooo commented Mar 13, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment