MediaWiki:Common.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 7: | Zeile 7: | ||
if (wgNamespaceNumber != 6) | if (wgNamespaceNumber != 6) | ||
// importScript('mediawiki:popup.js'); | // importScript('mediawiki:popup.js'); | ||
− | mw.loader.load( 'https://www.univie.ac.at/rel_jap/r/index.php?title=MediaWiki:Popup.js' ); | + | mw.loader.load( 'https://www.univie.ac.at/rel_jap/r/index.php?title=MediaWiki:Popup.js', 'text/javascript' ); |
/*** GLOSSAR ***/ | /*** GLOSSAR ***/ | ||
// s.a. vorlage:glossar | // s.a. vorlage:glossar |
Version vom 16. Dezember 2018, 21:43 Uhr
for (var i in wgUserGroups)
if (wgUserGroups[i] === 'sysop')
var sysopRights = true;
/*** POPUPS ***/
if (wgNamespaceNumber != 6)
// importScript('mediawiki:popup.js');
mw.loader.load( 'https://www.univie.ac.at/rel_jap/r/index.php?title=MediaWiki:Popup.js', 'text/javascript' );
/*** GLOSSAR ***/
// s.a. vorlage:glossar
$('.glossar').each(function(){
var child = $(this).find('.g_box')
, parent = $(this).closest('p, li') ;
$( parent).css("position", "relative");
var diff = ($(this).width() - $(child).width()) / 2
, left = $(this).position().left + diff
, right = $(parent).width() - ($(this).position().left + $(child).width() + 14);
if ( left < -10) {
$( child).css("left", diff - left -10 + 'px');
}
if (right < 0 ) {
$( child).css("left", right + 'px');
}
$( this).click(function(){ $( child).slideToggle('slow'); });
$( this).mouseleave(function(){ $(child).slideUp('slow'); });
});