marky

Lightweight bookmarking + plaintext archive
Log | Files | Refs | README | LICENSE

commit a731010ae6d3b08cde2f26321150bfa43712a2b8
parent 9b589a6a2e706f014a25d9eec729b66bb4bdc597
Author: David Eisinger <[email protected]>
Date:   Tue,  7 Oct 2025 15:48:20 -0400

Use highlighted text for bookmarklet description

Diffstat:
Minternal/web/bookmarklet.html | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/internal/web/bookmarklet.html b/internal/web/bookmarklet.html @@ -17,7 +17,7 @@ <h2>Save to Marky</h2> <p>Drag this to your bookmarks bar:</p> <p> - <a class="btn" href="javascript:(function(){try{var d=document;var s=encodeURIComponent;var u=location.href;var t=document.title;var sel='';if(d.getSelection){sel=d.getSelection().toString()}else if(window.getSelection){sel=window.getSelection().toString()}else if(d.selection){sel=d.selection.createRange().text}var win=window.open('{{ORIGIN}}/bookmarklet?u='+s(u)+'&t='+s(t)+'&d='+s(sel)+'{{AUTH}}','marky','width=520,height=520');if(win){win.focus()}}catch(e){alert('Could not open Marky: '+e)}})();">Save to Marky</a> + <a class="btn" href="javascript:(function(){try{var d=document,s=encodeURIComponent,u=location.href,t=document.title,sel='';var ae=d.activeElement;if(ae&&((ae.tagName==='TEXTAREA')||(ae.tagName==='INPUT'&&/^(?:text|search|url|tel|email)$/i.test(ae.type)))){var ss=ae.selectionStart||0,se=ae.selectionEnd||0;if(typeof ss==='number'&&typeof se==='number'&&se>ss){sel=ae.value.substring(ss,se)}}if(!sel&&d.getSelection){sel=d.getSelection().toString()}else if(!sel&&window.getSelection){sel=window.getSelection().toString()}else if(!sel&&d.selection){sel=d.selection.createRange().text}var win=window.open('{{ORIGIN}}/bookmarklet?u='+s(u)+'&t='+s(t)+'&d='+s(sel)+'{{AUTH}}','marky','width=520,height=520');if(win){win.focus()}}catch(e){alert('Could not open Marky: '+e)}})();">Save to Marky</a> </p> <div class="notice"> <p>When clicked on any page, this opens a small form prefilled with the page URL and title. On submit, it saves to your Marky account.</p>