Created
September 28, 2017 14:32
-
-
Save bluebear94/6433301018c02f1d2baae744336026c1 to your computer and use it in GitHub Desktop.
Paste into Discord console to dynamically change CSS
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
var rules = document.styleSheets[0].rules; | |
var subs = { | |
'Whitney, "Helvetica Neue", Helvetica, Arial, sans-serif': | |
'"VL PGothic", sans-serif' | |
}; | |
for (var i = 0; i < rules.length; ++i) { | |
var r = rules[i]; | |
var cssText = r.cssText; | |
var sd = r.style; | |
if (!sd) continue; | |
var oldff = sd.fontFamily; | |
var newff = subs[oldff]; | |
if (newff) { | |
sd.fontFamily = newff; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment