User:Srhat/vector.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'); form = document.createElement('form'); form.setAttribute('method', 'post'); form.setAttribute('action', wgServer+'/w/index.php?title='+wgPageName+'/tr&action=edit&preload='+wgPageName); input = document.createElement('input'); input.setAttribute('type', 'hidden') input.setAttribute('name', 'url') input.setAttribute('value', wgServer+'/w/index.php') input2 = document.createElement('input'); input2.setAttribute('type', 'submit'); input2.setAttribute('value', 'Translate!'); form.appendChild(input); form.appendChild(input2); td.appendChild(form); 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);