Skip to content

Instantly share code, notes, and snippets.

@jaskiratr
Last active March 28, 2020 19:47
Show Gist options
  • Save jaskiratr/21a5f1cd5de276c7e29c87322e2edc3c to your computer and use it in GitHub Desktop.
Save jaskiratr/21a5f1cd5de276c7e29c87322e2edc3c to your computer and use it in GitHub Desktop.

Revisions

  1. jaskiratr revised this gist Oct 12, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Chipotle_a_love_script.js
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    // Step 1: Type this in you console
    // Step 1: Type this in your browser console
    var script = document.createElement('script');
    script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js";
    document.getElementsByTagName('head')[0].appendChild(script);
  2. jaskiratr renamed this gist Oct 12, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. jaskiratr created this gist Oct 12, 2016.
    24 changes: 24 additions & 0 deletions Chipotle: A love Hack
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    // Step 1: Type this in you console
    var script = document.createElement('script');
    script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js";
    document.getElementsByTagName('head')[0].appendChild(script);

    // Wait for a second

    //Step 2: Run the following
    var elements = $(".card .face-front img");
    elements = elements.sort(function(a, b) {
    if (a.src > b.src) {
    return 1
    }
    if (a.src < b.src) {
    return -1
    }
    return 0;
    });

    elements.each(function(i,value) {
    setTimeout(function() {
    $(value).click();
    }, i * 1000 + 1000);
    });