1
Fork 0

Use new files in injection script

This commit is contained in:
Jake Howard 2015-08-20 11:05:40 +01:00
parent ad8faefbdc
commit a12c9bae6f
3 changed files with 15 additions and 19 deletions

View file

@ -1,6 +1,4 @@
var image_decoder = { // Image tag : Image URL var image_decoder = { // Image tag (no brackets) : Image URL
"noot" : ""
} }
module.exports = image_decoder;

View file

@ -1,17 +1,15 @@
$('.fbNubFlyout').on('DOMNodeInserted DOMNodeRemoved change load', function(event) { function change_chat_tabs() {
$('._d97').each(function(){ $('._d97').each(function(){
$(this).html($(this).html().replace('expected', for (var i = 0; i < image_decoder.length; i++) {
"<img class='emoticon' style='height: 30px; width: 30px;' src='http://icons.iconarchive.com/icons/hopstarter/sleek-xp-software/256/Yahoo-Messenger-icon.png'/>" $(this).html($(this).html().replace(image_decoder[i][0],
"<img class='emoticon' style='height: 30px; width: 30px;' src='" + image_decoder[i][1] + "'/>"
)); ));
console.log("Change made!");
});
});
window.setInterval(function(){ //Force it every now and then
elements = $('.fbNubFlyout');
if (elements.length != 0) {
elements.trigger('change');
} }
}, 5000); });
}
$('.fbNubFlyout').on(
'DOMNodeInserted DOMNodeRemoved change load', function(event) {
change_chat_tabs();
});

View file

@ -1,4 +1,4 @@
var site_decoder = { // Site Identifier : Injection JS var site_decoder = { // Site Identifier : Injection JS
"*.facebook.com":"facebook.js"
} }
module.exports = site_decoder; module.exports = site_decoder;