Skip to content

Instantly share code, notes, and snippets.

@youpy
Created July 5, 2011 14:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save youpy/1064991 to your computer and use it in GitHub Desktop.
Save youpy/1064991 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name G+: notify update
// @namespace http://buycheapviagraonlinenow.com/
// @include https://plus.google.com/*
// ==/UserScript==
var notifyServerUrl = 'http://localhost:5678/', // https://gist.github.com/1021283
element = document.querySelector('.gbids'),
last;
if(element) {
setInterval(function() {
var n = +element.innerHTML;
if((!last && n > 0) || (last < n)) {
notify('G+ update!');
}
last = n;
}, 5000);
}
function notify(msg) {
document.createElement('img')
.src = notifyServerUrl + '?text=' + encodeURIComponent(msg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment