I tried to include bookmarklets as links, and a simple example works great, but a real one no.
File A: success
Header
======
This is a [bookmarklet].
[bookmarklet]: javascript:(function(){alert('Hello');})();
<h1>Header</h1>
<p>This is a <a href="javascript:(function()%7Balert('Hello');%7D)();">bookmarklet</a>.</p>
File B: fails
Header
======
This is a [bookmarklet].
[bookmarklet]: javascript:(function(d){var i,k=d.getElementsByTagName('link'),c=['//twitter.github.com/bootstrap/assets/css/bootstrap.css'],h='<link rel=stylesheet type=text/css href=%s />';for(i=0;i<k.length;i++)(k[i].type=='text/css'||k[i].rel=='stylesheet')&&k[i].parentNode.removeChild(k[i]);for(i=0;i<c.length;i++)d.head.innerHTML+=h.replace('%s',c[i]);})(document);
<h1>Header</h1>
<p>This is a [bookmarklet].</p>
<p>[bookmarklet]: javascript:(function(d){var i,k=d.getElementsByTagName('link'),c=['//twitter.github.com/bootstrap/assets/css/bootstrap.css'],h='<link rel=stylesheet type=text/css href=%s />';for(i=0;i<k.length;i++)(k[i].type=='text/css'||k[i].rel=='stylesheet')&&k[i].parentNode.removeChild(k[i]);for(i=0;i<c.length;i++)d.head.innerHTML+=h.replace('%s',c[i]);})(document);</p>
Hello,
I tried to include bookmarklets as links, and a simple example works great, but a real one no.
File A: success
File B: fails