Created
July 30, 2019 14:20
-
-
Save gserrano/beaf784e626d70a6adb242aa6bd41f43 to your computer and use it in GitHub Desktop.
Hide posts from FB timeline
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 characters
function _delete(el){ | |
el.parentNode.removeChild(el); | |
} | |
function hidePost(){ | |
window.scrollTo(0,document.body.scrollHeight); | |
btn = document.querySelector("[data-testid='post_chevron_button']"); | |
timer = 1900; | |
btn.click(); | |
setTimeout(function(){ | |
let hide = document.querySelector('[title="Hide from timeline"]'); | |
hide.click(); | |
setTimeout(function(){ | |
let confirm = document.querySelector('.layerConfirm'); | |
confirm.click(); | |
setTimeout(function(){ | |
_delete(btn); | |
_delete(hide); | |
_delete(confirm); | |
console.log('post removido'); | |
}, timer) | |
}, timer) | |
}, timer) | |
} | |
hidePost(); | |
let interval = setInterval(hidePost, 4200); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment