Jump to content

User:TachyonJack/modern.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by TachyonJack (talk | contribs) at 22:36, 9 June 2009. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
function languagereplace () {
if (document.getElementById('p-lang')) {
var LangNodes=document.getElementById('p-lang').getElementsByTagName('ul')[0].getElementsByTagName('li');
for( var x = 0; x < LangNodes.length; x++ ) {

LangNodes[x].getElementsByTagName('a')[0].href = 'test';//localtoEnglish(LangNodes[x].getElementsByTagName('a')[0].href);
}
}
}

addOnloadHook (languagereplace)

function localtoEnglish(localname) {
//var retval='http://translate.google.com/translate?u='+localname;
//return 'http://translate.google.com/translate?u='+localname;
//return localname;
return 'test';
}

}
importScript('User:Mr.Z-man/badimages.js');
importScript('User:AndyZ/peerreviewer.js'); //[[User:AndyZ/peerreviewer.js]]
importScript('User:Mr.Z-man/refbuttons.js');
importScript('User:Tra/sidebartranslate.js');
importScript('User:Olliminatore/sign.js');
addOnloadHook(function() {

function languagereplace () {
if (document.getElementById('p-lang')) {
var LangNodes=document.getElementById('p-lang').getElementsByTagName('ul')[0].getElementsByTagName('li');
for( var x = 0; x < LangNodes.length; x++ ) {

LangNodes[x].getElementsByTagName('a')[0].href = 'test';//localtoEnglish(LangNodes[x].getElementsByTagName('a')[0].href);
}
}
}


  document.getElementById('searchform').action = 'http://www.google.com/search'; 
  document.getElementById('searchInput').name = 'q'; 
  document.getElementById('searchGoButton').name = 'btnG'; 
  document.getElementById('mw-searchButton').name = 'btnI'; 
  document.getElementById('searchGoButton').value = 'G'; 
  document.getElementById('mw-searchButton').value = 'Lucky!'; 
  var enwp = document.createElement('input');
  enwp.id = 'as_sitesearch';
  enwp.name = 'as_sitesearch';
  enwp.value = 'en.wikipedia.org';
  enwp.type = 'hidden';
  document.getElementById('searchform').appendChild(enwp);
  return false;
});