×
Create a new article
Write your page title here:
We currently have 98 articles on DC Comics Wiki. Type your article name above or create one of the articles listed here!



    DC Comics Wiki
    Revision as of 17:41, 16 March 2024 by TheDemon08 (talk | contribs)

    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.
    /* All JavaScript here will be loaded for users of the Cosmos skin */
    $( function () {
    	if ( window.JSloaded ) {
    		return;
    	}
    
    	$( "#discord-widget" ).html( '<iframe src="https://discord.com/widget?id=PLACEHOLDER&theme=dark" width="100%" height="500" allowtransparency="true" frameborder="0" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe>' );
    
    	mw.config.set( {
    		'wgAjaxLicensePreview': true
    	} );
    	if ( mw.config.get( 'wgCanonicalSpecialPageName' ) == "AdminLinks" ) {
    		$( '#mw-content-text' ).html( $( '#mw-content-text' ).html().replace( /·/g, '•' ) );
    	}
    	if ( mw.config.get( 'wgCanonicalSpecialPageName' ) == "AdminLinks" && !mw.config.get( 'wgUserGroups' ).includes( 'sysop' ) ) {
    		$( '#firstHeading' ).html( 'Permission error' );
    		$( 'title' ).html( 'Permission error - ' + mw.config.get( "wgSiteName" ) );
    		$( '#mw-content-text' ).html( '<p>You do not have permission to view admin links, for the following reason:</p><div class="permissions-errors"><p>You are not allowed to execute the action you have requested.</p>' );
    	}
    
    	if ( ( mw.config.get( "wgNamespaceNumber" ) == 2 || mw.config.get( "wgNamespaceNumber" ) == 202 ) && $( '#profile-top' ).length > 0 && mw.config.get( "wgAction" ) == "view" ) {
    		if ( !$( 'body' ).hasClass( 'mw-wiki-user-page' ) && !$( 'body' ).hasClass( 'mw-social-profile-page' ) ) {
    			$( 'body' ).addClass( 'mw-social-profile-page' );
    		}
    
    		if ( mw.config.get( "wgPageName" ).replace( 'User_profile:', 'User:' ) == "User:TheDemon08" ) {
    			$( '.hgroup' ).append( '<span class="tag tag-founder">Owner</span>' );
    		}
    	}
    
    	$.urlParam = function ( name ) {
    		var results = new RegExp( "[?&]" + name + "=([^&#]*)" ).exec(
    			window.location.href
    		);
    		if ( results == null ) {
    			return null;
    		}
    		return decodeURI( results[ 1 ] ) || 0;
    	};
    	$.extend( {
    		_urlVars: null,
    		getUrlVars: function () {
    			if ( $._urlVars === null ) {
    				var i,
    					j,
    					hash,
    					hashes = window.location.search
    					.slice( window.location.search.indexOf( "?" ) + 1 )
    					.split( "&" );
    				$._urlVars = {};
    				for ( i = 0, j = hashes.length; i < j; i++ ) {
    					hash = hashes[ i ].split( "=" );
    					$._urlVars[ hash[ 0 ] ] = hash[ 1 ];
    				}
    			}
    			return $._urlVars;
    		},
    		getUrlVar: function ( name ) {
    			return $.getUrlVars()[ name ];
    		},
    	} );
    	window.getElementsByClassName = function ( oElm, strTagName, oClassNames ) {
    		var arrReturnElements = [];
    		if ( !oElm ) {
    			return arrReturnElements;
    		}
    		if ( typeof oElm.getElementsByClassName == "function" ) {
    			var arrNativeReturn = oElm.getElementsByClassName( oClassNames );
    			if ( strTagName == "*" ) {
    				return arrNativeReturn;
    			}
    			for ( var h = 0; h < arrNativeReturn.length; h++ ) {
    				if (
    					arrNativeReturn[ h ].tagName.toLowerCase() == strTagName.toLowerCase()
    				) {
    					arrReturnElements[ arrReturnElements.length ] = arrNativeReturn[ h ];
    				}
    			}
    			return arrReturnElements;
    		}
    		var arrElements =
    			strTagName == "*" && oElm.all ?
    			oElm.all :
    			oElm.getElementsByTagName( strTagName );
    		var arrRegExpClassNames = [];
    		if ( typeof oClassNames == "object" ) {
    			for ( var i = 0; i < oClassNames.length; i++ ) {
    				arrRegExpClassNames[ arrRegExpClassNames.length ] = new RegExp(
    					"(^|\\s)" + oClassNames[ i ].replace( /\-/g, "\\-" ) + "(\\s|$)"
    				);
    			}
    		} else {
    			arrRegExpClassNames[ arrRegExpClassNames.length ] = new RegExp(
    				"(^|\\s)" + oClassNames.replace( /\-/g, "\\-" ) + "(\\s|$)"
    			);
    		}
    		var oElement;
    		var bMatchesAll;
    		for ( var j = 0; j < arrElements.length; j++ ) {
    			oElement = arrElements[ j ];
    			bMatchesAll = !0;
    			for ( var k = 0; k < arrRegExpClassNames.length; k++ ) {
    				if ( !arrRegExpClassNames[ k ].test( oElement.className ) ) {
    					bMatchesAll = !1;
    					break;
    				}
    			}
    			if ( bMatchesAll ) {
    				arrReturnElements[ arrReturnElements.length ] = oElement;
    			}
    		}
    		return arrReturnElements;
    	};
    	mw.hook( 've.saveDialog.stateChanged' ).add( function () {
    		mw.loader.load( '/w/index.php?title=MediaWiki:Standard Edit Summaries.js&action=raw&ctype=text/javascript' );
    	} );
    
    	mw.loader.using( [ "mediawiki.jqueryMsg", "mediawiki.api" ], function () {
    		if ( mw.config.get( "wgUserGroups" ).includes( "sysop" ) === true && mw.config.get( 'wgPageName' ) == 'Special:MultiUpload' ) {
    			$.when( mw.loader.using( [ "mediawiki.api" ] ) ).then( function () {
    				return new mw.Api()
    					.get( {
    						action: "query",
    						meta: "siteinfo",
    						siprop: "fileextensions",
    						format: "json",
    					} )
    					.then( function ( data ) {
    						var extensions = data.query.fileextensions,
    							e;
    						var FileExtensions = [];
    						for ( e in extensions ) {
    							FileExtensions.push( extensions[ e ].ext );
    
    						}
    						mw.config.set( {
    							'wgFileExtensions': FileExtensions
    						} );
    
    						mw.loader.load( '/w/index.php?title=MediaWiki:MultiUpload.js&action=raw&ctype=text/javascript' );
    					} );
    			} );
    		}
    
    
    		// Have categories added to images from upload description
    		if ( mw.config.get( "wgCanonicalSpecialPageName" ) === "Upload" ) {
    			if ( !$.getUrlVar( "wpForReUpload" ) )
    				jQuery( function ( $ ) {
    					"use strict";
    					var $desc = $( "#wpUploadDescription" );
    					if ( $desc.val() ) {
    						return; // If not empty then don't do anything (i.e. error message confirm page)
    					}
    
    					var params = {
    						action: "parse",
    						page: "Template:Default Upload Summary",
    						format: "json",
    						prop: "wikitext",
    					};
    					var api = new mw.Api();
    
    					api.get( params ).done( function ( data ) {
    						return $desc.val( data.parse.wikitext[ "*" ] );
    					} );
    
    					if ( window.location.href.indexOf( "wpForReUpload" ) > -1 ) {
    						return;
    					} else {
    						function verifyLicense() {
    							if ( !$( "#wpLicense" ).val() ) {
    								window.alert( "Licensing must be complete." );
    								return false;
    							}
    						}
    						$desc.closest( "form" ).submit( verifyLicense );
    					}
    				} );
    		}
    		if ( mw.config.get( "wgArticleId" ) == 0 ) {
    			if (
    				mw.config.get( "wgNamespaceNumber" ) == 0 &&
    				( $.urlParam( "action" ) == "edit" ||
    					$.urlParam( "veaction" ) == "edit" ||
    					$.urlParam( "veaction" ) == "editsource" )
    			) {
    				var ParseParams = {
    					action: "parse",
    					page: "Template:AutoNewPageButtons",
    					format: "json",
    				};
    				var ParseAPI = new mw.Api();
    
    				ParseAPI.get( ParseParams ).done( function ( data ) {
    					$( ".firstHeading" ).before( data.parse.text[ "*" ] );
    					$( ".AutoNewPageButtons" ).replaceWith(
    						"<center>" +
    						$( ".AutoNewPageButtons" )
    						.html()
    						.replace(
    							/Template:AutoNewPageButtons/g,
    							mw.config.get( "wgPageName" )
    						)
    					);
    					$( 'a[href*="&preload="]' ).attr( "target", "_self" );
    				} );
    			}
    		} else {
    			return;
    		}
    	} );
    } );
    
    // *****************************************************
    // * Experimental javascript countdown timer (Splarka) *
    // * Version 0.0.3                                     *
    // *****************************************************
    //
    // Usage example:
    //  <span class="countdown" style="display:none;">
    //  Only <span class="countdowndate">January 01 2007 00:00:00 PST</span> until New years.
    //  </span>
    //  <span class="nocountdown">Javascript disabled.</span>
    
    function updatetimer( i ) {
    	var now = new Date();
    	var then = timers[ i ].eventdate;
    	var diff = ( count = Math.floor( ( then.getTime() - now.getTime() ) / 1000 ) );
    	// catch bad date strings
    	if ( isNaN( diff ) ) {
    		timers[ i ].firstChild.nodeValue = "** " + timers[ i ].eventdate + " **";
    		return;
    	}
    
    	// determine plus/minus
    	if ( diff < 0 ) {
    		diff = -diff;
    		var tpm = "";
    	} else {
    		var tpm = "";
    	}
    	// calculate the diff
    
    	if ( diff % 60 == 1 ) {
    		var left = ( diff % 60 ) + " second ";
    	} else {
    		left = ( diff % 60 ) + " seconds ";
    	}
    	diff = Math.floor( diff / 60 );
    	if ( diff % 60 == 1 ) {
    		left = ( diff % 60 ) + " minute " + left;
    	} else {
    		if ( diff > 0 ) left = ( diff % 60 ) + " minutes " + left;
    	}
    
    	diff = Math.floor( diff / 60 );
    	if ( diff % 24 == 1 ) {
    		left = ( diff % 24 ) + " hour " + left;
    	} else {
    		if ( diff > 0 ) left = ( diff % 24 ) + " hours " + left;
    	}
    	diff = Math.floor( diff / 24 );
    	if ( diff == 1 ) {
    		left = diff + " day " + left;
    	} else {
    		if ( diff > 0 ) left = diff + " days " + left;
    	}
    	timers[ i ].firstChild.nodeValue = tpm + left;
    	// a setInterval() is more efficient, but calling setTimeout()
    	// makes errors break the script rather than infinitely recurse
    	timeouts[ i ] = setTimeout( "updatetimer(" + i + ")", 1000 );
    }
    
    function checktimers() {
    	//hide 'nocountdown' and show 'countdown'
    	var nocountdowns = getElementsByClassName( document, "span", "nocountdown" );
    	for ( var i in nocountdowns ) nocountdowns[ i ].style.display = "none";
    
    	var countdowns = getElementsByClassName( document, "span", "countdown" );
    	for ( var i in countdowns ) countdowns[ i ].style.display = "inline";
    
    	//set up global objects timers and timeouts.
    	timers = getElementsByClassName( document, "span", "countdowndate" ); //global
    	timeouts = new Array(); // generic holder for the timeouts, global
    	if ( timers.length == 0 ) return;
    	for ( var i in timers ) {
    		timers[ i ].eventdate = new Date( timers[ i ].firstChild.nodeValue );
    		updatetimer( i ); //start it up
    	}
    }
    $( checktimers );
    
    /*mw.config.set( 'wgCosmosSearchClient', {
    	fetchByTitle: function ( query, domain, limit ) {
    		limit = 6;
    
    		var xhr = fetch( 'https://' + domain + '/w/api.php?format=json&action=query&generator=prefixsearch&prop=pageprops|pageimages|extracts&redirects=&ppprop=displaytitle&piprop=thumbnail&pithumbsize=200&pilimit=' + limit + '&gpssearch=' + query + '&gpsnamespace=0&gpslimit=' + limit + '&exchars=60&exintro=false&exlimit=' + limit + '&explaintext=true&formatversion=2' )
    			.then( function ( resp ) {
    				return resp.json();
    			} ).then( function ( json ) {
    				if ( json.query && json.query.pages ) {
    					( json.query.pages ).forEach( function ( page ) {
    						if ( page.extract ) {
    							page.description = page.extract;
    
    							delete( page.extract );
    						}
    
    						if ( page.pageprops && page.pageprops.displaytitle ) {
    							page.title = ( page.pageprops.displaytitle ).replace( /<\/?[^>]+(>|$)/g, '' );
    
    							delete( page.pageprops.displaytitle );
    						}
    
    						if ( page.thumbnail && page.thumbnail.source ) {
    							page.thumbnail.url = page.thumbnail.source;
    
    							delete( page.thumbnail.source );
    						}
    					} );
    				}
    
    				if ( json.query && json.query.pages ) {
    					return {
    						results: json.query.pages
    					}
    				} else {
    					return {
    						results: []
    					}
    				}
    			} );
    		return {
    			fetch: xhr,
    			abort: function () {}
    		}
    	}
    } );*/
    
     /** Collapsible tables *********************************************************
      */
     
     var autoCollapse = 2;
     var collapseCaption = "hide";
     var expandCaption = "show";
     
     function collapseTable( tableIndex )
     {
         var Button = document.getElementById( "collapseButton" + tableIndex );
         var Table = document.getElementById( "collapsibleTable" + tableIndex );
     
         if ( !Table || !Button ) {
             return false;
         }
     
         var Rows = Table.getElementsByTagName( "tr" ); 
     
         if ( Button.firstChild.data == collapseCaption ) {
             for ( var i = 1; i < Rows.length; i++ ) {
                 Rows[i].style.display = "none";
             }
             Button.firstChild.data = expandCaption;
         } else {
             for ( var i = 1; i < Rows.length; i++ ) {
                 Rows[i].style.display = Rows[0].style.display;
             }
             Button.firstChild.data = collapseCaption;
         }
     }
     
     function createCollapseButtons()
     {
         var tableIndex = 0;
         var NavigationBoxes = new Object();
         var Tables = document.getElementsByTagName( "table" );
     
         for ( var i = 0; i < Tables.length; i++ ) {
             if ( hasClass( Tables[i], "collapsible" ) ) {
                 NavigationBoxes[ tableIndex ] = Tables[i];
                 Tables[i].setAttribute( "id", "collapsibleTable" + tableIndex );
     
                 var Button     = document.createElement( "span" );
                 var ButtonLink = document.createElement( "a" );
                 var ButtonText = document.createTextNode( collapseCaption );
     
                 Button.style.styleFloat = "right";
                 Button.style.cssFloat = "right";
                 Button.style.fontWeight = "normal";
                 Button.style.textAlign = "right";
                 Button.style.width = "6em";
     
                 ButtonLink.setAttribute( "id", "collapseButton" + tableIndex );
                 ButtonLink.setAttribute( "href", "javascript:collapseTable(" + tableIndex + ");" );
                 ButtonLink.appendChild( ButtonText );
     
                 Button.appendChild( document.createTextNode( "[" ) );
                 Button.appendChild( ButtonLink );
                 Button.appendChild( document.createTextNode( "]" ) );
     
                 var Header = Tables[i].getElementsByTagName( "tr" )[0].getElementsByTagName( "th" )[0];
                 /* only add button and increment count if there is a header row to work with */
                 if (Header) {
                     Header.insertBefore( Button, Header.childNodes[0] );
                     tableIndex++;
                 }
             }
         }
     
         for ( var i = 0;  i < tableIndex; i++ ) {
             if ( hasClass( NavigationBoxes[i], "collapsed" ) || ( tableIndex >= autoCollapse && hasClass( NavigationBoxes[i], "autocollapse" ) ) ) {
                 collapseTable( i );
             }
         }
     }
     addOnloadHook( createCollapseButtons );
    
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.