|
Thanks for using our site! |
MediaWiki:Mobile.js: Difference between revisions
From ranchstory
Jump to navigationJump to search
imported>Kiwibasket Created page with "→All JavaScript here will be loaded for users of the mobile site: mw.loader.using('mobile.site.styles');" |
Kiwibasket (talk | contribs) No edit summary Tag: Manual revert |
||
| (6 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'); | 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 -->