User:SPIKE/uncyclopedia.js

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search

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

  • Internet Explorer: hold down the Ctrl key and click the Refresh or Reload button, or press Ctrl+F5.
  • Firefox: hold down the Shift key while clicking Reload; alternatively press Ctrl+F5 or Ctrl-Shift-R.
  • Opera, Konqueror and Safari users can just click the Reload button.
  • Chrome: press Ctrl+F5 or Shift+F5
// To disable Flash on all pages, submit this form.
// To auto-enable Flash on all pages, change the below value to true.
var displayFlashOverride = false;

// Bizzeebeever wizardry for Special:RecentChanges and Special:Watchlist

if ( document.location.href.match( /special:recentchanges|special:watchlist/i ) ) {

// Script to add a control to quickly patrol changes in Special:RecentChanges
  importScript( "User:Bizzeebeever/scripts/patrol.js" );

// Other code for Special:RecentChanges
// SUPERSEDED BELOW
//  importScript( "User:Bizzeebeever/scripts/recentchanges.js" );

// Add an Unwatch control to every item in my watch list
  importScript( "User:Bizzeebeever/scripts/watchgadget.js" );
  }

// Disable all animations
jQuery.fx.off = true;

//-------------------------------------------------------------------------------------
//hack for removing .makeCollapsible() from Special:Watchlist and Special:RecentChanges
//To use this: copy to your own User:[your name]/uncyclopedia.js or User:[your name]/monobook.js file
//DO NOT use importScript() for this. Async load WILL NOT WORK.
if ( document.location.href.match( /special:recentchanges|special:watchlist/i ) ) {
	//ha-ha! Use your fucking technology against you, mediawiki!
	var stub = function() { return $( this ) };
	if ( jQuery.fn.makeCollapsible )
		jQuery.fn.makeCollapsible = stub
	else
		mw.loader.implement( "jquery.makeCollapsible", stub, {}, {} );
 
	importStylesheet( "User:Bizzeebeever/styles/recentchanges.css" );
	$( ".mw-collapsible-toggle" ).live( "click", function() {
		var $this = $( this ), $parent = $this.parents( "table" );
 
		//toggle style class
		$parent.toggleClass( "mw-rcexpanded" );
 
		//toggle arrow symbol
		$this.find( ".mw-rc-openarrow" ).toggle();
		$this.find( ".mw-rc-closearrow" ).toggle();
 
		//squelch event
		//prevents browser from navigating to "#" link
		return false;
		} );
	}