Created
September 19, 2012 21:40
-
-
Save jkishner/3752465 to your computer and use it in GitHub Desktop.
pushover bookmarklet, code from http://scroungelounge.blogspot.com/2012/09/pushover-bookmarklet.html
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%20pushoverBookmarklet()%20%7B%20%20%20%20%20%20%20%20%20%20%20%20function%20pushoverNotification(token,%20user,%20title,%20message,%20url)%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20params%20%3D%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20token:%20token%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20,%20user:%20user%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20,%20title:%20title%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20,%20message:%20message%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20,%20url:%20url%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20data%20%3D%20%221%3D1%22%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20for%20(var%20key%20in%20params)%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20data%20%2B%3D%20%22%26%22%20%2B%20key%20%2B%20%22%3D%22%20%2B%20params%5Bkey%5D%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20xhr%20%3D%20new%20XMLHttpRequest()%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20xhr.onreadystatechange%20%3D%20function%20()%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(xhr.readyState%20%3D%3D%204)%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20alert(%22This%20page%20has%20been%20forwarded%20through%20Pushover%22)%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20xhr.open(%22POST%22,%20%22https://api.pushover.net/1/messages.json%22,%20true)%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20xhr.setRequestHeader(%22Content-Type%22,%20%22application/x-www-form-urlencoded%22)%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20xhr.send(data)%3B%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%20%20%20%20%20%20%20%20%20%20%20%20var%20token%20%3D%20%22muw9snCrnD7Bnnlk2Mn6cdrYT9h0UJ%22%3B%20%20%20%20%20%20%20%20%20%20%20%20var%20user%20%3D%20%22*****USER_KEY_HERE*****%22%3B%20%20%20%20%20%20%20%20%20%20%20%20var%20title%20%3D%20%22Page%20received%20from%20browser%22%3B%20%20%20%20%20%20%20%20%20%20%20%20pushoverNotification(%20token%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20,%20user%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20,%20title%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20,%20document.title%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20,%20document.URL%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20)%3B%20%20%20%20%20%20%20%20%7D)()%3B |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment