Skip to content

Instantly share code, notes, and snippets.

@miklb
Created June 30, 2012 06:06
Show Gist options
  • Save miklb/3022553 to your computer and use it in GitHub Desktop.
Save miklb/3022553 to your computer and use it in GitHub Desktop.
modified bookmarklet for Habari's Publish Quote plugin
javascript:var%20w=window,d=document,gS='getSelection';window.open('http://example.com/admin/publish?quote='+encodeURIComponent((''+(w[gS]?w[gS]():d[gS]?d[gS]():d.selection.createRange().text)).replace(/(^\s+|\s+$)/g,''))+'&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(d.title.replace(/\u200b/g, '')));void(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment