From dc391a1e5082105bb6c802f8a69d34fd79592f2e Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 21 Aug 2015 10:10:01 +0100 Subject: [PATCH] Added more events --- src/injections/facebook.js | 44 +++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/src/injections/facebook.js b/src/injections/facebook.js index fabf12b..2a1f30c 100644 --- a/src/injections/facebook.js +++ b/src/injections/facebook.js @@ -1,22 +1,36 @@ function change_chat_tabs() { - $('._d97').each(function(){ - for (var i = 0; i < image_decoder.length; i++) { - console.log('Checking for ' + image_decoder[i][0]) - $(this).html($(this).html().replace("(" + image_decoder[i][0] + ")", - "" - )); - } - }); + $('._d97').each(function(){ + for (var i = 0; i < image_decoder.length; i++) { + console.log('Checking for ' + image_decoder[i][0]) + $(this).html($(this).html().replace( + image_decoder[i][0], + "" + )); + } + }); } -$('.fbNubFlyout').on( - 'DOMNodeInserted DOMNodeRemoved change load', function(event) { - change_chat_tabs(); +$('.fbNubFlyout').on('DOMNodeInserted DOMNodeRemoved change load', function() { // Something changes inside the chat tab + change_chat_tabs(); }); -$('._d97').on('change load', function(event){ - change_chat_tabs(); + +$('._d97').on('change load', function(){ // Chat Bubble messages + change_chat_tabs(); }); -alert("Injected"); -console.log("Injected"); \ No newline at end of file + + +$('.fbNubButton').on('click', function() { // Facebook tab button is clicked + change_chat_tabs(); +}); + + +$('._55ln').on('click', function() { //Facebook sidebar person is clicked + change_chat_tabs(); +}) + + +$('._552m').on('input paste', function() { // Text change in textbox. Mainly used to cover all bases + change_chat_tabs(); +}); \ No newline at end of file