MediaWiki:Common.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica
Importo script da en.wiki
Riga 475:
}
}
 
/** extract a URL parameter from the current URL **********
* From [[en:User:Lupin/autoedit.js]] and [[en:MediaWiki:Common.js]]
*
* paramName : the name of the parameter to extract
*/
function getURLParamValue( paramName, url)
{
if (typeof (url) == 'undefined' || url === null) url = document.___location.href;
var cmdRe=RegExp( '[&?]' + paramName + '=([^&#]*)' ); // Stop at hash
var m=cmdRe.exec(url);
if (m && m.length > 1) return decodeURIComponent(m[1]);
return null;
}
/** &withJS= URL parameter *******
* Allow to try custom scripts from MediaWiki space
* without editing [[Special:Mypage/monobook.js]]
*/
var extraJS = getURLParamValue("withJS");
if ( extraJS && extraJS.match("^MediaWiki:[^&<>=%]*\.js$") ) {
importScript(extraJS);
}
 
// Per bugfix: #23175
window.ta = [];