MediaWiki:Common.js — различия между версиями
Alastar (обсуждение | вклад) |
Alastar (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
$( | $( | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
/** | /** |
Версия 12:45, 25 августа 2019
/* Any JavaScript here will be loaded for all users on every page load. */
$(
/**
* Determines if a given value is a number.
*/
function isNumeric(value) {
return new RegExp(/(^\d+$)|(^\d+\.\d+$)/).test(value);
}
/**
* Removes all children from an element.
*/
function removeChildren(element) {
while (element.hasChildNodes()) {
element.removeChild(element.firstChild);
}
}
mw.loader.load( '/w/index.php?title=MediaWiki:Collapsible.js&action=raw&ctype=text/javascript' );
mw.loader.load( '/w/index.php?title=MediaWiki:Calculator.js&action=raw&ctype=text/javascript' );
);