10
|
1 p Bookmarklet to jump to the add page from a given page:
|
|
2 a(href="javascript:(function(){
|
|
3 window.location.href = '{{absRoot}}/addLink?url='+encodeURIComponent(window.location.href)+
|
|
4 '&title='+encodeURIComponent(document.title)+
|
|
5 '&selected='+encodeURIComponent(''+(
|
|
6 window.getSelection ? window.getSelection(): document.getSelection? document.getSelection(): document.selection.createRange().text));
|
|
7 })()") addpage
|
|
8
|
|
9 p Bookmarklet to get this form over any page (unfinished):
|
|
10 a(href="javascript:(function(){
|
|
11 var s=document.createElement('div');
|
|
12 s.innerHTML='Loading...';
|
|
13 s.style.position='fixed';
|
|
14 s.style.zIndex='9999';
|
|
15 s.style.border='2px solid black';
|
|
16
|
|
17 s.style.top='40px';
|
|
18 s.style.right='40px';
|
|
19 s.style.bottom='40px';
|
|
20 s.style.left='40px';
|
|
21 s.style.background='white';
|
|
22 document.body.appendChild(s);
|
|
23
|
|
24 s=document.createElement('script');
|
|
25 s.setAttribute('type','text/javascript');
|
|
26 s.setAttribute('src','{{absRoot}}/addOverlay'+
|
|
27 '?url='+encodeURIComponent(window.location.href)+
|
|
28 '&title='+encodeURIComponent(document.title)+
|
|
29 '&selected='+encodeURIComponent(''+(
|
|
30 window.getSelection ? window.getSelection(): document.getSelection? document.getSelection(): document.selection.createRange().text))
|
|
31 );
|
|
32 document.body.appendChild(s);
|
|
33 })();") addlink
|