Created
December 24, 2014 18:02
-
-
Save briansokol/666dcb76783d5a479d12 to your computer and use it in GitHub Desktop.
Put this code in a browser bookmark. Clicking it will create a popup with an html link to the page surrounded by <li> tags. I use this for quickly grabbing page links for podcast notes.
This file contains 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:(function()%7Bvar%20a=window.getSelection();if(a.toString().length==0)%7Ba=document.title;%7Dwindow.prompt(a,'%3Cli%3E%3Ca%20href=%22'+window.location+'%22%3E'+a+'%3C/a%3E%3C/li%3E');%7D)(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text of the list item defaults to the title of the page. However, if you select any text on the page, the script will use that as the list item text instead.