FSTUTS FORUMERS
Dont forget to join!

Please Read the forum rules and regulations before posting^_^

Thank You!

Navigation Dropdown

Go down

Navigation Dropdown

Post by Psycho Dancer on Wed Jun 03, 2009 10:33 pm

Spoiler:
function addBox(head,code,id,siblingafter) { /* head: html string title null - no header bar code: html string content id: unique string css pointer siblingafter: regexp classname 'left' - mainbar column end 'right' - sidebar column end */ try { var li=document.createElement("li"); } catch(e) { var li=document.createElement("
  • "); } if(!head) head=""; else head="

    "+head+"

    "; li.innerHTML="
    "+ head+ "
    "+ code+ "
    "+ "
    "; if(siblingafter=="left") getElementsByClass(/commonbox[\s]*?controlpanel/i,null,"DIV")[0].parentNode.parentNode.appendChild(li); else if(siblingafter=="right") getElementsByClass(/commonbox[\s]*?friends/i,null,"DIV")[0].parentNode.parentNode.appendChild(li); else { var si=getElementsByClass(siblingafter,null,"DIV")[0]; si.parentNode.parentNode.insertBefore(li,si.parentNode); } } function getElementsByClass(searchClass,node,tag) { var classElements = new Array(); if ( node == null ) node = document; if ( tag == null ) tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp(searchClass); for (i = 0, j = 0; i < elsLen; i++) { if ( pattern.test(els[i].className) ) { classElements[j] = els[i]; j++; } } return classElements; } var header=""; var code="



    "; addBox(header,code,"custombox_821",/commonbox[\s]*?controlpanel/i);




  • Just paste it on your External JS

    Tip for advance user's you can edit the codes that's all

    _________________
    Just Give me Repu or Thanks by Clicking the + in my field if i help You ^^



    I love my Haterz coZ thEy make me famous


    avatar
    Psycho Dancer
    MOD
    MOD

    Posts : 166
    Reputation : 45
    Join date : 2009-05-27
    Age : 28
    Location : Binangonan Rizal

    http://www.friendster.com/psychodancer

    Back to top Go down

    Back to top

    - Similar topics

     
    Permissions in this forum:
    You cannot reply to topics in this forum