I use setTimeout , which calls itself each time to constantly check the contents of different pages, since each page is loaded via ajax. It seems that JS Facebook works through all possible setTimeout links and calls clearTimeout for every render of my application is useless.
Is there a way to prevent the spread of my setTimeout as a helpless little bug from Facebook JS?
Here is my code so you can see what happens and test your solution if you want:
ruleset a60x542 { meta { name "shun-the-facebook-likes" description << shun-the-facebook-likes >> author "Mike Grace" logging off } dispatch { domain "facebook.com" } rule find_the_likes { select when pageview "facebook\.com" { emit <| KOBJ.a60x542.removeLikes = function() { $K(".uiUfiLike, .like_link, .cmnt_like_link").remove(); var timeout = window.setTimeout(function() { KOBJ.a60x542.removeLikes(); }, 4000); console.log(timeout); }
source share