Thanks for using our site!

If you're looking to become an editor, please read the Becoming an Editor section carefully.

MediaWiki:Mobile.js: Difference between revisions

From ranchstory
Jump to navigationJump to search
imported>Kiwibasket
No edit summary
No edit summary
Tag: Manual revert
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
/* All JavaScript here will be loaded for users of the mobile site */
/* All JavaScript here will be loaded for users of the mobile site */
mw.loader.using('mobile.site.styles')
<!-- Spoiler Tag -->
/*
    Template:Spoiler on dev.miraheze.org
*/
$(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'); }
});
});
// [[Category:Scripts]]
<!-- End Spoiler Tag -->

Latest revision as of 12:20, 4 April 2026

/* All JavaScript here will be loaded for users of the mobile site */

mw.loader.using('mobile.site.styles')

<!-- Spoiler Tag -->
/*
    Template:Spoiler on dev.miraheze.org
*/
$(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'); }
	});	
});
// [[Category:Scripts]]
<!-- End Spoiler Tag -->