Skip to content

Instantly share code, notes, and snippets.

@dshaw
Forked from bluewhalelabs/gist:1033554
Created June 21, 2011 19:22
Show Gist options
  • Save dshaw/1038645 to your computer and use it in GitHub Desktop.
Save dshaw/1038645 to your computer and use it in GitHub Desktop.
Turntable Growler
// ==UserScript==
// @name Turntable Growler
// @namespace http://fluidapp.com
// @description Creates growl notifications for chat in turntable
// @include *
// @author Gregarious Narain
// ==/UserScript==
(function () {
if (window.fluid) {
setTimeout(fluid_turntable_chat, 5000);
}
})();
function fluid_turntable_chat() {
jQuery('.messages').bind('DOMSubtreeModified',function(e) {
if (e.target.className === '') {
txt = jQuery(e.target);
window.fluid.showGrowlNotification({
title: "Turntable",
description: txt.prev().text() + ' ' + txt.text(),
priority: 1,
sticky: false
})
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment