Created
July 26, 2022 18:51
-
-
Save jonesnxt/1f57c19604752bae0c9bf258f52d1606 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
Array.from(document.styleSheets) | |
.filter((sheet) => { | |
try { | |
sheet.cssRules; | |
return true; | |
} catch (err) { | |
console.log( | |
`Due to CORS issues, this script can't access "${sheet.href}"` | |
); | |
return false; | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment