Created
November 6, 2020 17:32
-
-
Save AprilSylph/3af379b7631a5238b00922498069cd3a to your computer and use it in GitHub Desktop.
Reverse-lookup for Tumblr's CSS map
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
const findClass = classname => tumblr.getCssMap() | |
.then(Object.entries) | |
.then(entries => entries.filter(([name, classes]) => classes.includes(classname))) | |
.then(Object.fromEntries); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment