Mercurial > code > home > repos > href
view template/bookmarklets.jade.mustache @ 15:4434b3dac18e
makefile for deps
Ignore-this: 8f4c24417f501b4697d85f867df9e078
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Sat, 16 Mar 2013 23:50:53 -0700 |
parents | e054949143e9 |
children |
line wrap: on
line source
p Bookmarklet to jump to the add page from a given page: a(href="javascript:(function(){ window.location.href = '{{absRoot}}/addLink?url='+encodeURIComponent(window.location.href)+ '&title='+encodeURIComponent(document.title)+ '&selected='+encodeURIComponent(''+( window.getSelection ? window.getSelection(): document.getSelection? document.getSelection(): document.selection.createRange().text)); })()") addpage p Bookmarklet to get this form over any page (unfinished): a(href="javascript:(function(){ var s=document.createElement('div'); s.innerHTML='Loading...'; s.style.position='fixed'; s.style.zIndex='9999'; s.style.border='2px solid black'; s.style.top='40px'; s.style.right='40px'; s.style.bottom='40px'; s.style.left='40px'; s.style.background='white'; document.body.appendChild(s); s=document.createElement('script'); s.setAttribute('type','text/javascript'); s.setAttribute('src','{{absRoot}}/addOverlay'+ '?url='+encodeURIComponent(window.location.href)+ '&title='+encodeURIComponent(document.title)+ '&selected='+encodeURIComponent(''+( window.getSelection ? window.getSelection(): document.getSelection? document.getSelection(): document.selection.createRange().text)) ); document.body.appendChild(s); })();") addlink