Last active
November 12, 2018 14:07
-
-
Save Ashish879/fe280abfb6583ebcd04d to your computer and use it in GitHub Desktop.
PushBullet Bookmarklet
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
/*********************************************** | |
* If you don't have any proxy restrictions calling PushBullet directly is the recommended approach. | |
* To use this script replace the "<INSERT_API_KEY_HERE>" section with your API KEY | |
* A bookmarklet is created like a regular bookmark. The below javascript code goes in the URL area. | |
************************************************/ | |
javascript:(function()%7Bfunction%20callback()%7B(function(%24)%7Bvar%20jQuery%3D%24%3Bvar%20API_KEY%20%3D%20%22<INSERT_API_KEY_HERE>%22%3Bvar%20newPush%20%3D%20%7B%7D%3BnewPush%5B%22type%22%5D%20%3D%20%22link%22%3B%20newPush%5B%22title%22%5D%20%3D%20document.title%3BnewPush%5B%22url%22%5D%20%3D%20document.URL%3B%24.ajax(%7Btype%3A%20%22POST%22%2Cheaders%3A%20%7B%22Authorization%22%3A%20%22Bearer%20%22%20%2B%20API_KEY%7D%2Curl%3A%20%22https%3A%2F%2Fapi.pushbullet.com%2Fv2%2Fpushes%22%2Cdata%3A%20newPush%7D)%7D)(jQuery.noConflict(true))%7Dvar%20s%3Ddocument.createElement(%22script%22)%3Bs.src%3D%22https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.7.1%2Fjquery.min.js%22%3Bif(s.addEventListener)%7Bs.addEventListener(%22load%22%2Ccallback%2Cfalse)%7Delse%20if(s.readyState)%7Bs.onreadystatechange%3Dcallback%7Ddocument.body.appendChild(s)%3B%7D)() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Readable and formatted: