Skip to content

Instantly share code, notes, and snippets.

@vilterp
Created December 9, 2008 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vilterp/33714 to your computer and use it in GitHub Desktop.
Save vilterp/33714 to your computer and use it in GitHub Desktop.
Twine advanced bookmarklet Ubiquity command
CmdUtils.makeBookmarkletCommand({
name: "twine-this",
url:"javascript:(function(){var%20d=document,w=window,a=window.getSelection,b=document.getSelection,c=document.selection,s=(a?a():(b)?b():(c?c.createRange().text:0)),l=d.location,e=encodeURIComponent;if(!d.getElementById('rdr-script'))try{var%20s=d.createElement('script');s.type='text/javascript';s.id='rdr-script';s.src='http://www.twine.com/js/spotthis.js';(d.body||d.documentElement).appendChild(s);}catch(x){var%20p='?u='%20+e(l.href)%20+'&t='+e(d.title)%20+'&s='+e(s)%20+'&v=1',u='http://www.twine.com/bookmark/basic'+p;l.href=u%20+'&adv=1';}})()"
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment