Last active
November 11, 2020 04:57
-
-
Save himat/27f982b3831e2d8bdd0723626f10d95a to your computer and use it in GitHub Desktop.
[Find which page stylesheet contains a certain css text] #javascript
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
for (var sheetI=0; sheetI<document.styleSheets.length; sheetI+=1) { | |
try { | |
var foundRule = Array.from(document.styleSheets[sheetI].cssRules).find(rule => rule.cssText.includes(".intercom-sg4b1o")); | |
console.log("found? doc", sheetI, " - ", foundRule); | |
} catch (error) { console.log(error); } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment