MediaWiki:Common.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Admin (Diskussion | Beiträge) |
Admin (Diskussion | Beiträge) |
||
Zeile 21: | Zeile 21: | ||
$('form[name="accountrequest"] fieldset:nth-child(3)').hide() | $('form[name="accountrequest"] fieldset:nth-child(3)').hide() | ||
− | $('form[name="accountrequest"] fieldset:nth-child(2) p | + | $('form[name="accountrequest"] fieldset:nth-child(2) p').eq(3).hide() |
$('form[name="accountrequest"] fieldset:nth-child(2) textarea').hide() | $('form[name="accountrequest"] fieldset:nth-child(2) textarea').hide() |
Version vom 24. Juni 2013, 16:32 Uhr
var setLogo = function(name) { var logo = $('div#p-logo').first() var node = logo.clone() node.find('a').css('background-image', 'url(/logos/' + name + '.png)') node.insertAfter(logo) } /* Das folgende JavaScript wird für alle Benutzer geladen. */ var classList =$('body').attr('class').split(/\s+/) $.each( classList, function(index, item){ var m = item.match(/^page-Kategorie_(.*)$/) if(m) return setLogo(m[1]) }); $('#catlinks li a').each(function(){ var cat = $(this).attr('title').split(':')[1] if(cat) return setLogo(cat) }) $('form[name="accountrequest"] fieldset:nth-child(3)').hide() $('form[name="accountrequest"] fieldset:nth-child(2) p').eq(3).hide() $('form[name="accountrequest"] fieldset:nth-child(2) textarea').hide()