Renaming "Interests" |
Renaming "Interests" |
![]()
Post
#1
|
|
![]() Eeeeeh gladiator ![]() ![]() ![]() ![]() Group: Member Posts: 104 Joined: Jun 2007 Member No: 538,957 ![]() |
I've looked for a code on here to rename where it says "interests" on your xanga. I've found the code before a LONG time ago, but now I can't find it anywhere. Maybe I'm not searching properly, but could anyone give me the code, please?
Thank you! |
|
|
![]() |
![]()
Post
#2
|
|
![]() always<3. ![]() ![]() ![]() ![]() Group: Official Designer Posts: 242 Joined: Mar 2006 Member No: 387,714 ![]() |
here you go. i didn't make the code though. i'm not so sure who to credit for it since i found this about 2-3 years ago.
CODE <script type="text/javascript"> function replaceWords() { // ***add the words or fragments you wish to replace below var oldWords = new Array( "Interests:", "Expertise:"); // *** add the replacing words or fragments below var newWords = new Array( "REPLACE INTERESTS HERE", "REPLACE EXPERTISE HERE"); allTableData = document.getElementsByTagName('td'); allTableHeaders = document.getElementsByTagName('th'); var collections = new Array(allTableData,allTableHeaders); for (var k = 0; k < collections.length; ++k ) { for (var i = 0; i < collections[k].length; ++i ) { if (collections[k][i].innerHTML.indexOf('TABLE') == -1) { for ( var n = 0; n < oldWords.length; ++n ) { var indx = collections[k][i].innerHTML.indexOf(oldWords[n]) while (indx != -1) { var replacement = ''; indx = collections[k][i].innerHTML.indexOf(oldWords[n]); replacement = collections[k][i].innerHTML.replace(oldWords[n], newWords[n]); collections[k][i].innerHTML = replacement; break; } } } } } } replaceWords(); </script> i added expertise, just in case you wanna replace other things. just follow the pattern if you do wanna replace more. remember the comma after each one except the last one. |
|
|
![]() ![]() |