Here's something that should work as a userscript in both GreaseMonkey (Firefox) and Chrome:
// ==UserScript==
// @name Disapproval Button
// @author Asad
// @version 1.0
// @namespace pleaseletthisbeauniquenamespace
// @description Grimace disapprovingly more efficiently than ever
// @include http://chat.stackexchange.com/rooms/*
// @include http://chat.stackoverflow.com/rooms/*
// @include http://chat.meta.stackexchange.com/rooms/*
// ==/UserScript==
(function go() {
var buttonsContainer = document.getElementById("chat-buttons"),
newButton = document.createElement("button");
newButton.setAttribute("class", "button");
newButton.id = "disapproval-button";
newButton.innerHTML = "ಠ_ಠ"
buttonsContainer.appendChild(newButton);
newButton.addEventListener("click", function(e){
var editorCell = this.parentElement.previousElementSibling,
textarea = editorCell.getElementsByTagName("textarea")[0],
text = textarea.value,
selStart = textarea.selectionStart,
selEnd = textarea.selectionEnd;
textarea.value = text.slice(0, selStart) + "ಠ_ಠ" + text.slice(selEnd);
textarea.focus();
textarea.selectionStart = textarea.selectionEnd = selStart + 3;
});
})();
To install in Chrome:
- Put the snippet above in a file called whateveryoufancy.user.js on your desktop or somewhere
- Open Tools > Extensions in Chrome and drag the file onto the page you land on.
To install in Firefox + GreaseMonkey, simply drag and drop the file into any browser window.
"but sometimes you just need to break out a disapproving look immediately"
I don't see why using a plugin or userscript would delay your expression of disapproval.