Widget:Script: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
WiMu (Diskussion | Beiträge) K hm ... |
WiMu (Diskussion | Beiträge) K auakopf |
||
| Zeile 1: | Zeile 1: | ||
<includeonly><script> | <includeonly><script> | ||
/* <![CDATA[ */ | /* <![CDATA[ */ | ||
function importJS( | function importJS(src) { | ||
// prüfen,ob JS bereits imprtiert wurde,falls ja --> return | // prüfen,ob JS bereits imprtiert wurde,falls ja --> return | ||
if ( importedJS[ | if ( importedJS[src] ) { | ||
return; | return; | ||
} | } | ||
// wird jetzt importiert,deshalb auf true setzen | // wird jetzt importiert,deshalb auf true setzen | ||
importedJS[ | importedJS[src] = true; | ||
mw.loader.load( 'http://kamelopedia.mormo.org/index.php?title=MediaWiki:Skin/' + | mw.loader.load( 'http://kamelopedia.mormo.org/index.php?title=MediaWiki:Skin/' + | ||
encodeURIComponent( | encodeURIComponent(src) + '&action=raw&ctype=text/javascript', 'text/javascript' ); | ||
} | } | ||
importJs(<!--{$src|escape:'urlpathinfo'}-->); | |||
/* ]]> */ | /* ]]> */ | ||
</script></includeonly> | </script></includeonly> | ||