Skip to content

Instantly share code, notes, and snippets.

@Buildstarted
Created April 3, 2015 01:16
Show Gist options
  • Save Buildstarted/cee03bce7926f5006c79 to your computer and use it in GitHub Desktop.
Save Buildstarted/cee03bce7926f5006c79 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name JabbR Firehose
// @namespace http://jabbr.buildstarted.com/
// @version 0.1
// @description firehose
// @match https://jabbr.net/*
// @copyright 2012+, You
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==
var origChatMessageHandler = unsafeWindow.chat.ui.addChatMessage;
unsafeWindow.chat.ui.addChatMessage = function (message, roomName) {
origChatMessageHandler.apply(this, [message, roomName]);
try {
message.message = "<a href='#/rooms/" + roomName + "'>#" + roomName + "</a>: " + message.message;
origChatMessageHandler.apply(this, [message, 'firehose']);
} catch (e) { }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment