<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://eurovision.jobogamer.xyz/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-citations.js</id>
	<title>MediaWiki:Gadget-citations.js - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://eurovision.jobogamer.xyz/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-citations.js"/>
	<link rel="alternate" type="text/html" href="https://eurovision.jobogamer.xyz/index.php?title=MediaWiki:Gadget-citations.js&amp;action=history"/>
	<updated>2026-07-25T10:29:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.4</generator>
	<entry>
		<id>https://eurovision.jobogamer.xyz/index.php?title=MediaWiki:Gadget-citations.js&amp;diff=127&amp;oldid=prev</id>
		<title>Alfie: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://eurovision.jobogamer.xyz/index.php?title=MediaWiki:Gadget-citations.js&amp;diff=127&amp;oldid=prev"/>
		<updated>2026-03-19T09:58:27Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 05:58, 19 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Alfie</name></author>
	</entry>
	<entry>
		<id>https://eurovision.jobogamer.xyz/index.php?title=MediaWiki:Gadget-citations.js&amp;diff=126&amp;oldid=prev</id>
		<title>en&gt;Novem Linguae: remove ?slow=1. this doesn&#039;t support slow mode anymore. cc User:Redalert2fan. https://github.com/ms609/citation-bot/commit/9b0f64baa6fd48e70aa2d7d52f9cce4aab288fa7</title>
		<link rel="alternate" type="text/html" href="https://eurovision.jobogamer.xyz/index.php?title=MediaWiki:Gadget-citations.js&amp;diff=126&amp;oldid=prev"/>
		<updated>2025-12-27T18:49:48Z</updated>

		<summary type="html">&lt;p&gt;remove ?slow=1. this doesn&amp;#039;t support slow mode anymore. cc &lt;a href=&quot;/index.php?title=User:Redalert2fan&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:Redalert2fan (page does not exist)&quot;&gt;User:Redalert2fan&lt;/a&gt;. https://github.com/ms609/citation-bot/commit/9b0f64baa6fd48e70aa2d7d52f9cce4aab288fa7&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/*  _____________________________________________________________________________&lt;br /&gt;
 * |                                                                             |&lt;br /&gt;
 * |                    === WARNING: GLOBAL GADGET FILE ===                      |&lt;br /&gt;
 * |                  Changes to this page affect many users.                    |&lt;br /&gt;
 * | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |&lt;br /&gt;
 * |_____________________________________________________________________________|&lt;br /&gt;
 *&lt;br /&gt;
 * Imported from version 1.0 as of 17:18, 9 April 2011 (UTC) from [[User:Smith609/citations.js]]&lt;br /&gt;
 * Adds a &amp;quot;Citation bot&amp;quot; link to the toolbox, and a button beneath edit fields, see [[User:Smith609/citations]]&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// @Version 1.0 - Adds an &amp;quot;Expand citations&amp;quot; link to the toolbox, and a button beneath edit fields.&lt;br /&gt;
// @Version 1.1 - Modify gadget to use jQuery and Citation Bot&amp;#039;s new gadgetapi on Tool Labs&lt;br /&gt;
// @Version 1.2 - Make use of new oojs-ui widget style&lt;br /&gt;
&lt;br /&gt;
var $spinnerspan;&lt;br /&gt;
var cbButton;&lt;br /&gt;
&lt;br /&gt;
function addCBToToolbox() {&lt;br /&gt;
	if ( mw.config.get( &amp;#039;wgCanonicalNamespace&amp;#039; ) !== &amp;#039;Special&amp;#039; ) {&lt;br /&gt;
		var pTb = document.getElementById(&amp;quot;p-tb&amp;quot;);&lt;br /&gt;
		if ( !pTb ) {&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
		var escPageName = encodeURIComponent( mw.config.get( &amp;#039;wgPageName&amp;#039; ));&lt;br /&gt;
		mw.util.addPortletLink(&amp;quot;p-tb&amp;quot;, &amp;quot;//citations.toolforge.org/process_page.php?edit=toolbar&amp;amp;slow=1&amp;amp;page=&amp;quot;+escPageName, &amp;#039;Expand citations&amp;#039;, &amp;#039;t-citationbot&amp;#039;, &amp;quot;Expand citations and fix common formatting errors&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Add a citation bot button next to the &amp;quot;Show changes&amp;quot; button&lt;br /&gt;
function addCitationButton() {&lt;br /&gt;
	if ( document.getElementById( &amp;#039;wpDiff&amp;#039; ) ) {&lt;br /&gt;
		var diff = document.getElementById( &amp;#039;wpDiffWidget&amp;#039; );&lt;br /&gt;
		cbButton = new OO.ui.ButtonWidget();&lt;br /&gt;
&lt;br /&gt;
		cbButton.setElementId( &amp;#039;wpCitations&amp;#039; )&lt;br /&gt;
		.setIcon( &amp;#039;articleCheck&amp;#039; )&lt;br /&gt;
		.setLabel( &amp;#039;Citations&amp;#039; )&lt;br /&gt;
		.setFlags( &amp;#039;secondary&amp;#039; );&lt;br /&gt;
&lt;br /&gt;
		cbButton.on( &amp;#039;click&amp;#039;, function () {&lt;br /&gt;
			$.ajax( {&lt;br /&gt;
				timeout: 600000, // thousandths of a second, so 10 minutes&lt;br /&gt;
				type: &amp;#039;POST&amp;#039;,&lt;br /&gt;
				url: &amp;#039;https://citations.toolforge.org/gadgetapi.php&amp;#039;,&lt;br /&gt;
				data: {&lt;br /&gt;
					text: $( &amp;#039;#wpTextbox1&amp;#039; ).textSelection( &amp;#039;getContents&amp;#039; ),&lt;br /&gt;
					summary: $( &amp;#039;#wpSummary&amp;#039; ).textSelection( &amp;#039;getContents&amp;#039; )&lt;br /&gt;
				},&lt;br /&gt;
				beforeSend: function() {&lt;br /&gt;
					$( cbButton.$element ).replaceWith( $spinnerspan );&lt;br /&gt;
				},&lt;br /&gt;
				success: function( data ) {&lt;br /&gt;
					expandedText = data.expandedtext;&lt;br /&gt;
					editSummary = data.editsummary;&lt;br /&gt;
					$( &amp;#039;#loader&amp;#039; ).replaceWith( cbButton.$element );&lt;br /&gt;
					if ( expandedText ) {&lt;br /&gt;
						// Populate text box with received expanded text&lt;br /&gt;
						$( &amp;#039;#wpTextbox1&amp;#039; ).textSelection( &amp;#039;setContents&amp;#039;, expandedText );&lt;br /&gt;
						// Populate edit summary textbox with received edit summary&lt;br /&gt;
						$( &amp;#039;#wpSummary&amp;#039; ).textSelection( &amp;#039;setContents&amp;#039;, editSummary );&lt;br /&gt;
						// Click &amp;#039;Show preview&amp;#039; button&lt;br /&gt;
						$( &amp;#039;#wpDiff&amp;#039; ).click();&lt;br /&gt;
					} else {&lt;br /&gt;
						$( &amp;#039;#loader&amp;#039; ).replaceWith( cbButton.$element );&lt;br /&gt;
						alert( &amp;#039;Error: Replacement text empty&amp;#039; );&lt;br /&gt;
					}&lt;br /&gt;
				},&lt;br /&gt;
				error: function( data ) {&lt;br /&gt;
					$( &amp;#039;#loader&amp;#039; ).replaceWith( cbButton.$element );&lt;br /&gt;
					alert( &amp;#039;Error: Citations request failed&amp;#039; );&lt;br /&gt;
				}&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
		&lt;br /&gt;
		cbButton.$element.insertBefore( $(diff.nextSibling) );&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Add a button to allow expanding citations in the text in the edit textbox&lt;br /&gt;
mw.hook( &amp;#039;wikipage.editform&amp;#039; ).add( function() {&lt;br /&gt;
	if( !$spinnerspan ) {&lt;br /&gt;
		$spinnerspan = $( &amp;#039;&amp;lt;span id=&amp;quot;loader&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;#039;);&lt;br /&gt;
	}&lt;br /&gt;
	if ( document.images ) {&lt;br /&gt;
		// Loading gif when Citations request is processing&lt;br /&gt;
		var spinner = new Image();&lt;br /&gt;
		spinner.src = &amp;quot;//upload.wikimedia.org/wikipedia/commons/4/42/Loading.gif&amp;quot;;&lt;br /&gt;
		$spinnerspan.append( spinner );&lt;br /&gt;
	}&lt;br /&gt;
	if( $(&amp;#039;#wpCitations&amp;#039;).length === 0 ){&lt;br /&gt;
		mw.loader.using( [ &amp;#039;oojs-ui-core&amp;#039;, &amp;#039;oojs-ui.styles.icons-content&amp;#039;, &amp;#039;jquery.textSelection&amp;#039; ] ).then( addCitationButton );&lt;br /&gt;
	}&lt;br /&gt;
} );&lt;br /&gt;
&lt;br /&gt;
// Add a toolbox button that runs Citation Bot on the most recent saved revision of the page&lt;br /&gt;
if ( $.inArray( mw.config.get( &amp;#039;skin&amp;#039; ), [&amp;#039;monobook&amp;#039;, &amp;#039;modern&amp;#039;, &amp;#039;vector&amp;#039;, &amp;#039;vector-2022&amp;#039;, &amp;#039;timeless&amp;#039;] ) !== -1 ) {&lt;br /&gt;
  $( addCBToToolbox );&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>en&gt;Novem Linguae</name></author>
	</entry>
</feed>