vForums Support > Programming & Coding :: Database of Codes/Hacks/Mods :: > Hide Last Edit Until Clicked

Hide Last Edit Until Clicked - Posted By Michael (wrighty) on 31st Mar 08 at 4:35pm
This code will hide the 'last edit' information until you click the work 'last edit'. When you click that, it will show the last edit information! {Smile}

No editting required! {Smile}

<script>
/*Hide Last Edit Until Clicked
Coded By Wrighty
Do Not Rip/Repost or Claim!*/
var i = get('i','tag');

function s_h(id){
    get(id,'id').style.display = (get(id,'id').style.display=='none')? '' : 'none';
}

for(a=0;a<i.length;a++){
    if(/lastedit/.test(i[a].className)){
        var x = 'last_edit-'+a;
        with(i[a]){
            style.display='none';
            innerHTML = i[a].innerHTML.replace(/last edit/i,'');
            id = x;
        }
        var _a = document.createElement('a');
        with(_a){
            appendChild(document.createTextNode('Last Edit'));
            onclick = function(){ s_h(x); };
        }
        _b = document.createElement('i');
        with(_b){
            appendChild(_a);
            appendChild(i[a].cloneNode(true));
        }
        i[a].parentNode.replaceChild(_b, i[a]);
        break;
    }
}
</script>


Global Footer