Created
January 1, 2018 13:49
-
-
Save hirohitokato/c1a0e631d688ce94c5d157862c0c0cb0 to your computer and use it in GitHub Desktop.
A bookmarklet to get a markdown style URL string you are seeing, whose title is the page title or a string you select. The result is copied to clipboard.
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:caption=window.getSelection()+'';if(caption==""){caption=document.title;}i=document.createElement('input');i.setAttribute('id','copyinput');document.body.appendChild(i);i.value='%5B'+caption+'%5D('+location.href+')';i.select();document.execCommand('copy');document.body.removeChild(i);void(0); | |
// execute the bookmarklet without selection: [page's title](page URL) | |
// execute it with selection: [selected string](page URL) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment