Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Does anyone know how to publish your own bookmarklet in a blog like wordpress or blogger? 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=""+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="//"+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

3 Answers 3

up vote 0 down vote accepted

Create a clickable link on 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: – Mrchief May 2 '11 at 21:41 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

share|improve this answer 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.