Last active
August 18, 2023 17:48
-
-
Save reyaz/fdb95fc3f5b799ebb7d43690dc1dfcd4 to your computer and use it in GitHub Desktop.
Scryfall Utils
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
// Unique creature types (https://scryfall.com/search?as=text…) | |
// | |
// Store | |
// | |
var k = 'tmp_types', ls = localStorage, n = document.querySelectorAll('.card-text-type-line'), s = new Set(ls.getItem(k)?.split(',') || []); ls.setItem(k, [...[...n].reduce((a,c) => a.add(c.innerText), s)]); | |
// | |
// Copy | |
// | |
copy(localStorage.getItem('tmp_names').split(',').join('\n')) |
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
// Unique names (https://scryfall.com/search?as=checklist…) | |
// | |
// Store | |
// | |
var k = 'tmp_names', ls = localStorage, n = document.querySelectorAll('[data-component="card-tooltip"] td:nth-of-type(3)'), s = new Set(ls.getItem(k)?.split(',') || []); ls.setItem(k, [...[...n].reduce((a,c) => a.add(c.innerText), s)]); | |
// | |
// Copy | |
// | |
copy(localStorage.getItem('tmp_names').split(',').join('\n')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment