WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone know how to publish your own bookmarklet in a blog like wordpress.com or blogger.com? All of them seem to format the bookmarklet removing the javascript or messing it up.

E.g., pasting this in wordpress blog:

<a href="javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.3.2",function($,L){$.hide()});" title="Run"></a>

results in

<a href="//ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.3.2",function($,L){$.hide()});">Run jQuery Code</a>
share|improve this question
up vote 0 down vote accepted

Create a clickable link on http://jsfiddle.net/ and link to it.

share|improve this answer
Ended up using this approach. Marking it as answer as this is closest. Here's the blog post: hkpanda.posterous.com/web-20-pop-up-blocker – Mrchief May 2 '11 at 21:41

WordPress.com does not allow to post JavaScript.

You should follow instruction on posting source code or put it on externals snippets service (such as Gist for example) and link to it.

Unfortunately neither will do as active clickable bookmarklet link.

share|improve this answer

Most visual editors will attempt to format your code. If wrapping it in the <code> </code> tags doesn't work, attempt this plugin http://wordpress.org/extend/plugins/inline-javascript/

share|improve this answer
WP.com question, no plugins. :) – Rarst May 2 '11 at 14:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.