Skip to content

Instantly share code, notes, and snippets.

@akuhn
Last active November 16, 2016 04:11
Show Gist options
  • Save akuhn/9c91b9f9ee517168d3e17cab4edd6251 to your computer and use it in GitHub Desktop.
Save akuhn/9c91b9f9ee517168d3e17cab4edd6251 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Show emoji in gmail
// @namespace http://example.com
// @author You
// @match https://mail.google.com/*
// @version 1.0
// @grant GM_addStyle
// ==/UserScript==
var installed = false;
function emoji() {
if (installed) return false;
var node = document.querySelector('div[role="banner"] > div > div > div');
if (node) {
installed = true;
html = '<div id="show_emoji_in_gmail"><input value=" &#128149; &#128150; &#127872; &#127881; &#128514; " style="text-align: right; font-size: 160%; margin-top: 4px; border: none; background: none"></div>';
node.innerHTML = html + node.innerHTML;
}
}
document.body.addEventListener('DOMSubtreeModified', emoji);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment