<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bharatpedia.org/w/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-twinkleimage.js</id>
	<title>MediaWiki:Gadget-twinkleimage.js - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://en.bharatpedia.org/w/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-twinkleimage.js"/>
	<link rel="alternate" type="text/html" href="https://en.bharatpedia.org/w/index.php?title=MediaWiki:Gadget-twinkleimage.js&amp;action=history"/>
	<updated>2026-08-22T05:38:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://en.bharatpedia.org/w/index.php?title=MediaWiki:Gadget-twinkleimage.js&amp;diff=303788&amp;oldid=prev</id>
		<title>ImportMaster: robot: Import pages to supprt Twinkle</title>
		<link rel="alternate" type="text/html" href="https://en.bharatpedia.org/w/index.php?title=MediaWiki:Gadget-twinkleimage.js&amp;diff=303788&amp;oldid=prev"/>
		<updated>2021-09-08T15:53:55Z</updated>

		<summary type="html">&lt;p&gt;robot: Import pages to supprt Twinkle&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;// &amp;lt;nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(function($) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
 ****************************************&lt;br /&gt;
 *** twinkleimage.js: Image CSD module&lt;br /&gt;
 ****************************************&lt;br /&gt;
 * Mode of invocation:     Tab (&amp;quot;DI&amp;quot;)&lt;br /&gt;
 * Active on:              Local nonredirect file pages (not on Commons)&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
