Widget:Script: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
WiMu (Diskussion | Beiträge) K mal sehen ... das geht bestimmt schief |
Änderung 530049 von Nachteule (Diskussion) rückgängig gemacht. |
||
| (9 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
<includeonly><script> | <includeonly><script> | ||
/* <![CDATA[ */ | /* <![CDATA[ */ | ||
function importJS( | if(typeof(importedJS) == 'undefined') importedJS = {}; | ||
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. | mw.loader.load( 'http://kamelopedia.net/index.php?title=MediaWiki:Skin/' + | ||
encodeURIComponent( | encodeURIComponent(src) + '.js&action=raw&ctype=text/javascript', 'text/javascript' ); | ||
} | } | ||
importJS("<!--{$src}-->"); | |||
/* ]]> */ | /* ]]> */ | ||
</script></includeonly> | </script></includeonly> | ||