User:Sellyme/common.js
mw.loader.load( "https://en.wikipedia.org/w/index.php?title=User:%C3%9Ejarkur/NeverUseMobileVersion.js&action=raw&ctype=text/javascript" );
// This script is needed for (anonymously) logging search terms by our Squids!
// The search URL will contain the search term,
// please modify retroactively at wikt:de:MediaWiki:If-search.js;
// rather IMPORT this script; example: wikt:de:MediaWiki:If-search.js/import.
// --
// Updated on de.wiktionary by Krinkle 2011-02-08
function getID( ID ) {
return document.getElementById(ID);
}
function firstInputInID( ID ) {
return getID( ID ).getElementsByTagName( 'input' )[0];
}
function fixSearchForm( id, input ) {
var fNode = getID( id );
if ( fNode ) {
fNode.setAttribute( 'onsubmit', "SubSearch('" + id + "', '" + input + "', '/')" );
fNode.parentNode.innerHTML = getID( id ).parentNode.innerHTML; // f***ing IE
}
}
function SubSearch( id, input, delimeter ) {
var inputNode = getID(input);
var formNode = getID(id);
if ( inputNode.value === '' ) {
delimeter = '';
}
formNode.action = mw.config.get('wgArticlePath').replace( '$1', oSEAp + delimeter + inputNode.value );
// Try to remove from the