Last active
September 3, 2022 18:01
-
-
Save jkmartindale/062de04cd23ada8aac6fa5683c30d1bb to your computer and use it in GitHub Desktop.
Revisions
-
jkmartindale revised this gist
Sep 29, 2020 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ let user = JSON.parse(localStorage.getItem('user')); user.giveaways[user.giveaways.length-1].tasks.forEach(task => task.completed = '1'); localStorage.setItem('user', JSON.stringify(user)); refreshInterface(); -
jkmartindale created this gist
Sep 29, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ for(let taskid in [0, 1, 2, 3, 4, 5, 6]) { var user = JSON.parse(localStorage.getItem('user')); if (user.giveaways[1].tasks[taskid].completed == '0') { user.giveaways[1].tasks[taskid].completed = '1'; user.giveaways[1].secident = user.giveaways[1].secident + 1; localStorage.setItem('user', JSON.stringify(user)); refreshInterface(); } }