replacing eprops and comments code not working |
replacing eprops and comments code not working |
Feb 2 2004, 12:29 PM
Post
#1
|
|
|
Member ![]() ![]() Group: Member Posts: 22 Joined: Jan 2004 Member No: 205 |
i have been having ttrouble with this code. i cant get it to work. and ive been looking at it for hours trying to see if something will jump out at me.. but nothing has yet!
CODE <!-- begin code provided by createblog.com --> <script language="_javascript"> <!-- var links = document.getElementsByTagName ('a'); for (var l = 0; l < links.length; l++) { str = links[l].innerHTML; if (str.match (/\d+:\d+ (am|pm)/i)) links[l] else if (str.match (/xanga/i)) links[l].innerHTML = str.replace (/xanga/i, "I cannot leave here×"); else if (str.match (/eprops/i)) links[l].innerHTML = str.replace (/eprops/i, "faded words×"); else if (str.match (/eprop/i)) links[l].innerHTML = str.replace (/eprop/i, "faded word×"); else if (str.match (/comments/i)) links[l].innerHTML = str.replace (/comments/i, "shaking hands×"); else if (str.match (/comment/i)) links[l].innerHTML = str.replace (/comment/i, "shaking hand×"); else if (str.match (/email it/i)) links[l].innerHTML = str.replace (/email it/i, "wasting time×"); else if (str.match (/subscribe!/i)) links[l].innerHTML = str.replace (/subscribe!/i, "All will turn to grey"); else if (str.match (/sign out/i)) links[l].innerHTML = str.replace (/sign out/i, "I cannot stay×"); else if (str.match (/Subscribe to NeAtO625/i)) links[l].innerHTML = str.replace (/Subscribe to NeAtO625/i, "Subscribe to me"); else if (str.match (/XTwisted_FlawX/i)) links[l].innerHTML = str.replace (/XTwisted_FlawX/i, "Kate"); else if (str.match (/xsoft34ballx/i)) links[l].innerHTML = str.replace (/xsoft34ballx/i, "Mrs Depp"); else if (str.match (/xshortyx14x/i)) links[l].innerHTML = str.replace (/xshortyx14x/i, "Samm"); else if (str.match (/skittles18/i)) links[l].innerHTML = str.replace (/skittles18/i, "Angela"); else if (str.match (/nunzia/i)) links[l].innerHTML = str.replace (/nunzia/i, "Nunza"); else if (str.match (/mnilax11/i)) links[l].innerHTML = str.replace (/mnilax11/i, "Non Pita"); else if (str.match (/MissChris117/i)) links[l].innerHTML = str.replace (/MissChris117/i, "Christie"); else if (str.match (/LiMpTaCoBoY/i)) links[l].innerHTML = str.replace (/LiMpTaCoBoY/i, "Tony"); else if (str.match (/KayTeeZee/i)) links[l].innerHTML = str.replace (/KayTeeZee/i, "Kate Z"); else if (str.match (/CapeSideRock00/i)) links[l].innerHTML = str.replace (/CapeSideRock00/i, "Christian"); else if (str.match (/events/i)) links[l].innerHTML = str.replace (/events/i, "Upon leaving"); else if (str.match (/reviews/i)) links[l].innerHTML = str.replace (/reviews/i, "All the colors"); else if (str.match (/view entire profile/i)) links[l].innerHTML = str.replace (/view entire profile/i, "Just like romantic verses"); else if (str.match (/sign my guestbook/i)) links[l].innerHTML = str.replace (/sign my guestbook/i, "Just like a joyous end"); }//--> </script> <!-- end code provided by createblog.com --> if any one sees where im missing any characters or whatever is wrong with this, that would be great |
|
|
|
![]() |
Feb 3 2004, 08:20 PM
Post
#2
|
|
|
Misz.Jesika ![]() ![]() ![]() Group: Member Posts: 48 Joined: Jan 2004 Member No: 2,317 |
that happened to me once, uhh i just put too much so i put sum in this:
<script type="text/javascript"> function replaceWords() { // ***add the words or fragments you wish to replace below var oldWords = new Array( "Sites I Read", "Real Name:", "Gender:", "Female", "Location:", "California", "Expertise:", "My Blogrings", "Posting Calendar", "Email:", "Stats", "Member since:", "3/29/2003", "About this Entry", "Who gave the eProps?", "Posted by:", "Original:", "Comments:", "eProps:", "2 eProps from:", "Birthday:", "2/16/1991", "Hobbies:", "Occupation:", "Student", "Get Involved!"); // *** add the replacing words or fragments below var newWords = new Array( "more and more people", "Once upon a time there were these two girls named", "there aim sn's are", "StUp1Dp1nAy203 and DiSbEzYn777", "there are both", "FLiPZ", "they are very good at", "BLoGRiNGS", "Today is", "HoLLA ", "STATUS ", "X MARKS THE SPOT!", "o6 . 15 . o3--", "ENTRY iNFo", "ePRoPS CAME FRoM", "FRoM", "iT iS... ", "cOoKies", "mIlk", "mIlK frOm", "D . o . B . ", "hmmm", "they are very good at ", "they currently attend ", "St.Victor School", "JoiN!"); 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> yeh, just change the words or add stuff. good luck |
|
|
|
neato625 replacing eprops and comments code not working Feb 2 2004, 12:29 PM
Jordan Inc. it should work, u prolly messed up sumwhere Feb 2 2004, 02:35 PM
neato625 i kinda figured i messed up somewhere. i was just ... Feb 3 2004, 05:56 AM
Kathleen <script language=javascript>
<!--
v... Feb 3 2004, 03:29 PM
neato625 thanks alot. i used Kathleen's code, and now i... Feb 4 2004, 12:33 PM![]() ![]() |