Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
document.addEventListener('DOMNodeInserted', function(e){
if(e.target.classList.contains('An')){
addButton(e.target);
}
});
$('.An').forEach(addButton);
function addButton(composeNode){
var button = $('<div class="wG J-Z-I"><div class="J-J5-Ji J-Z-I-Kv-H"><div class="J-J5-Ji J-Z-I-J6-H"><div class="aA7 aaA aMZ"><img src="//composeIcon" /></div></div></div></div>');
button.click(function(e){
//30 lines of code to insert "Hello World" into the right position
});
button.hover(
function(){button.addClass('J-Z-I-JW');},
function(){button.removeClass('J-Z-I-JW');}
)
composeWindow.find('.gU.Up > .J-J5-Ji').append(button);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.