Last active
October 21, 2017 16:49
-
-
Save DDoS/5b32654662080c44f8081a12112bee81 to your computer and use it in GitHub Desktop.
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
// Readable | |
fetch("https://raw.githubusercontent.com/DDoS/sprite-icons/master/output/icons.json") | |
.then(res => res.json()) | |
.then((icons) => { | |
for (key in icons) { | |
localStorage[key.replace("id", "icon")] = icons[key].url; | |
} | |
}); | |
// Compressed | |
fetch("https://raw.githubusercontent.com/DDoS/sprite-icons/master/output/icons.json").then(r=>r.json()).then((i)=>{for(k in i){localStorage[k.replace("id","icon")]=i[k].url;}}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment