MediaWiki:Timeless.js

From Tardis Wiki, the free Doctor Who reference
Revision as of 23:53, 5 April 2024 by Tardis sysadmin (talk | contribs) (formatting)
Clear your cache often around here

After changes are made to this site's CSS or Javascript, you have to bypass your browser's cache to see the changes. You can always do this by going to your browser's preferences panel. But many browsers also offer keyboard shortcuts to save you that trouble. The following shortcuts work in the versions of the browsers that Tardis currently supports. They may not work in earlier versions.

  • Firefox: hold down Shift while performing a page reload.
  • Opera offers no default keyboard shortcut, but you can create a custom keyboard shortcut with the value Clear disk cache
  • Safari users should simultaneously hold down + Option + E. You may need to enable the Develop menu first
  • Chrome: press Ctrl + F5 or Shift + F5 while performing a page reload.
/* All JavaScript here will be loaded for users of the Timeless skin */

/* Gadget-pullout_move.js */
var elementToMove1 = document.querySelector('.pullout-wrapper ~ #subpage-article');
var parentElement1 = elementToMove1.parentNode;
var siblingElement1 = parentElement1.querySelector('.pullout-wrapper');
parentElement.insertBefore(elementToMove1, siblingElement1);

var elementToMove2 = document.querySelector('#article-type ~ #subpage-article');
var parentElement2 = elementToMove2.parentNode;
var siblingElement2 = parentElement2.querySelector('#article-type');
parentElement.insertBefore(elementToMove2, siblingElement2);

/* Gadget-page_size.js */
var scrollHeight = $('.client-js').height();
if( scrollHeight > 1589 ) {
	$('.mediawiki').addClass('long-page');
	$('.mediawiki').removeClass('short-page');
} else{
	$('.mediawiki').addClass('short-page');
	$('.mediawiki').removeClass('long-page');
}