Last active
September 15, 2020 19:23
-
-
Save YoraiLevi/3365f9a60c8033d8c797dc409acbb26e to your computer and use it in GitHub Desktop.
this code is obsolete since the 2020 new facebook design. refer to: https://github.com/YoraiLevi/SetFacebookPostsPrivate make all facebook posts private(activity log) very dumb code.
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
lasti=0 | |
lastj=0 | |
var privatefb = function(){ | |
items = document.getElementsByClassName('_42ft _4jy0 _55pi _5vto _55_p _2agf _4o_4 _401v _p _1zg8 _4jy3 _517h _51sy _59pe') | |
for(i=lasti;i<items.length;i++) | |
{ items[i].click() | |
items[i].focus() | |
lasti=i | |
} | |
items2 = document.getElementsByClassName('_54nh _4chm') | |
for(j=lastj;j<items2.length;j++){ | |
if(items2[j].innerText == 'Only me'){ | |
items2[j].click() | |
}} | |
lastj=j | |
} | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
async function dopriavte() { | |
while(true){ | |
privatefb() | |
await sleep(5000); | |
} | |
} | |
dopriavte() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment