|
Thanks for using our site! |
MediaWiki:Common.js: Difference between revisions
From ranchstory
Jump to navigationJump to search
No edit summary |
Kiwibasket (talk | contribs) No edit summary |
||
| Line 34: | Line 34: | ||
</script> | </script> | ||
<!-- End Matomo Tag Manager --> | <!-- End Matomo Tag Manager --> | ||
/* | |||
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]] | |||
Revision as of 13:17, 4 April 2026
/* Any JavaScript here will be loaded for all users on every page load. */
/* Loads the JS Required fro the Discord Widget */
mw.loader.load( '/w/index.php?title=MediaWiki:DiscordWidget.js&action=raw&ctype=text/javascript' );
// /* Loads the JS Required for a Twitter Widget */
// window.twttr = (function(d, s, id) {
// var js, fjs = d.getElementsByTagName(s)[0],
// t = window.twttr || {};
// if (d.getElementById(id)) return t;
// js = d.createElement(s);
// js.id = id;
// js.src = "https://platform.twitter.com/widgets.js";
// fjs.parentNode.insertBefore(js, fjs);
// t._e = [];
// t.ready = function(f) {
// t._e.push(f);
// };
// return t;
// }(document, "script", "twitter-wjs"));
// /* Loads the JS Required fro the Twitter Widget */
// mw.loader.load( '/w/index.php?title=MediaWiki:TwitterWidget.js&action=raw&ctype=text/javascript' );
/* adds imagemap capabilities to images */
mw.loader.load('//he.wikipedia.org/w/index.php?title=Mediawiki:Gadget-ime.js&action=raw&ctype=text/javascript');
<!-- Matomo Tag Manager -->
<script>
var _mtm = window._mtm = window._mtm || [];
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
(function() {
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src='https://wiki.ranchstory.farm/matomo/js/container_jkE94F60.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Tag Manager -->
/*
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]]