Created
June 9, 2022 09:25
-
-
Save anyhotcountry/36d3a6f2b042bb29a7aea5a6a52b36fd to your computer and use it in GitHub Desktop.
Wordle Stats
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 stateKey = 'nyt-wordle-state'; | |
var statsKey = 'nyt-wordle-statistics'; | |
var str = 'Clipboard'; | |
try { | |
var json = JSON.parse(atob(str)); | |
if (json.gameState == null || json.statistics == null) throw 'err'; | |
window.localStorage.setItem(stateKey, JSON.stringify(json.gameState)); | |
window.localStorage.setItem(statsKey, JSON.stringify(json.statistics)); | |
} catch(err) { | |
alert('Can\'t read the input.'); | |
} | |
completion(true); |
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 stateKey = 'nyt-wordle-state'; | |
const statsKey = 'nyt-wordle-statistics'; | |
const data = btoa(JSON.stringify({gameState:JSON.parse(window.localStorage.getItem(stateKey)),statistics:JSON.parse(window.localStorage.getItem(statsKey))})); | |
completion(data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Save Wordle Stats Shortcut
Restore Wordle Stats Shortcut