Poke your friends autonomously!
Haha yes, very good changes indeed! I did this in the late hours of the night one night when I was bored, making spaghetti code was the only thing I was capable of hehe.
I appreciate this post and hope your contributions will entice other people to play around with my scripts and through the power of the community, improve them for everyone else!
Thanks again boinger! Cheers.
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址
Some minor tweaks
Thanks for this silly script.
I tweaked mine to add a few things to make this script awesomer (moved user-adjustable stuff to a top section, added random delay feature, moved the pokeclass to a variable to adapting to FB changes easier)
// begin user-adjustable stuff
var exec_interval = 2999; // run every almost-3-seconds (don't make this too low or Chrome ignores you) var rand_delay_min = 1; // random delay min (added to the exec_interval) var rand_delay_max = 10000; // random delay max (added to the exec_interval)
// end adjusting things
function randomInt(min, max) { // min and max inclusive return Math.floor(Math.random() * (max - min + 1) + min); }
function tryPoke(){ var pokeclass = "_42ft _4jy0 _4jy3 _4jy1 selected _51sy"; // make this a variable in case they change it (plus everything else is easier to read now) if(document.getElementsByClassName(pokeclass).length > 1) { var i; setTimeout(function(){ // delay the running for(i = 1; i < document.getElementsByClassName(pokeclass).length; ++i) { // find the div items if(document.getElementsByClassName(pokeclass)[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.className == "") { document.getElementsByClassName(pokeclass)[i].click(); } } }, randomInt(rand_delay_min,rand_delay_max)); // delay a random amount (as set before) } }
setInterval(tryPoke, exec_interval); // run every almost-3-seconds