Last active
June 9, 2019 11:41
-
-
Save Tksi/9f2a1c02921e5f7df0c9fb713de9bd64 to your computer and use it in GitHub Desktop.
任意のページのCSSStyleRuleを取り出す(@で始まるやつを除く)
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
[...document.styleSheets] | |
.map(v => [...v.cssRules]) | |
.flat() | |
.filter(v => v.media === '' && v.cssRules === undefined) | |
//最後の行はgoogleでしか意味ないかも |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment