User:Srhat/common.js

function DisplayTranslateButton { contentElt = document.getElementById('bodyContent'); catlinksElt = document.getElementById('catlinks'); footerElt = document.createElement('table'); footerElt.setAttribute('id', 'footertemplate'); footerElt.setAttribute('style', 'border: 1px solid #aaa; background:#f9f9f9; margin-top:1em; clear:both;'); footerElt.setAttribute('width', '100%'); /* Begin footer HTML code */ tr = document.createElement('tr'); td = document.createElement('td'); td.setAttribute('align', 'center'); buttonLink = wgServer + '/w/index.php?title=' + wgPageName + '/tr&action=edit' button = document.createElement('button'); button.setAttribute('onClick', 'window.location='+buttonLink); button.setAttribute('style', 'width:160; height:24'); text = document.createTextNode('Translate!'); button.appendChild(text); td.appendChild(button); tr.appendChild(td); /* inputBox = document.createElement('input'); inputBox.setAttribute(') sonraki iş */ footerElt.appendChild(tr); /* End footer HTML code */ if(catlinksElt) // place footer before category box contentElt.insertBefore(footerElt, catlinksElt); else contentElt.appendChild(footerElt); } addOnloadHook(DisplayTranslateButton);