Last active
October 20, 2023 21:12
-
-
Save timiles/5607605 to your computer and use it in GitHub Desktop.
Hide from timeline: javascript to hide all displayed posts from your facebook timeline. Doesn't delete anything, only hides from timeline.
This file contains 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 characters
/*--------------------- | |
INSTRUCTIONS: | |
1. open https://www.facebook.com/me | |
2. run script* | |
3. refresh if necessary, goto 2. | |
* to save as bookmarklet, create new bookmark in your browser of choice - | |
Name: "hide from timeline" | |
URL: "javascript: <content of gist below>" | |
-----------------------*/ | |
function clickByClassName(className, innerText) { | |
var els = document.getElementsByClassName(className); | |
for (var i=0; i<els.length; i++) { | |
if (innerText == undefined || els[i].innerText == innerText) { | |
els[i].click(); | |
} | |
} | |
} | |
clickByClassName('_5cg _4__7'); | |
clickByClassName('_54nh', 'Hide from timeline'); | |
Great scrippt.
Is it possible to dellete all my posts permanently instead of only hiding them?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Made an update to your gist, fixing two small bugs.
Here's the updated gist: https://gist.github.com/anthonymonori/6428045