Created
December 20, 2022 20:51
-
-
Save karmanyaahm/33c4822131f6724f0570c4c3f52ad68f to your computer and use it in GitHub Desktop.
Send currently selected text to you chosen ntfy topic by just clicking on a bookmarket; currently doesn't work for textboxes
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:(() => { w = window.open("https://ntfy.sh/mytopic/publish?message="+encodeURIComponent(document.getSelection().toString().replace(/(<br>)|(<br\/>)/, "\n"))); setTimeout(() => {w.close()}, 1500); })(); |
Awesome. Remember to add auth
to the query parameters if you have any access control: https://docs.ntfy.sh/publish/#query-param
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/karmanyaahm/33c4822131f6724f0570c4c3f52ad68f