Skip to content

Instantly share code, notes, and snippets.

@jkmartindale
Last active September 3, 2022 18:01
Show Gist options
  • Select an option

  • Save jkmartindale/062de04cd23ada8aac6fa5683c30d1bb to your computer and use it in GitHub Desktop.

Select an option

Save jkmartindale/062de04cd23ada8aac6fa5683c30d1bb to your computer and use it in GitHub Desktop.

Revisions

  1. jkmartindale revised this gist Sep 29, 2020. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions championflow-revised.js
    Original 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();
  2. jkmartindale created this gist Sep 29, 2020.
    9 changes: 9 additions & 0 deletions championflow.js
    Original 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();
    }
    }