User:Srhat/common.js

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
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);