Created
January 9, 2023 14:38
-
-
Save tachekent/4581978a15a0dc584b63fb0e72da1452 to your computer and use it in GitHub Desktop.
Browser bookmarklet to quickly capture selected text and URL into a new timestamped note in Obsidian.Requires Advanced URI plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:d=new Date();date=d.getFullYear()+'-'+String(d.getMonth()+1).padStart(2,'0')+'-'+String(d.getDate()).padStart(2,'0');time=d.getHours()+'-'+d.getMinutes()+'-'+d.getSeconds();v='Otherhead';f='Inbox/To Process/'+date+'--'+time;p=document.title;q=location.href;if(document.getSelection){s=document.getSelection();}else{s='';};t=`---\ntags: fleetingNotes\n---\n\n[[${date}]]\n# `+p+'\n'+s+'[^1]\n\n'+'[^1]: '+document.URL;void(open('obsidian://advanced-uri?vault='+encodeURIComponent(v)+'&filepath='+encodeURIComponent(f)+'&data='+encodeURIComponent(t))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment