Template:Renametab
From Simple English Wikipedia, the free encyclopedia
This template will change the text of a tab.
Parameters
- 1 Something different for each tab you want to change (A, B, etc)
- 2 The tab id you want to change (ca-nstab-template, ca-edit)
- 3 The new words the tab should display
example:
{{subst:Renametab|A|ca-edit|edit}} {{subst:Renametab|B|pt-userpage|my user page}}
function renameTab{{{1}}}() {
try { var Node = document.getElementById( '{{{2}}}' ).firstChild; if ( Node.textContent ) { Node.textContent = '{{{3}}}'; } else if ( Node.innerText ) { Node.innerText = '{{{3}}}'; } else { Node.replaceChild( Node.firstChild, document.createTextNode( '{{{3}}}' ) ); } } catch(e) { }
} addOnloadHook( renameTab{{{1}}} )