Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(function()
{
jQuery.noConflict();
var changing = false;
var nodes = {};
/* depending on where we are (fb or gmail) define a "replacement node" that we can just use later */
if (/facebook/.test(window.location.href))
{
nodes['div.conversation'] = '.fbChatConvItem .messages span'; // chat messages in the inbox
nodes['li.webMessengerMessageGroup'] = 'span'; // the docked chat window messages
var imgNode = (function(key, img)
{
return "<span style="\"display:none\"">" + key + "</span><img alt="\":)\"" style="\"background-position:" src="\""">";
});
}
else
{
console.debug('not facebook');
}
/****
* now do the actual replacement of said node (defined above)
****/