Twinkle.image = function twinkleimage() {&lt;br /&gt;
	if (mw.config.get(&amp;#039;wgNamespaceNumber&amp;#039;) === 6 &amp;amp;&amp;amp; mw.config.get(&amp;#039;wgArticleId&amp;#039;) &amp;amp;&amp;amp; !document.getElementById(&amp;#039;mw-sharedupload&amp;#039;) &amp;amp;&amp;amp; !Morebits.isPageRedirect()) {&lt;br /&gt;
		Twinkle.addPortletLink(Twinkle.image.callback, &amp;#039;DI&amp;#039;, &amp;#039;tw-di&amp;#039;, &amp;#039;Nominate file for delayed speedy deletion&amp;#039;);&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Twinkle.image.callback = function twinkleimageCallback() {&lt;br /&gt;
	var Window = new Morebits.simpleWindow(600, 330);&lt;br /&gt;
	Window.setTitle(&amp;#039;File for dated speedy deletion&amp;#039;);&lt;br /&gt;
	Window.setScriptName(&amp;#039;Twinkle&amp;#039;);&lt;br /&gt;
	Window.addFooterLink(&amp;#039;Speedy deletion policy&amp;#039;, &amp;#039;BP:CSD#Files&amp;#039;);&lt;br /&gt;
	Window.addFooterLink(&amp;#039;Image prefs&amp;#039;, &amp;#039;BP:TW/PREF#image&amp;#039;);&lt;br /&gt;
	Window.addFooterLink(&amp;#039;Twinkle help&amp;#039;, &amp;#039;BP:TW/DOC#image&amp;#039;);&lt;br /&gt;
	Window.addFooterLink(&amp;#039;Give feedback&amp;#039;, &amp;#039;WT:TW&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
	var form = new Morebits.quickForm(Twinkle.image.callback.evaluate);&lt;br /&gt;
	form.append({&lt;br /&gt;
		type: &amp;#039;checkbox&amp;#039;,&lt;br /&gt;
		list: [&lt;br /&gt;
			{&lt;br /&gt;
				label: &amp;#039;Notify original uploader&amp;#039;,&lt;br /&gt;
				value: &amp;#039;notify&amp;#039;,&lt;br /&gt;
				name: &amp;#039;notify&amp;#039;,&lt;br /&gt;
				tooltip: &amp;quot;Uncheck this if you are planning to make multiple nominations from the same user, and don&amp;#039;t want to overload their talk page with too many notifications.&amp;quot;,&lt;br /&gt;
				checked: Twinkle.getPref(&amp;#039;notifyUserOnDeli&amp;#039;)&lt;br /&gt;
			}&lt;br /&gt;
		]&lt;br /&gt;
	}&lt;br /&gt;
	);&lt;br /&gt;
	var field = form.append({&lt;br /&gt;
		type: &amp;#039;field&amp;#039;,&lt;br /&gt;
		label: &amp;#039;Type of action wanted&amp;#039;&lt;br /&gt;
	});&lt;br /&gt;
	field.append({&lt;br /&gt;
		type: &amp;#039;radio&amp;#039;,&lt;br /&gt;
		name: &amp;#039;type&amp;#039;,&lt;br /&gt;
		event: Twinkle.image.callback.choice,&lt;br /&gt;
		list: [&lt;br /&gt;
			{&lt;br /&gt;
				label: &amp;#039;No source (CSD F4)&amp;#039;,&lt;br /&gt;
				value: &amp;#039;no source&amp;#039;,&lt;br /&gt;
				checked: true,&lt;br /&gt;
				tooltip: &amp;#039;Image or media has no source information&amp;#039;&lt;br /&gt;
			},&lt;br /&gt;
			{&lt;br /&gt;
				label: &amp;#039;No license (CSD F4)&amp;#039;,&lt;br /&gt;
				value: &amp;#039;no license&amp;#039;,&lt;br /&gt;
				tooltip: &amp;#039;Image or media does not have information on its copyright status&amp;#039;&lt;br /&gt;
			},&lt;br /&gt;
			{&lt;br /&gt;
				label: &amp;#039;No source and no license (CSD F4)&amp;#039;,&lt;br /&gt;
				value: &amp;#039;no source no license&amp;#039;,&lt;br /&gt;
				tooltip: &amp;#039;Image or media has neither information on source nor its copyright status&amp;#039;&lt;br /&gt;
			},&lt;br /&gt;
			{&lt;br /&gt;
				label: &amp;#039;Orphaned fair use (CSD F5)&amp;#039;,&lt;br /&gt;
				value: &amp;#039;orphaned fair use&amp;#039;,&lt;br /&gt;
				tooltip: &amp;#039;Image or media is unlicensed for use on Bharatpedia and allowed only under a claim of fair use per Bharatpedia:Non-free content, but it is not used in any articles&amp;#039;&lt;br /&gt;
			},&lt;br /&gt;
			{&lt;br /&gt;
				label: &amp;#039;No fair use rationale (CSD F6)&amp;#039;,&lt;br /&gt;
				value: &amp;#039;no fair use rationale&amp;#039;,&lt;br /&gt;
				tooltip: &amp;#039;Image or media is claimed to be used under Bharatpedia\&amp;#039;s fair use policy but has no explanation as to why it is permitted under the policy&amp;#039;&lt;br /&gt;
			},&lt;br /&gt;
			{&lt;br /&gt;
				label: &amp;#039;Disputed fair use rationale (CSD F7)&amp;#039;,&lt;br /&gt;
				value: &amp;#039;disputed fair use rationale&amp;#039;,&lt;br /&gt;
				tooltip: &amp;#039;Image or media has a fair use rationale that is disputed or invalid, such as a {{Non-free logo}} tag on a photograph of a mascot&amp;#039;&lt;br /&gt;
			},&lt;br /&gt;
			{&lt;br /&gt;
				label: &amp;#039;Replaceable fair use (CSD F7)&amp;#039;,&lt;br /&gt;
				value: &amp;#039;replaceable fair use&amp;#039;,&lt;br /&gt;
				tooltip: &amp;#039;Image or media may fail Bharatpedia\&amp;#039;s first non-free content criterion ([[BP:NFCC#1]]) in that it illustrates a subject for which a free image might reasonably be found or created that adequately provides the same information&amp;#039;&lt;br /&gt;
			},&lt;br /&gt;
			{&lt;br /&gt;
				label: &amp;#039;No evidence of permission (CSD F11)&amp;#039;,&lt;br /&gt;
				value: &amp;#039;no permission&amp;#039;,&lt;br /&gt;
				tooltip: &amp;#039;Image or media does not have proof that the author agreed to licence the file&amp;#039;&lt;br /&gt;
			}&lt;br /&gt;
		]&lt;br /&gt;
	});&lt;br /&gt;
	form.append({&lt;br /&gt;
		type: &amp;#039;div&amp;#039;,&lt;br /&gt;
		label: &amp;#039;Work area&amp;#039;,&lt;br /&gt;
		name: &amp;#039;work_area&amp;#039;&lt;br /&gt;
	});&lt;br /&gt;
	form.append({ type: &amp;#039;submit&amp;#039; });&lt;br /&gt;
&lt;br /&gt;
	var result = form.render();&lt;br /&gt;
	Window.setContent(result);&lt;br /&gt;
	Window.display();&lt;br /&gt;
&lt;br /&gt;
	// We must init the parameters&lt;br /&gt;
	var evt = document.createEvent(&amp;#039;Event&amp;#039;);&lt;br /&gt;
	evt.initEvent(&amp;#039;change&amp;#039;, true, true);&lt;br /&gt;
	result.type[0].dispatchEvent(evt);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Twinkle.image.callback.choice = function twinkleimageCallbackChoose(event) {&lt;br /&gt;
	var value = event.target.values;&lt;br /&gt;
	var root = event.target.form;&lt;br /&gt;
	var work_area = new Morebits.quickForm.element({&lt;br /&gt;
		type: &amp;#039;div&amp;#039;,&lt;br /&gt;
		name: &amp;#039;work_area&amp;#039;&lt;br /&gt;
	});&lt;br /&gt;
&lt;br /&gt;
	switch (value) {&lt;br /&gt;
		case &amp;#039;no source no license&amp;#039;:&lt;br /&gt;
		case &amp;#039;no source&amp;#039;:&lt;br /&gt;
			work_area.append({&lt;br /&gt;
				type: &amp;#039;checkbox&amp;#039;,&lt;br /&gt;
				list: [&lt;br /&gt;
					{&lt;br /&gt;
						label: &amp;#039;Non-free&amp;#039;,&lt;br /&gt;
						name: &amp;#039;non_free&amp;#039;,&lt;br /&gt;
						tooltip: &amp;#039;File is licensed under a fair use claim&amp;#039;&lt;br /&gt;
					}&lt;br /&gt;
				]&lt;br /&gt;
			});&lt;br /&gt;
		/* falls through */&lt;br /&gt;
		case &amp;#039;no license&amp;#039;:&lt;br /&gt;
			work_area.append({&lt;br /&gt;
				type: &amp;#039;checkbox&amp;#039;,&lt;br /&gt;
				list: [&lt;br /&gt;
					{&lt;br /&gt;
						name: &amp;#039;derivative&amp;#039;,&lt;br /&gt;
						label: &amp;#039;Derivative work which lacks a source for incorporated works&amp;#039;,&lt;br /&gt;
						tooltip: &amp;#039;File is a derivative of one or more other works whose source is not specified&amp;#039;&lt;br /&gt;
					}&lt;br /&gt;
				]&lt;br /&gt;
			});&lt;br /&gt;
			break;&lt;br /&gt;
		case &amp;#039;no permission&amp;#039;:&lt;br /&gt;
			work_area.append({&lt;br /&gt;
				type: &amp;#039;input&amp;#039;,&lt;br /&gt;
				name: &amp;#039;source&amp;#039;,&lt;br /&gt;
				label: &amp;#039;Source:&amp;#039;&lt;br /&gt;
			});&lt;br /&gt;
			break;&lt;br /&gt;
		case &amp;#039;disputed fair use rationale&amp;#039;:&lt;br /&gt;
			work_area.append({&lt;br /&gt;
				type: &amp;#039;textarea&amp;#039;,&lt;br /&gt;
				name: &amp;#039;reason&amp;#039;,&lt;br /&gt;
				label: &amp;#039;Concern:&amp;#039;&lt;br /&gt;
			});&lt;br /&gt;
			break;&lt;br /&gt;
		case &amp;#039;orphaned fair use&amp;#039;:&lt;br /&gt;
			work_area.append({&lt;br /&gt;
				type: &amp;#039;input&amp;#039;,&lt;br /&gt;
				name: &amp;#039;replacement&amp;#039;,&lt;br /&gt;
				label: &amp;#039;Replacement:&amp;#039;,&lt;br /&gt;
				tooltip: &amp;#039;Optional file that replaces this one.  The &amp;quot;File:&amp;quot; prefix is optional.&amp;#039;&lt;br /&gt;
			});&lt;br /&gt;
			break;&lt;br /&gt;
		case &amp;#039;replaceable fair use&amp;#039;:&lt;br /&gt;
			work_area.append({&lt;br /&gt;
				type: &amp;#039;textarea&amp;#039;,&lt;br /&gt;
				name: &amp;#039;reason&amp;#039;,&lt;br /&gt;
				label: &amp;#039;Reason:&amp;#039;&lt;br /&gt;
			});&lt;br /&gt;
			break;&lt;br /&gt;
		default:&lt;br /&gt;
			break;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	root.replaceChild(work_area.render(), $(root).find(&amp;#039;div[name=&amp;quot;work_area&amp;quot;]&amp;#039;)[0]);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Twinkle.image.callback.evaluate = function twinkleimageCallbackEvaluate(event) {&lt;br /&gt;
&lt;br /&gt;
	var input = Morebits.quickForm.getInputData(event.target);&lt;br /&gt;
	if (input.replacement) {&lt;br /&gt;
		input.replacement = (new RegExp(&amp;#039;^&amp;#039; + Morebits.namespaceRegex(6) + &amp;#039;:&amp;#039;, &amp;#039;i&amp;#039;).test(input.replacement) ? &amp;#039;&amp;#039; : &amp;#039;File:&amp;#039;) + input.replacement;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	var csdcrit;&lt;br /&gt;
	switch (input.type) {&lt;br /&gt;
		case &amp;#039;no source no license&amp;#039;:&lt;br /&gt;
		case &amp;#039;no source&amp;#039;:&lt;br /&gt;
		case &amp;#039;no license&amp;#039;:&lt;br /&gt;
			csdcrit = &amp;#039;F4&amp;#039;;&lt;br /&gt;
			break;&lt;br /&gt;
		case &amp;#039;orphaned fair use&amp;#039;:&lt;br /&gt;
			csdcrit = &amp;#039;F5&amp;#039;;&lt;br /&gt;
			break;&lt;br /&gt;
		case &amp;#039;no fair use rationale&amp;#039;:&lt;br /&gt;
			csdcrit = &amp;#039;F6&amp;#039;;&lt;br /&gt;
			break;&lt;br /&gt;
		case &amp;#039;disputed fair use rationale&amp;#039;:&lt;br /&gt;
		case &amp;#039;replaceable fair use&amp;#039;:&lt;br /&gt;
			csdcrit = &amp;#039;F7&amp;#039;;&lt;br /&gt;
			break;&lt;br /&gt;
		case &amp;#039;no permission&amp;#039;:&lt;br /&gt;
			csdcrit = &amp;#039;F11&amp;#039;;&lt;br /&gt;
			break;&lt;br /&gt;
		default:&lt;br /&gt;
			throw new Error(&amp;#039;Twinkle.image.callback.evaluate: unknown criterion&amp;#039;);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	var lognomination = Twinkle.getPref(&amp;#039;logSpeedyNominations&amp;#039;) &amp;amp;&amp;amp; Twinkle.getPref(&amp;#039;noLogOnSpeedyNomination&amp;#039;).indexOf(csdcrit.toLowerCase()) === -1;&lt;br /&gt;
	var templatename = input.derivative ? &amp;#039;dw &amp;#039; + input.type : input.type;&lt;br /&gt;
&lt;br /&gt;
	var params = $.extend({&lt;br /&gt;
		templatename: templatename,&lt;br /&gt;
		normalized: csdcrit,&lt;br /&gt;
		lognomination: lognomination&lt;br /&gt;
	}, input);&lt;br /&gt;
&lt;br /&gt;
	Morebits.simpleWindow.setButtonsEnabled(false);&lt;br /&gt;
	Morebits.status.init(event.target);&lt;br /&gt;
&lt;br /&gt;
	Morebits.wiki.actionCompleted.redirect = mw.config.get(&amp;#039;wgPageName&amp;#039;);&lt;br /&gt;
	Morebits.wiki.actionCompleted.notice = &amp;#039;Tagging complete&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
	// Tagging image&lt;br /&gt;
	var wikipedia_page = new Morebits.wiki.page(mw.config.get(&amp;#039;wgPageName&amp;#039;), &amp;#039;Tagging file with deletion tag&amp;#039;);&lt;br /&gt;
	wikipedia_page.setCallbackParameters(params);&lt;br /&gt;
	wikipedia_page.load(Twinkle.image.callbacks.taggingImage);&lt;br /&gt;
&lt;br /&gt;
	// Notifying uploader&lt;br /&gt;
	if (input.notify) {&lt;br /&gt;
		wikipedia_page.lookupCreation(Twinkle.image.callbacks.userNotification);&lt;br /&gt;
	} else {&lt;br /&gt;
		// add to CSD log if desired&lt;br /&gt;
		if (lognomination) {&lt;br /&gt;
			Twinkle.image.callbacks.addToLog(params, null);&lt;br /&gt;
		}&lt;br /&gt;
		// No auto-notification, display what was going to be added.&lt;br /&gt;
		var noteData = document.createElement(&amp;#039;pre&amp;#039;);&lt;br /&gt;
		noteData.appendChild(document.createTextNode(&amp;#039;{{subst:di-&amp;#039; + templatename + &amp;#039;-notice|1=&amp;#039; + mw.config.get(&amp;#039;wgTitle&amp;#039;) + &amp;#039;}} ~~~~&amp;#039;));&lt;br /&gt;
		Morebits.status.info(&amp;#039;Notification&amp;#039;, [ &amp;#039;Following/similar data should be posted to the original uploader:&amp;#039;, document.createElement(&amp;#039;br&amp;#039;), noteData ]);&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Twinkle.image.callbacks = {&lt;br /&gt;
	taggingImage: function(pageobj) {&lt;br /&gt;
		var text = pageobj.getPageText();&lt;br /&gt;
		var params = pageobj.getCallbackParameters();&lt;br /&gt;
&lt;br /&gt;
		// remove &amp;quot;move to Commons&amp;quot; tag - deletion-tagged files cannot be moved to Commons&lt;br /&gt;
		text = text.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi, &amp;#039;&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
		var tag = &amp;#039;{{di-&amp;#039; + params.templatename + &amp;#039;|date={{subst:#time:j F Y}}&amp;#039;;&lt;br /&gt;
		switch (params.type) {&lt;br /&gt;
			case &amp;#039;no source no license&amp;#039;:&lt;br /&gt;
			case &amp;#039;no source&amp;#039;:&lt;br /&gt;
				tag += params.non_free ? &amp;#039;|non-free=yes&amp;#039; : &amp;#039;&amp;#039;;&lt;br /&gt;
				break;&lt;br /&gt;
			case &amp;#039;no permission&amp;#039;:&lt;br /&gt;
				tag += params.source ? &amp;#039;|source=&amp;#039; + params.source : &amp;#039;&amp;#039;;&lt;br /&gt;
				break;&lt;br /&gt;
			case &amp;#039;disputed fair use rationale&amp;#039;:&lt;br /&gt;
				tag += params.reason ? &amp;#039;|concern=&amp;#039; + params.reason : &amp;#039;&amp;#039;;&lt;br /&gt;
				break;&lt;br /&gt;
			case &amp;#039;orphaned fair use&amp;#039;:&lt;br /&gt;
				tag += params.replacement ? &amp;#039;|replacement=&amp;#039; + params.replacement : &amp;#039;&amp;#039;;&lt;br /&gt;
				break;&lt;br /&gt;
			case &amp;#039;replaceable fair use&amp;#039;:&lt;br /&gt;
				tag += params.reason ? &amp;#039;|1=&amp;#039; + params.reason : &amp;#039;&amp;#039;;&lt;br /&gt;
				break;&lt;br /&gt;
			default:&lt;br /&gt;
				break;  // doesn&amp;#039;t matter&lt;br /&gt;
		}&lt;br /&gt;
		tag += &amp;#039;|help=off}}\n&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
		pageobj.setPageText(tag + text);&lt;br /&gt;
		pageobj.setEditSummary(&amp;#039;This file is up for deletion, per [[BP:CSD#&amp;#039; + params.normalized + &amp;#039;|CSD &amp;#039; + params.normalized + &amp;#039;]] (&amp;#039; + params.type + &amp;#039;).&amp;#039;);&lt;br /&gt;
		pageobj.setChangeTags(Twinkle.changeTags);&lt;br /&gt;
		pageobj.setWatchlist(Twinkle.getPref(&amp;#039;deliWatchPage&amp;#039;));&lt;br /&gt;
		pageobj.setCreateOption(&amp;#039;nocreate&amp;#039;);&lt;br /&gt;
		pageobj.save();&lt;br /&gt;
	},&lt;br /&gt;
	userNotification: function(pageobj) {&lt;br /&gt;
		var params = pageobj.getCallbackParameters();&lt;br /&gt;
		var initialContrib = pageobj.getCreator();&lt;br /&gt;
&lt;br /&gt;
		// disallow warning yourself&lt;br /&gt;
		if (initialContrib === mw.config.get(&amp;#039;wgUserName&amp;#039;)) {&lt;br /&gt;
			pageobj.getStatusElement().warn(&amp;#039;You (&amp;#039; + initialContrib + &amp;#039;) created this page; skipping user notification&amp;#039;);&lt;br /&gt;
		} else {&lt;br /&gt;
			var usertalkpage = new Morebits.wiki.page(&amp;#039;User talk:&amp;#039; + initialContrib, &amp;#039;Notifying initial contributor (&amp;#039; + initialContrib + &amp;#039;)&amp;#039;);&lt;br /&gt;
			var notifytext = &amp;#039;\n{{subst:di-&amp;#039; + params.templatename + &amp;#039;-notice|1=&amp;#039; + mw.config.get(&amp;#039;wgTitle&amp;#039;);&lt;br /&gt;
			if (params.type === &amp;#039;no permission&amp;#039;) {&lt;br /&gt;
				notifytext += params.source ? &amp;#039;|source=&amp;#039; + params.source : &amp;#039;&amp;#039;;&lt;br /&gt;
			}&lt;br /&gt;
			notifytext += &amp;#039;}} ~~~~&amp;#039;;&lt;br /&gt;
			usertalkpage.setAppendText(notifytext);&lt;br /&gt;
			usertalkpage.setEditSummary(&amp;#039;Notification: tagging for deletion of [[:&amp;#039; + Morebits.pageNameNorm + &amp;#039;]].&amp;#039;);&lt;br /&gt;
			usertalkpage.setChangeTags(Twinkle.changeTags);&lt;br /&gt;
			usertalkpage.setCreateOption(&amp;#039;recreate&amp;#039;);&lt;br /&gt;
			usertalkpage.setWatchlist(Twinkle.getPref(&amp;#039;deliWatchUser&amp;#039;));&lt;br /&gt;
			usertalkpage.setFollowRedirect(true, false);&lt;br /&gt;
			usertalkpage.append();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// add this nomination to the user&amp;#039;s userspace log, if the user has enabled it&lt;br /&gt;
		if (params.lognomination) {&lt;br /&gt;
			Twinkle.image.callbacks.addToLog(params, initialContrib);&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	addToLog: function(params, initialContrib) {&lt;br /&gt;
		var usl = new Morebits.userspaceLogger(Twinkle.getPref(&amp;#039;speedyLogPageName&amp;#039;));&lt;br /&gt;
		usl.initialText =&lt;br /&gt;
			&amp;quot;This is a log of all [[BP:CSD|speedy deletion]] nominations made by this user using [[BP:TW|Twinkle]]&amp;#039;s CSD module.\n\n&amp;quot; +&lt;br /&gt;
			&amp;#039;If you no longer wish to keep this log, you can turn it off using the [[Bharatpedia:Twinkle/Preferences|preferences panel]], and &amp;#039; +&lt;br /&gt;
			&amp;#039;nominate this page for speedy deletion under [[BP:CSD#U1|CSD U1]].&amp;#039; +&lt;br /&gt;
			(Morebits.userIsSysop ? &amp;#039;\n\nThis log does not track outright speedy deletions made using Twinkle.&amp;#039; : &amp;#039;&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
		var formatParamLog = function(normalize, csdparam, input) {&lt;br /&gt;
			if (normalize === &amp;#039;F5&amp;#039; &amp;amp;&amp;amp; csdparam === &amp;#039;replacement&amp;#039;) {&lt;br /&gt;
				input = &amp;#039;[[:&amp;#039; + input + &amp;#039;]]&amp;#039;;&lt;br /&gt;
			}&lt;br /&gt;
			return &amp;#039; {&amp;#039; + normalize + &amp;#039; &amp;#039; + csdparam + &amp;#039;: &amp;#039; + input + &amp;#039;}&amp;#039;;&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		var extraInfo = &amp;#039;&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
		// If a logged file is deleted but exists on commons, the wikilink will be blue, so provide a link to the log&lt;br /&gt;
		var fileLogLink = &amp;#039; ([{{fullurl:Special:Log|page=&amp;#039; + mw.util.wikiUrlencode(mw.config.get(&amp;#039;wgPageName&amp;#039;)) + &amp;#039;}} log])&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
		var appendText = &amp;#039;# [[:&amp;#039; + Morebits.pageNameNorm + &amp;#039;]]&amp;#039; + fileLogLink + &amp;#039;: DI [[BP:CSD#&amp;#039; + params.normalized.toUpperCase() + &amp;#039;|CSD &amp;#039; + params.normalized.toUpperCase() + &amp;#039;]] ({{tl|di-&amp;#039; + params.templatename + &amp;#039;}})&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
		[&amp;#039;reason&amp;#039;, &amp;#039;replacement&amp;#039;, &amp;#039;source&amp;#039;].forEach(function(item) {&lt;br /&gt;
			if (params[item]) {&lt;br /&gt;
				extraInfo += formatParamLog(params.normalized.toUpperCase(), item, params[item]);&lt;br /&gt;
				return false;&lt;br /&gt;
			}&lt;br /&gt;
		});&lt;br /&gt;
&lt;br /&gt;
		if (extraInfo) {&lt;br /&gt;
			appendText += &amp;#039;; additional information:&amp;#039; + extraInfo;&lt;br /&gt;
		}&lt;br /&gt;
		if (initialContrib) {&lt;br /&gt;
			appendText += &amp;#039;; notified {{user|1=&amp;#039; + initialContrib + &amp;#039;}}&amp;#039;;&lt;br /&gt;
		}&lt;br /&gt;
		appendText += &amp;#039; ~~~~~\n&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
		var editsummary = &amp;#039;Logging speedy deletion nomination of [[:&amp;#039; + Morebits.pageNameNorm + &amp;#039;]].&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
		usl.changeTags = Twinkle.changeTags;&lt;br /&gt;
		usl.log(appendText, editsummary);&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Twinkle.addInitCallback(Twinkle.image, &amp;#039;image&amp;#039;);&lt;br /&gt;
})(jQuery);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>ImportMaster</name></author>
	</entry>
</feed>