מדיה ויקי:Common.js: הבדלים בין גרסאות בדף
עזב"ק |
אין תקציר עריכה |
||
| (4 גרסאות ביניים של 3 משתמשים אינן מוצגות) | |||
| שורה 40: | שורה 40: | ||
importScript( 'MediaWiki:Portals.js' ); // פורטלים מתחלפים בעמוד הראשי | importScript( 'MediaWiki:Portals.js' ); // פורטלים מתחלפים בעמוד הראשי | ||
} | } | ||
} | } | ||
| שורה 255: | שורה 251: | ||
// Detects uses of template "טען סקריפט" | // Detects uses of template "טען סקריפט" | ||
// and loads specifically-named scripts or gadgets. | // and loads specifically-named scripts or gadgets. | ||
// for a gadget, its name as defined in gadgets-definition must begin with "ondemand-" | // for a gadget, its name as defined in gadgets-definition must begin with "ondemand-" | ||
if ( mw.config.get('wgCanonicalNamespace') !== 'Special' ) | if ( mw.config.get('wgCanonicalNamespace') !== 'Special' ) | ||
| שורה 261: | שורה 256: | ||
var beenthere = {}; | var beenthere = {}; | ||
$( '.executeJS', content ).each( function () { | $( '.executeJS', content ).each( function () { | ||
var gadget = $( this ).data( 'gadgetname' ); | var gadget = $( this ).data( 'gadgetname' ); | ||
if ( gadget && $.trim( gadget ) ) mw.loader.load( 'ext.gadget.ondemand-' + $.trim( gadget ) ); // np repetitions - resourceloader takes care | if ( gadget && $.trim( gadget ) ) mw.loader.load( 'ext.gadget.ondemand-' + $.trim( gadget ) ); // np repetitions - resourceloader takes care | ||
} ); | } ); | ||
} ); | } ); | ||