is there a way that I could have a code in which that you add onto the username. Basically I want all my users to have a tS: at the beginning of their username
of their username?![]()
Or their displayname?
displayname, sorry for the mix up![]()
try this:
Code:
- <script>
- var pref = 'tS: '; //This is the prefix
- var a = document.getElementsByTagName('a');
- for(i=0;i<a.length;i++){
- if(a[i].href.match(/\/view_profile\//i) && a[i].href.match(/\/user\//)){
- a[i].innerHTML= pref + a[i].innerHTML
- }
- }
- </script>
Simply modify: var pref = ...
That should do it!![]()
Hehe, you're the greatest Wrighty![]()
Glad it worked!![]()
Just so that people don't accidentally end up having double of the "tS:" in their name, you could try this:
Code:
- <script>
- var pref = 'tS: '; //This is the prefix
- var a = document.getElementsByTagName('a');
- for(i=0;i<a.length;i++){
- if(a[i].href.match(//view_profile//i) && a[i].href.match(//user//) && !a[i].innerHTML.match(new RegExp(pref,"i"))){
- a[i].innerHTML= pref + a[i].innerHTML
- }
- }
- </script>
thanks I had to go through everyone in the forum that already had it (everyone -__-) and fix
thanks I had to go through everyone in the forum that already had it (everyone -__-) and fix
Haha, sorry that I was a bit late.![]()
actually it doesn't work..![]()
actually it doesn't work..![]()
Thought it might not; hold on, I know what the error is.![]()
EDIT: Hmm, for some reason when I copied it the first time it removed some backslashes.![]()
Code:
- <script>
- var pref = 'tS: '; //This is the prefix
- var a = document.getElementsByTagName('a');
- for(i=0;i<a.length;i++){
- if(a[i].href.match(/\/view_profile\//i) && a[i].href.match(/\/user\//) && !a[i].innerHTML.match(new RegExp(pref,"i"))){
- a[i].innerHTML= pref + a[i].innerHTML
- }
- }
- </script>
There ya go.![]()