Skip to content

Instantly share code, notes, and snippets.

@anyhotcountry
Created June 9, 2022 09:25
Show Gist options
  • Save anyhotcountry/36d3a6f2b042bb29a7aea5a6a52b36fd to your computer and use it in GitHub Desktop.
Save anyhotcountry/36d3a6f2b042bb29a7aea5a6a52b36fd to your computer and use it in GitHub Desktop.
Wordle Stats
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);
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);
@anyhotcountry
Copy link
Author

anyhotcountry commented Jun 9, 2022

Save Wordle Stats Shortcut

5C260496-53D3-40F0-AD24-13334BBB666C

Restore Wordle Stats Shortcut

6B01E793-3BFF-4AD7-8400-77C18605DDDB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment