The following should work; I tested it at my end and he likes hearts (although this does not work, since I have not logged in, etc.).
javascript:(function(){for(i=0;i<document.getElementsByTagName('img').length;i++){if((' '+document.getElementsByTagName('img')[i].className+' ').indexOf(' liker ')> -1){document.getElementsByTagName('img')[i].click();}}})();
As for the verification of the class βfunctionβ, then the loan for which the loan should be obtained, in relation to this answer.
Update
javascript:(function(){for(i=0;i<document.getElementsByTagName('img').length;i++){if((' '+document.getElementsByTagName('img')[i].className+' ').indexOf(' liker ')>-1){var t=document.getElementsByTagName('img')[i];if(document.dispatchEvent){var o=document.createEvent('MouseEvents');o.initMouseEvent('click',true,true,window,1,1,1,1,1,false,false,false,false,0,t);t.dispatchEvent(o)}else if(document.fireEvent){t.fireEvent('onclick')}else if(t.click()){t.click()}}}})();
I'm still not sure if this code really works, but it still 'worked' in jsfiddle (drag the link to the bar button, click the link in the button bar, watch the console).
Daedalus
source share