MediaWiki:Common.js

From Wikizilla, the kaiju encyclopedia
Revision as of 17:26, 10 October 2020 by Titanollante (talk | contribs) (adjusted DVD button)
Jump to navigationJump 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.
/******************************************************************************************************************************/

/******************************************************************************************************************************/

/******************************************************************************************************************************/

/*********************************************************************** W I K I  E D I T O R B U T T O N S *******************/

/************************************************ WikiEditor Buttons/Customization ********************************************/

/******************************************************************************************************************************/

/******************************************************************************************************************************
 * Extra buttons in toolbar
 * @stats [[File:Krinkle_InsertWikiEditorButton.js]]
 ******************************************************************************************************************************/
mw.loader.using('ext.wikiEditor', function() {
	$.ajax({
		url: 'https://meta.wikimedia.org/w/index.php?title=User:Krinkle/Scripts/InsertWikiEditorButton.js&action=raw&ctype=text/javascript',
		dataType: 'script',
		cache: true
	}).done(function () {
	
		// REFERENCE with ID
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-refidbutton",
			icon: "/w/images/9/97/Editor_Button_-_Reference.png",
			label: 'Reference with ID',
			insertBefore: '<ref name="">[http://',
			insertAfter: ']</ref>',
			sampleText: ''
		});
		// BOOK CITATION
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-citebookbutton",
			icon: "/w/images/7/73/Editor_Button_-_Reference_Book.png",
			label: 'Cite book',
			insertBefore: '<ref name="">{{cite book|title= |author= |date= |publisher= |page=!!OR!!|pages= ',
			insertAfter: '|isbn=}}</ref>',
			sampleText: '...not all parameters required.--see Template:Cite_book for documentation...'
		});
		
		// WEB CITATION
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-citewebbutton",
			icon: "/w/images/3/38/Editor_Button_-_Reference_Website.png",
			label: 'Cite web',
			insertBefore: '<ref name="">{{cite web|url= |title= |author= |date= |work= |accessdate= |archiveurl= |archivedate= ',
			insertAfter: '}}</ref>',
			sampleText: ''
		});
	
		// CORRECT FORMAT GALLERY
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-gallerybutton",
			icon: "/w/images/f/f6/Editor_Button_-_Correct_Gallery.png",
			label: 'Gallery',
			insertBefore: '<gallery widths="120" position="center" captionalign="center" spacing="small">\r',
			insertAfter: '\r</gallery>',
			sampleText: 'Test Image.png'
		});
	
		// YOUTUBE EMBED
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-youtubebutton",
			icon: "/w/images/d/de/Editor_Button_-_YouTube.png",
			label: 'YouTube embed',
			insertBefore: '<youtube width="300" height="169">',
			insertAfter: '</youtube>',
			sampleText: '...Put YT video ID here; remove _width="300" height="169"_ to make default size ~ 300x169 is specifically for infoboxes and video galleries...'
		});
		
				// DAILYMOTION EMBED
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-dailymotionbutton",
			icon: "/w/images/8/8c/Editor_Button_-_Dailymotion.png",
			label: 'Dailymotion embed',
			insertBefore: '<dailymotion width="300" height="169">',
			insertAfter: '</dailymotion>',
			sampleText: '...Put Dailymotion video ID here; remove _width="300" height="169"_ to make default size ~ 300x169 is specifically for infoboxes and video galleries...'
		});
		
			// NICONICO EMBED
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-niconicobutton",
			icon: "/w/images/2/24/Editor_Button_-_NicoVideo.png",
			label: 'NicoVideo embed',
			insertBefore: '<nicovideo width="299" height="165">',
			insertAfter: '</nicovideo>',
			sampleText: '...Put Nico Nico video ID here; remove _width="299" height="165"_ to make default size ~ 299x165 is specifically for infoboxes and video galleries...'
		});
	
		// TABBER
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-infoboxtabberbutton",
			icon: "/w/images/0/08/Editor_Button_-_Tabber.png",
			label: 'Tabber',
			insertBefore: '<tabs style="color:black; padding: 0px; margin: 0px;">\r<tab name="NAMEHERE">[[File:|330px| in ]]</tab>\r',
			insertAfter: '\r<tab name="NAMEHERE2">[[File:|330px| in ]]</tab>\r</tabs>',
			sampleText: '<!---- add multiple tabs by copy pasting and changing the values ---- to replace the infobox image with a tabber, change |image = with |altimage = ---->'
		});
	
		// DVD INFO
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-dvdbutton",
			icon: "/w/images/4/4f/Editor_Button_-_DVD_Info.png",
			label: 'Insert DVD information',
			insertBefore: '\'\'\'COMPANY\'\'\' VHS[or]LaserDisc[or]Blu-ray[or]DVD (YEAR) [collection]<ref name="">[http:// Amazon.com: ]</ref>\r*\'\'\'Region:\'\'\' \r*\'\'\'Discs:\'\'\' \r*\'\'\'SRP:\'\'\' $\r*\'\'\'Audio:\'\'\' \r*\'\'\'Subtitles:\'\'\' \r*\'\'\'Special features:\'\'\' \r*\'\'\'Notes:\'\'\' ',
			insertAfter: '',
			sampleText: ''
		});
	
		// STAFF and CAST Information
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-staffcastbutton",
			icon: "/w/images/e/eb/Editor_Button_-_Staff_and_Cast.png",
			label: 'Insert Staff and Cast information',
			insertBefore: '==Staff==\r{{Staffs\r|Directed by=[[\r|Written by=\r|Produced by=\r|Executive producer=\r|Music by=\r|Cinematography by=\r|Edited by=\r|Production design by=\r|Assistant director=\r|Director of special effects=\r}}\r==Cast==\r{{Cast\r||\r||\r||\r||\r||\r||\r||\r||\r||\r||\r||\r}}',
			insertAfter: '',
			sampleText: ''
		});
	
		// FILM Tab and Nav
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-filmtabnavbutton",
			icon: "/w/images/9/95/Editor_Button_-_Nav.png",
			label: 'Tab and navigation (film)',
			insertBefore: '{{Tab}}\r{{Nav\r|type1       =\r|type2       =\r|type        =[[:Category:|Category:]]\r|name        =\r|prev        =\r|prevname    =\r|next        =\r|nextname    =\r}}',
			insertAfter: '',
			sampleText: ''
		});
	
	
		// INFOBOX KAIJU
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-infoboxkaijubutton",
			icon: "/w/images/b/b8/Editor_Button_-_Infobox_Kaiju.png",
			label: 'Kaiju infobox',
			insertBefore: '{{Kaiju Infobox\r|type1            =???\r|type2            =???\r|copyrighticon    =\r|image            =\r|caption          =\r|name             =\r|nicknames        =\r|subtitle         =\r|species          =\r|height           =?? meters\r|length           =?? meters\r|weight           =?? tons\r|forms            =\r|allies           =\r|enemies          =\r|relationships    =\r|controlled       =\r|created          =\r|portrayed        =\r|debut            =\r|last             =\r|suits            =\r|roar             =[[File:.ogg|180px|center|noicon]]{{More Roars}}\r}}',
			insertAfter: '',
			sampleText: ''
		});
	
		// INFOBOX FILM
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-infoboxfilmbutton",
			icon: "/w/images/6/68/Editor_Button_-_Infobox_Film.png",
			label: 'Film infobox',
			insertBefore: '{{Infobox Film\r|type1        =\r|type2        =\r|image        =\r|caption      =The Japanese poster for \r|name         =\r|us-title     =\r|jp-title     =\r|director     =[[\r|producer     =[[\r|writer       =[[\r|composer     =[[\r|distributor  =[[Toho]]{{sup|[[Japan|JP]]}}<br>[[]]{{sup|[[United States|US]]}}\r|rating       =\r|budget       =¥\r|gross        =¥\r|runtime      =?? minutes{{sup|[[Japan|JP]]}}<br>{{Small|(? hour, ?? minutes)}}<br />?? minutes{{sup|[[United States|US]]}}<br>{{Small|(? hour, ?? minutes)}}\r|designs     =[[\r}}',
			insertAfter: '',
			sampleText: ''
		});
	
		// INFOBOX CHARACTER
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-infoboxcharacterbutton",
			icon: "/w/images/f/f6/Editor_Button_-_Infobox_Character.png",
			label: 'Character infobox',
			insertBefore: '{{Infobox Character\r|type1             =\r|type2             =\r|image             =\r|caption           =\r|species           =\r|nationality       =\r|relationships     =\r|occupation        =\r|affiliation       =\r|firstappearance   =\r',
			insertAfter: '\r|played            =\r}}',
			sampleText: '<!--- use |debut = and |last = if the character has more than 1 appearance --->'
		});
	
		// INFOBOX TV SHOW
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-infoboxtvshowbutton",
			icon: "/w/images/2/22/Editor_Button_-_Infobox_TV.png",
			label: 'TV show infobox',
			insertBefore: '{{Infobox Series\r|type1          =\r|type2          =\r|name           =\r|image          =\r|producer       =\r|distributor    =\r|genre          =\r|aired          =\r|channel        =\r|episodes       =\r}}',
			insertAfter: '',
			sampleText: ''
		});
		
			// INFOBOX EPISODE
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-infoboxepisodebutton",
			icon: "/w/images/f/f1/Editor_Button_-_Infobox_Episode.png",
			label: 'Episode infobox',
			insertBefore: '{{Infobox Episode\r|type1           =\r|type2           =\r|name            =\r|image           =\r|series          =\r|episodeno       =\r|director        =\r|writer          =\r|specialfx       =\r|viewers         =\r|aired           =\r}}',
			insertAfter: '',
			sampleText: ''
		});
	
		// INFOBOX BOOK
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-infoboxbookbutton",
			icon: "/w/images/7/70/Editor_Button_-_Infobox_Book.png",
			label: 'Book infobox',
			insertBefore: '{{Infobox Book\r|type1        =\r|type2        =\r|image        =\r|name         =\r|author       =\r|publisher    =\r|publishdate  =\r|genre        =\r|isbn         =[[Special:BookSources/|ISBN-10: ]]<br>[[Special:BookSources/|ISBN-13: ]]\r}}',
			insertAfter: '',
			sampleText: ''
		});
	
		// INFOBOX PERSON
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-infoboxpersonbutton",
			icon: "/w/images/9/93/Editor_Button_-_Infobox_Real_Person.png",
			label: 'Real person infobox',
			insertBefore: '{{Infobox Person\r|type1          =\r|type2          =\r|name           =\r|image          =\r|caption        =\r|occupation     =\r|birthday       =\r|birthplace     =\r|first          =\r|notable        =\r|imdb           =\r|wikipedia      =\r}}',
			insertAfter: '',
			sampleText: ''
		});
	
		// INFOBOX VIDEO GAME
		krInsertWikiEditorButton({
			id: "mw-customeditbutton-infoboxvideogamebutton",
			icon: "/w/images/f/fb/Editor_Button_-_Infobox_Game.png",
			label: 'Video game infobox',
			insertBefore: '{{Infobox Game\r|type1        =\r|type2        =\r|header       =\r|image        =\r|caption      =\r|name         =\r|us-title     =\r|jp-title     =\r|publisher    =\r|developer    =\r|platforms    =\r|languages    =\r|genre        =\r}}',
			insertAfter: '',
			sampleText: ''
		});
	
	});
} );
/**************************************************/

/*************** END WikiEditor ******************/

/************************************************/