Created
July 18, 2011 13:18
-
-
Save datfaf/1089482 to your computer and use it in GitHub Desktop.
small edits to templates/bmlet.html @ https://github.com/jpmens/scrumptious bookmarklet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-<a href="javascript:(function(){t=document.title;d=''+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);if(!d)d=prompt('No text selected; enter description',t);if(!d)return 0;tags=prompt('Enter space-separated list of tags','');if(!tags)return 0;uri='{{url}}';f=document.createElement('form');f.method='post';f.action=uri;i0=document.createElement('input');i0.type='text';i0.name='url';i0.value=location.href;i1=document.createElement('input');i1.type='text';i1.name='description';i1.value=d;i2=document.createElement('input');i2.type='text';i2.name='title';i2.value=t||'no title';i3=document.createElement('input');i3.type='text';i3.name='tags';i3.value=tags;f.appendChild(i0);f.appendChild(i1);f.appendChild(i2);f.appendChild(i3);b=document.createElement('body');b.appendChild(f);f.submit();})()">drag me to your bookmarks bar</a> to install the bookmarklet.</li> | |
12 | |
+<a href="javascript:(function(){t=document.title;d=''+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);if(!d)d=prompt('No text selected; enter description',t);if(!d)return 0;tags=prompt('Enter space-separated list of tags','');if(!tags)return 0;uri='{{url}}';f=document.createElement('form');f.id='xform';f.method='post';f.action=uri;i0=document.createElement('input');i0.type='text';i0.name='url';i0.value=location.href;i1=document.createElement('input');i1.type='text';i1.name='description';i1.value=d;i2=document.createElement('input');i2.type='text';i2.name='title';i2.value=t||'no title';i3=document.createElement('input');i3.type='text';i3.name='tags';i3.value=tags;f.appendChild(i0);f.appendChild(i1);f.appendChild(i2);f.appendChild(i3);b=document.createElement('body');b.appendChild(f);f.submit();})()">drag me to your bookmarks bar</a> to install the bookmarklet.</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-<a href="javascript:(function(){t=document.title;d=''+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);if(!d)d=prompt('No text selected; enter description',t);if(!d)return 0;tags=prompt('Enter space-separated list of tags','');if(!tags)return 0;uri='{{url}}';f=document.createElement('form');f.id='xform';f.method='post';f.action=uri;i0=document.createElement('input');i0.type='text';i0.name='url';i0.value=location.href;i1=document.createElement('input');i1.type='text';i1.name='description';i1.value=d;i2=document.createElement('input');i2.type='text';i2.name='title';i2.value=t||'no title';i3=document.createElement('input');i3.type='text';i3.name='tags';i3.value=tags;f.appendChild(i0);f.appendChild(i1);f.appendChild(i2);f.appendChild(i3);b=document.createElement('body');b.appendChild(f);f.submit();})()">drag me to your bookmarks bar</a> to install the bookmarklet.</li> | |
12 | |
+<a href="javascript:(function(){t=document.title;d=''+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);if(!d)d=prompt('No text selected; enter description',t);if(!d)return 0;tags=prompt('Enter space-separated list of tags','');if(!tags)return 0;uri='{{url}}';f=document.createElement('form');f.id='xform';f.method='post';f.action=uri;i0=document.createElement('input');i0.type='text';i0.name='url';i0.value=location.href;i1=document.createElement('input');i1.type='text';i1.name='description';i1.value=d;i2=document.createElement('input');i2.type='text';i2.name='title';i2.value=t||'no title';i3=document.createElement('input');i3.type='text';i3.name='tags';i3.value=tags;f.appendChild(i0);f.appendChild(i1);f.appendChild(i2);f.appendChild(i3);b=document.getElementsByTagName('body')[0];b.appendChild(f);document.getElementById('xform').submit();f.submit();})()">drag me to your bookmarks bar</a> to install the bookmarklet.</li> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://jpmens.net/2010/05/25/truly-scrumptious-bookmarks-in-couchdb/
https://github.com/datfaf/scrumptious/blob/master/templates/bmlet.html