vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Database of Codes/Hacks/Mods :: Change Color of Today & Yesterday - View Topic
Topic Rating: *****
Printable View
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Change Color of Today & Yesterday (16th Mar 08 at 1:29pm UTC)
This will allow you to color the words: Today & Yesterday.

The red part is the color that Today will be changed to, and the green part is the color that Yesterday will be changed to.

<script>
/*Change Color of Today & Yesterday
Coded By Wrighty
No Ripping, Reposting or Claiming*/

var _t = '#FF0000';
var _y = '#00FF00';

var _d = get('td','tag');
for(i=0;i<_d.length;i++){
    if(_d[i].innerHTML.match(/(>Today<|Yesterday)/)){
        switch (RegExp.$1){
            case 'Yesterday':
                var _n = '<font color='+_y+'>Yesterday</font>';
                break;
            case '>Today<':
                var _n = '><font color='+_t+'>Today</font><';
                break;
        }
        _d[i].innerHTML = _d[i].innerHTML.replace(RegExp.$1,_n);
    }
}
</script>


Global Footer
 Printable View

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