Skip to content

Instantly share code, notes, and snippets.

@scudco
Forked from tinifni/gist:4456266
Created March 18, 2014 01:13
Show Gist options
  • Save scudco/9611772 to your computer and use it in GitHub Desktop.
Save scudco/9611772 to your computer and use it in GitHub Desktop.
// 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