Created
October 30, 2012 17:32
-
-
Save jhersh/3981726 to your computer and use it in GitHub Desktop.
Spam likes on all posts and comments for a given Chatter user
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
javascript:var c=0;var s=Sfdc;var d=document;var sel="getSelection";var user=prompt("Enter User Name:",d[sel]&&d[sel]().toString()||"John Buchanan");var each=function(list,delegate){for(var i=0;i<list.length;i++)delegate(list[i])};var text=function(x){return x&&(x.textContent||x.innerText)||''};var match=function(delegate){return function(x){if(text(x)==user){delegate(x);}}};var click=function(x){if(x.style.display=='none')return;c++;x.onclick();};each(s.select(".feeditempreamble .actorentitylink"),match(function(x){each(s.select(".feeditemfooter .cxallfeedactions .cxlikeitemaction",s.Dom.getParent(x,".feeditemcontent")),click)}));each(s.select(".feedcommentuser"),match(function(x){each(s.select(".feeditemcommentbody .feedcommentactions .cxallfeedactions .cxlikecommentaction",s.Dom.getParent(x,".feeditemcomment")),click)}));alert(c+" new Likes!");undefined; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment