Post by James [a_leon] on Nov 3, 2010 14:51:02 GMT -8
<script type = "text/javascript">
// <![CDATA[
// Remove traces of social network linking or sharing
// Global Footers
// Created by James [a_leon]
var td = document.getElementsByTagName ("td");
switch (true)
{
case /register/.test (pb_action):
var re = new RegExp ("Register quickly using your social network:", "i");
for (var i = 0, l = td.length; i < l; i ++)
{
if (td.item (i).hasChildNodes () && td.item (i).firstChild.hasChildNodes () && re.test (td.item (i).firstChild.childNodes[0].data))
{
var child = (/Firefox/.test (navigator.userAgent))? td.item (i).firstChild : td.item (i).firstChild.childNodes[0];
while (child != document.getElementById ("pb_manual"))
{
child.parentNode.removeChild (child);
child = (/Firefox/.test (navigator.userAgent))? td.item (i).firstChild : td.item (i).firstChild.childNodes[0];
}
break;
}
}
break;
case /(home|login)/.test (pb_action):
var re = new RegExp ("Login (using|with) your social network or forum account:", "gi");
if (re.test (document.body.innerHTML))
{
document.body.innerHTML = document.body.innerHTML.replace (re, "");
document.getElementById("componentDiv0").parentNode.removeChild (document.getElementById("componentDiv0"));
}
break;
case /viewprofile/.test (pb_action):
var re = new RegExp ("action=linkaccount", "i");
var b = document.getElementsByTagName ("b");
for (var i = 0, l = b.length; i < l; i ++)
{
if (b.item (i).lastChild.href && re.test (b.item (i).lastChild.href))
{
b.item (i).removeChild (b.item (i).lastChild);
b.item (i).removeChild (b.item (i).lastChild);
break;
}
}
break;
case /display/.test (pb_action):
var img = document.getElementsByTagName ("img");
for (var i = 0, l = img.length; i < l; i ++)
{
if (/\[Share Topic\]/.test (img.item (i).title))
{
img.item (i).parentNode.style.display = "none";
}
}
break;
}
// ]]>
</script>
Pretty straight forward, just toss it in and all should be fine.
IE7 does not like it, I don't know about IE8.
Fx, Chrome, Safari, IE9, and Opera it worked fine in.