メニューを切り替える
Toggle preferences menu
個人設定を切り替える
ログインしていません
編集を行うと、IPアドレスが公開されます。

「MediaWiki:Common.js」の版間の差分

MediaWikiインターフェイスページ
編集の要約なし
編集の要約なし
1行目: 1行目:
$(function(){
$(function(){
$body = $('body');
    //spoiler block behavior
$('<div id="nav-content-size-toggle"><span></span></div>')
$('.spoiler').click(function(){
.prependTo($('#mw-head'))
$(this).toggleClass('off');
.on('click', function(){
$body.toggleClass('content-size-expanded');
$(window).trigger('resize');
});
});
// spoiler button behavior
    $('#spoilerbtn').text('Show all spoilers');
$('#spoilerbtn').click(function(){
$(this).toggleClass('hide');
$('.spoiler').toggleClass('showall');
if ($(this).is('.hide')){ $(this).text('Hide all spoilers'); }
        else { $(this).text('Show all spoilers'); }
});
});
});
$('.spoiler-content').off('click').on('click', function(){
$(this).toggleClass('show');
}).find('a').on('click', function(e){
e.stopPropagation();
});

2025年1月12日 (日) 00:07時点における版

$(function(){
    //spoiler block behavior
	$('.spoiler').click(function(){
		$(this).toggleClass('off');
	});
	// spoiler button behavior
    $('#spoilerbtn').text('Show all spoilers');
	$('#spoilerbtn').click(function(){
		$(this).toggleClass('hide');
		$('.spoiler').toggleClass('showall');
		
		if ($(this).is('.hide')){ $(this).text('Hide all spoilers'); } 
        else { $(this).text('Show all spoilers'); }
	});	
});