vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Database of Codes/Hacks/Mods :: Switch-It - View Topic
Topic Rating: *****
Printable View
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 32
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Switch-It (17th Feb 08 at 7:41pm UTC)
Description: This code simply replaces any one word/phrase with any other word/phrase. This is good when needing to replace things longer than the censored words list will allow. {Smile}

Placement: Any footer, depending on what it's needed for.

How To Use: Simply repeat the switchIt() line for each thing that needs replacing. {Smile}

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. /* Switch-It by Cr0w */
  4. function switchIt(word,word2){
  5.     var f = document.getElementsByTagName("font");
  6.     for(i=0;i<f.length;i++){
  7.         f[i].innerHTML = f[i].innerHTML.replace(word,word2);
  8.     }
  9. }
  10.  
  11. switchIt("WORD TO REPLACE","REPLACEMENT");
  12. //-->
  13. </script>
 

rroll.to— Shorten a link, rickroll your friends.
 Printable View

All times are GMT+0 :: The current time is 4:16pm
Page generated in 0.163 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums