Created
March 19, 2026 09:07
-
-
Save l3dlp/2456c68ae4835141db94659440476538 to your computer and use it in GitHub Desktop.
Retrieve the CSS stored in the browser's memory
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
| (async () => { | |
| let css = ''; | |
| for (const sheet of document.styleSheets) { | |
| try { | |
| for (const rule of sheet.cssRules) { | |
| css += rule.cssText + '\n'; | |
| } | |
| } catch (e) { | |
| console.warn('Blocked:', sheet.href); | |
| } | |
| } | |
| console.log(css); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment