Skip to content

Instantly share code, notes, and snippets.

@rlemon
Created June 5, 2012 14:59
Show Gist options
  • Save rlemon/2875509 to your computer and use it in GitHub Desktop.
Save rlemon/2875509 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name SE Chat Fix for Neal
// @author Robert Lemon
// @namespace rlemon.userscript
// @description Fixes neals buggy ass chat interface
// @include http://chat.stackexchange.com/rooms/*
// @include http://chat.stackoverflow.com/rooms/*
// ==/UserScript==
function EmbedCodeOnPage(type, kode) {
var elm = document.createElement(type);
elm.textContent = kode;
document.head.appendChild(elm);
}
function EmbedFunctionOnPageAndExecute(fn) {
EmbedCodeOnPage("script", "(" + fn.toString() + ")()");
}
EmbedFunctionOnPageAndExecute(function() {
$('#input').val('');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment