Created
June 10, 2020 14:26
-
-
Save tomcritchlow/5ced5712d594648d2638714dd503d3f8 to your computer and use it in GitHub Desktop.
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() { function getSelectionText() { var text = ""; if (window.getSelection) { text = window.getSelection().toString(); } else if (document.selection && document.selection.type != "Control") { text = document.selection.createRange().text; } return text; } var url = document.location; var hash = "#:~:text="; var text = getSelectionText(); document.location = url+hash+text; })() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment