Forked from tedmiston/archive-all-facebook-messages.js
Last active
March 6, 2024 03:36
-
-
Save elibosley/6acb8850ad1f9f208c30d7c7e2842b89 to your computer and use it in GitHub Desktop.
Revisions
-
elibosley revised this gist
Nov 1, 2017 . 2 changed files with 18 additions and 20 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 @@ -1,22 +1,17 @@ function archive_all(testOnly) { messages = $("._5blh") console.log("Found", messages.length, "messages on messsenger."); if (!testOnly) { for (i = 0; i < messages.length; i++) { try { messages[i].click()// open dialog $("li:contains('Archive')").last().click() } catch (TypeError) { console.log("TypeError") } } } } 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 @@ -5,12 +5,15 @@ Because who doesn't have an inbox full of "I got a new phone", event-based group Surprisingly, Facebook has not implemented a way to archive many messages in your inbox. This script provides that solution. UPDATE: THIS SCRIPT HAS BEEN UPDATED TO WORK AND IS TESTED AS WORKING (OCTOBER 31st, 2017 (spooky)). LET ME KNOW IF IT DOESN'T WORK FOR YOU! Quickstart ---------- Load [Facebook Messages](https://www.facebook.com/messages/) in a new tab. Open the JavaScript console and paste [the contents of jquery.min.js](https://code.jquery.com/jquery-git.min.js) into the console. Paste the contents of `archive-all-facebook-messages.js` into the console. @@ -25,6 +28,6 @@ When you're ready to run for real: Caveats ------- - Currently only detects the list of messages visible to the user in the page. You can work around this by repeatedly scrolling the message list pane to the bottom until all messages are loaded. I plan to automate this step soon. (Maybe) - There is no way to whitelist certain messages from being archived. Currently, you can manually unarchive select messages from the archived view. - Sometimes the messages page remains cached after the script reloads it. Reloading it once by hand solves this. -
tedmiston revised this gist
Dec 26, 2014 . 1 changed file with 3 additions and 1 deletion.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 @@ -16,5 +16,7 @@ function archive_all(testOnly) { } }); if (!testOnly) { location.reload(); } } -
tedmiston revised this gist
Dec 25, 2014 . 1 changed file with 1 addition and 1 deletion.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 @@ -27,4 +27,4 @@ Caveats - Currently only detects the list of messages visible to the user in the page. You can work around this by repeatedly scrolling the message list pane to the bottom until all messages are loaded. I plan to automate this step soon. - There is no way to whitelist certain messages from being archived. Currently, you can manually unarchive select messages from the archived view. - Sometimes the messages page remains cached after the script reloads it. Reloading it once by hand solves this. -
tedmiston revised this gist
Dec 25, 2014 . 1 changed file with 2 additions and 1 deletion.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 @@ -26,4 +26,5 @@ Caveats ------- - Currently only detects the list of messages visible to the user in the page. You can work around this by repeatedly scrolling the message list pane to the bottom until all messages are loaded. I plan to automate this step soon. - There is no way to whitelist certain messages from being archived. Currently, you can manually unarchive select messages from the archived view. - Sometimes the message page remains cached after the script reloads. Reloading it once by hand solves this. -
tedmiston revised this gist
Dec 25, 2014 . 1 changed file with 1 addition and 3 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 @@ -16,7 +16,5 @@ function archive_all(testOnly) { } }); if (!testOnly) { location.reload(); } } -
tedmiston revised this gist
Dec 25, 2014 . 1 changed file with 17 additions and 15 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 @@ -1,20 +1,22 @@ function archive_all(testOnly) { var someMessages, archiveButton; if (testOnly === "undefined") { testOnly = false; } someMessages = $("li._k- span.accessible_elem"); console.log("Found", someMessages.length, "messages to archive in your inbox."); archiveButton = null; someMessages.each(function () { if (testOnly) { console.log("*DEBUG Only* Archived:", $(this).text()); } else { archiveButton = $(this).parent().parent().parent().prev().children()[1]; archiveButton.click(); } }); if (!testOnly) { location.reload(); } } -
tedmiston revised this gist
Dec 25, 2014 . 1 changed file with 5 additions and 5 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 @@ -8,17 +8,17 @@ Surprisingly, Facebook has not implemented a way to archive many messages in you Quickstart ---------- Load [Facebook Messages](https://www.facebook.com/messages/) in a new tab. Open the JavaScript console and paste [the contents of jquery.min.js](http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js) into the console. Paste the contents of `archive-all-facebook-messages.js` into the console. If you want to only test the results before actually running the archiving, there's a param for that: archive_all(testOnly=true); When you're ready to run for real: archive_all(); -
tedmiston revised this gist
Dec 25, 2014 . 1 changed file with 5 additions and 5 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 @@ -8,17 +8,17 @@ Surprisingly, Facebook has not implemented a way to archive many messages in you Quickstart ---------- 1. Load [Facebook Messages](https://www.facebook.com/messages/) in a new tab. 2. Open the JavaScript console and paste [the contents of jquery.min.js](http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js) into the console. 3. Paste the contents of `archive-all-facebook-messages.js` into the console. 4. If you want to only test the results before actually running the archiving, there's a param for that: archive_all(testOnly=true); 5. When you're ready to run for real: archive_all(); -
tedmiston revised this gist
Dec 25, 2014 . 1 changed file with 2 additions and 3 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 @@ -8,10 +8,9 @@ Surprisingly, Facebook has not implemented a way to archive many messages in you Quickstart ---------- Load [Facebook Messages](https://www.facebook.com/messages/) in a new tab. Open the JavaScript console and paste in [the contents of jquery.min.js](http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js). Paste the contents of `archive-all-facebook-messages.js` into the console. -
tedmiston revised this gist
Dec 25, 2014 . 3 changed files with 1 addition and 2 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 @@ -1 +0,0 @@ File renamed without changes.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 @@ -13,7 +13,7 @@ Load https://www.facebook.com/messages/ in a new tab. Open the JavaScript console and paste in the contents of jQuery from this file: http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js Paste the contents of `archive-all-facebook-messages.js` into the console. If you want to only test the results before actually running the archiving, there's a param for that: -
tedmiston revised this gist
Dec 25, 2014 . 1 changed file with 1 addition 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 @@ . -
tedmiston created this gist
Dec 25, 2014 .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,30 @@ Facebook - Archive All Messages =============================== Because who doesn't have an inbox full of "I got a new phone", event-based group chats, and old lingering messages in their Facebook Messages? Surprisingly, Facebook has not implemented a way to archive many messages in your inbox. This script provides that solution. Quickstart ---------- Load https://www.facebook.com/messages/ in a new tab. Open the JavaScript console and paste in the contents of jQuery from this file: http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js Paste the contents of `archive-all.js` into the console. If you want to only test the results before actually running the archiving, there's a param for that: archive_all(testOnly=true); When you're ready to run for real: archive_all(); Caveats ------- - Currently only detects the list of messages visible to the user in the page. You can work around this by repeatedly scrolling the message list pane to the bottom until all messages are loaded. I plan to automate this step soon. - No way to whitelist certain messages from being archived. Currently, you can manually unarchive select messages from the archived view. 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,20 @@ function archive_all(testOnly) { if (typeof(testOnly) === "undefined") { testOnly = false }; var someMessages = $("li._k- span.accessible_elem"); console.log("Found", someMessages.length, "messages to archive in your inbox."); var archiveButton = null; someMessages.each(function(){ if (testOnly) { console.log("*DEBUG Only* Archived:", $(this).text()); } else { archiveButton = $(this).parent().parent().parent().prev().children()[1]; archiveButton.click(); } }); if (!testOnly) { location.reload(); } }