How would I go about calling a javascript function on add_action(‘publish_post’…) ?
How do I have the bookmarklet run on my post? Call the below javascript code in PHP? would that work?
The source for the bookmarklet, for reference is:
javascript:function%20sr_link()%20{var%20headID%20=%20document.getElementsByTagName(%22head%22)[0];var%20newScript%20=%20document.createElement(%27script%27);newScript.type%20=%20%27text/javascript%27;var%20random_param%20=%20Math.floor(Math.random()*1100);%20newScript.src%20=%20%27http://www.baseball-reference.com/linker/linker.js?rand=%27+random_param;%20headID.appendChild(newScript);}%20void(sr_link());
i used the admin panel to post, and i added in graphics here and there