Created
January 4, 2013 21:32
-
-
Save tinifni/4456266 to your computer and use it in GitHub Desktop.
Bookmarklet to send link of currently viewed website to HipChat
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
// Replace the following values with your own: | |
// auth_token | |
// room_id | |
// from | |
javascript: | |
var auth_token = "Your auth_token"; | |
var room_id = "Room to send message"; | |
var from = "Sender's name"; | |
var hipchat = 'https://api.hipchat.com/v1/rooms/message?auth_token=' + auth_token + | |
'&room_id=' + room_id + | |
'&from=' + from + | |
'&message=' + encodeURIComponent(document.title) + '+' + encodeURIComponent(location.href) + | |
'&message_format=text&color=gray'; | |
var ajax = new XMLHttpRequest;ajax.open('GET', hipchat, true); | |
ajax.send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment