[quote=feruzz]An alternative code for customize header names
I made a [b]simple code[/b] & now the code will easily manipulate the headers DOM structure instead using [b]('h2')[0], ('h2')[1][/b] & so on....
Use onload event the code to be execute for friends, fanof or groups
[quote]if ( ! attachOnLoadHandler(function () { cHeaders();})) window.onload = function () { cHeaders();};
function cHeaders() {
REPLACEIT.init();
}
if (typeof REPLACEIT == "undefined") { REPLACEIT = {}; }
REPLACEIT = {
head: [],
init: function() {
this.head = this.getModuleByClassName(/controlpanel/i)[0].getElementsByTagName("h1")[0];
this.head.innerHTML = "[b]YOUR TITLE NAME[/b]";
this.head = this.getModuleByClassName(/photos/i)[0].getElementsByTagName("h2")[0];
this.head.innerHTML = "[b]YOUR TITLE NAME[/b]";
this.head = this.getModuleByClassName(/blogs/i)[0].getElementsByTagName("h2")[0];
this.head.innerHTML = "[b]YOUR TITLE NAME[/b]";
this.head = this.getModuleByClassName(/reviews/i)[0].getElementsByTagName("h2")[0];
this.head.innerHTML = "[b]YOUR TITLE NAME[/b]";
this.head = this.getModuleByClassName(/moreabout/i)[0].getElementsByTagName("h2")[0];
this.head.innerHTML = "[b]YOUR TITLE NAME[/b]";
this.head = this.getModuleByClassName(/publiccomments/i)[0].getElementsByTagName("h2")[0];
this.head.innerHTML = "[b]YOUR TITLE NAME[/b]";
this.head = this.getModuleByClassName(/scrapbook/i)[0].getElementsByTagName("h2")[0];
this.head.innerHTML = "[b]YOUR TITLE NAME[/b]";
this.head = this.getModuleByClassName(/friends/i)[0].getElementsByTagName("h2")[0];
this.head.innerHTML = "[b]YOUR TITLE NAME[/b]";
this.head = this.getModuleByClassName(/fanof/i)[0].getElementsByTagName("h2")[0];
this.head.innerHTML = "[b]YOUR TITLE NAME[/b]";
this.head = this.getModuleByClassName(/groups/i)[0].getElementsByTagName("h2")[0];
this.head.innerHTML = "[b]YOUR TITLE NAME[/b]";
},
getModuleByClassName: function(sClass) {
var elm = [];
var els = document.getElementsByTagName("*") || document.all;
for (var j=0,k=els.length;j<k;j++) {
if (new RegExp(sClass).test(els[j].className))elm.push(els[j]);
}
return elm;
}
};[/quote]
save into js extension[/quote]
The old script (which used to work for me) as well as this new updated one doesnt work anymore. I tried to delete the ones I do not use (for example, the blogs and reviews), but still only the control panel header shows.