MediaWiki:Common.js

From Enshrouded Wiki
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
mw.loader.getScript( 'https://commons.wiki.gg/index.php?title=MediaWiki:Common-base.js&action=raw&ctype=text/javascript' ).then(function(){
////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////
/*end of mw.loader.getScript().then callback*/ });

$(function() {
	$('.druid-main-images-label').each(function() {
		$(this).off('click');
		$(this).click(function() {
			var $parent = $(this).closest('.druid-container');
			$parent.find('.druid-main-images-label, .druid-main-images-file, .druid-toggleable-data').each(function () {
				$(this).removeClass('focused');
			});
			var i = $(this).attr('data-druid');
			$(this).addClass('focused');
			$parent.find('.druid-main-images-file[data-druid=' + i + '], .druid-toggleable-data[data-druid=' + i + ']').addClass('focused');
		});
	});
});