Pages: 1..123456789101112

  2008-05-23 23:10:56

tweaktweakers
» FTalkAddict
FTalk Level: zero
421
0
1969-12-31

Re: the codes are possibly obselete [spoiler][quote][b][color=red]For educational purposes only.[/color][/b][/quote] An alternative code for customize header names I made a [b]simple code[/b] & now the co

[quote='biang']this is all worked Code: //REPLACE HEADER NAMES if (!attachOnLoadHandler(function() { REPLACEIT.init(); })) window.onload = function() { REPLACEIT.init(); }; if (typeof REPLACEIT == "undefined" || !REPLACEIT) { REPLACEIT = {}; } REPLACEIT = { head: [], init: function() { //Controlpanel Box Header REPLACEIT.head = REPLACEIT.getModuleByClassName(/controlpanel/i)[0].getElementsByTagName("h1")[0]; REPLACEIT.head.innerHTML = "Anti-Emo Brigade"; //Photo Gallery Box Header REPLACEIT.head = REPLACEIT.getModuleByClassName(/photos/i)[0].getElementsByTagName("h2")[0]; REPLACEIT.head.innerHTML = "AEB Gallery"; //Blogs Box Header REPLACEIT.head = REPLACEIT.getModuleByClassName(/blogs/i)[0].getElementsByTagName("h2")[0]; REPLACEIT.head.innerHTML = "Journal"; //Reviews Box Header REPLACEIT.head = REPLACEIT.getModuleByClassName(/reviews/i)[0].getElementsByTagName("h2")[0]; REPLACEIT.head.innerHTML = ""; //Publiccomments Box Header REPLACEIT.head = REPLACEIT.getModuleByClassName(/publiccomments/i)[0].getElementsByTagName("h2")[0]; REPLACEIT.head.innerHTML = "Opinions/Comments"; //Friends Box Header REPLACEIT.head = REPLACEIT.getModuleByClassName(/friends/i)[0].getElementsByTagName("h2")[0]; REPLACEIT.head.innerHTML = "Staffs"; //Groups Box Header REPLACEIT.head = REPLACEIT.getModuleByClassName(/groups/i)[0].getElementsByTagName("h2")[0]; REPLACEIT.head.innerHTML = "AEB Group"; }, 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] How come that it's not working?

Pages: 1..123456789101112

Board footer

© 2024 F Talk

Current time is 23:51

[ 12 queries - 0.017 second ]
Privacy Policy