Skip to content

Instantly share code, notes, and snippets.

@jhersh
Created October 30, 2012 17:32
Show Gist options
  • Select an option

  • Save jhersh/3981726 to your computer and use it in GitHub Desktop.

Select an option

Save jhersh/3981726 to your computer and use it in GitHub Desktop.

Revisions

  1. jhersh renamed this gist Oct 30, 2012. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. jhersh created this gist Oct 30, 2012.
    1 change: 1 addition & 0 deletions influenceBOMB
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    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;