Skip to content

Instantly share code, notes, and snippets.

@fanfan54old
Last active April 23, 2019 18:33
Show Gist options
  • Select an option

  • Save fanfan54old/4432e0b8abc063b7cec8c15c4e48eee1 to your computer and use it in GitHub Desktop.

Select an option

Save fanfan54old/4432e0b8abc063b7cec8c15c4e48eee1 to your computer and use it in GitHub Desktop.

Revisions

  1. fanfan54old revised this gist Apr 23, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion scriptkiddie-delete_discord_messages.js
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    var messages_div = document.getElementsByClassName("messages-3amgkR scroller")[0];

    window.action_button_arr = [];
    window.bdpm_i = 0;
    window.bdpm_interval = 0;
    window.scrollTopInterval = 0;
    window.scrollTopInterval = window.setInterval(function () {
    if (messages_div.scrollTop == 0) {
    clearInterval(window.scrollTopInterval);
  2. fanfan54old revised this gist Apr 23, 2019. 1 changed file with 0 additions and 39 deletions.
    39 changes: 0 additions & 39 deletions scriptkiddie-delete_discord_messages.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,3 @@
    // SCRIPT (auto click) TOTALEMENT AUTOMATIQUE, SANS INTERVENTION HUMAINE, POUR SUPPRIMER TOUS LES MESSAGES PRIVES (QUE L'ON A SOI-MEME ENVOYES) D'UNE CONVERSATION OUVERTE SUR WWW.DISCORDAPP.COM

    var messages_div = document.getElementsByClassName("messages-3amgkR scroller")[0];
    window.action_button_arr = [];
    window.bdpm_i = 0;
    @@ -38,40 +36,3 @@ window.scrollTopInterval = window.setInterval(function () {
    messages_div.scrollTo(0, 0);
    }
    }, 2000);




    // SANS LE DO while

    var messages_div = document.getElementsByClassName("messages-3amgkR scroller")[0];

    window.bdpm_i = 0;

    // optional initialization
    window.action_button_arr = [];
    window.bdpm_interval = 0;
    window.scrollTopInterval = 0;

    window.scrollTopInterval = window.setInterval(function () {
    if (messages_div.scrollTop == 0) {
    clearInterval(window.scrollTopInterval);
    window.action_button_arr = document.getElementsByClassName("button-3Jq0g9");
    window.bdpmInterval = window.setInterval(function () {
    if (window.bdpm_i >= window.action_button_arr.length) {
    clearInterval(window.bdpmInterval);
    } else {
    window.action_button_arr[window.bdpm_i].click();
    var action_container = document.getElementsByClassName("container-3cGP6G")[0];
    if (action_container.children.length == 3) {
    action_container.children[2].click();
    document.getElementsByClassName("flex-1xMQg5 flex-1O1GKY horizontalReverse-2eTKWD horizontalReverse-3tRjY7 flex-1O1GKY directionRowReverse-m8IjIq justifyStart-2NDFzi alignStretch-DpGPf3 noWrap-3jynv6 footer-2yfCgX")[0].children[0].click();
    } else {
    window.bdpm_i += 1;
    }
    }
    }, 1000);
    } else {
    messages_div.scrollTo(0, 0);
    }
    }, 2000);
  3. fanfan54old renamed this gist Feb 21, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. fanfan54old created this gist Feb 21, 2019.
    77 changes: 77 additions & 0 deletions README.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,77 @@
    // SCRIPT (auto click) TOTALEMENT AUTOMATIQUE, SANS INTERVENTION HUMAINE, POUR SUPPRIMER TOUS LES MESSAGES PRIVES (QUE L'ON A SOI-MEME ENVOYES) D'UNE CONVERSATION OUVERTE SUR WWW.DISCORDAPP.COM

    var messages_div = document.getElementsByClassName("messages-3amgkR scroller")[0];
    window.action_button_arr = [];
    window.bdpm_i = 0;
    window.bdpm_interval = 0;
    window.scrollTopInterval = 0;
    window.scrollTopInterval = window.setInterval(function () {
    if (messages_div.scrollTop == 0) {
    clearInterval(window.scrollTopInterval);
    window.action_button_arr = document.getElementsByClassName("button-3Jq0g9");
    window.bdpmInterval = window.setInterval(function () {
    if (window.bdpm_i >= window.action_button_arr.length) {
    clearInterval(window.bdpmInterval);
    } else {
    do {
    console.info("Message " + window.bdpm_i + "/" + window.action_button_arr.length);
    window.action_button_arr[window.bdpm_i].click();
    var action_container = document.getElementsByClassName("container-3cGP6G")[0];
    if (action_container.children.length != 3) {
    window.bdpm_i += 1;
    } else {
    break;
    }
    } while (window.bdpm_i < window.action_button_arr.length);
    console.info("Processing message " + window.bdpm_i + "/" + window.action_button_arr.length);
    if (window.bdpm_i < window.action_button_arr.length) {
    action_container.children[2].click();
    document.getElementsByClassName("flex-1xMQg5 flex-1O1GKY horizontalReverse-2eTKWD horizontalReverse-3tRjY7 flex-1O1GKY directionRowReverse-m8IjIq justifyStart-2NDFzi alignStretch-DpGPf3 noWrap-3jynv6 footer-2yfCgX")[0].children[0].click();
    } else {
    console.log("Detected end");
    clearInterval(window.bdpmInterval);
    }
    console.warn("Looping interval");
    }
    }, 2000);
    } else {
    messages_div.scrollTo(0, 0);
    }
    }, 2000);




    // SANS LE DO while

    var messages_div = document.getElementsByClassName("messages-3amgkR scroller")[0];

    window.bdpm_i = 0;

    // optional initialization
    window.action_button_arr = [];
    window.bdpm_interval = 0;
    window.scrollTopInterval = 0;

    window.scrollTopInterval = window.setInterval(function () {
    if (messages_div.scrollTop == 0) {
    clearInterval(window.scrollTopInterval);
    window.action_button_arr = document.getElementsByClassName("button-3Jq0g9");
    window.bdpmInterval = window.setInterval(function () {
    if (window.bdpm_i >= window.action_button_arr.length) {
    clearInterval(window.bdpmInterval);
    } else {
    window.action_button_arr[window.bdpm_i].click();
    var action_container = document.getElementsByClassName("container-3cGP6G")[0];
    if (action_container.children.length == 3) {
    action_container.children[2].click();
    document.getElementsByClassName("flex-1xMQg5 flex-1O1GKY horizontalReverse-2eTKWD horizontalReverse-3tRjY7 flex-1O1GKY directionRowReverse-m8IjIq justifyStart-2NDFzi alignStretch-DpGPf3 noWrap-3jynv6 footer-2yfCgX")[0].children[0].click();
    } else {
    window.bdpm_i += 1;
    }
    }
    }, 1000);
    } else {
    messages_div.scrollTo(0, 0);
    }
    }, 2000);