<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://meta.wikimedia.org/w/index.php?action=history&amp;feed=atom&amp;title=User%3ABase%2FScripts%2FRenameCertainUserContribs.js</id>
	<title>User:Base/Scripts/RenameCertainUserContribs.js - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://meta.wikimedia.org/w/index.php?action=history&amp;feed=atom&amp;title=User%3ABase%2FScripts%2FRenameCertainUserContribs.js"/>
	<link rel="alternate" type="text/html" href="https://meta.wikimedia.org/w/index.php?title=User:Base/Scripts/RenameCertainUserContribs.js&amp;action=history"/>
	<updated>2026-08-23T01:31:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.47.0-wmf.16</generator>
	<entry>
		<id>https://meta.wikimedia.org/w/index.php?title=User:Base/Scripts/RenameCertainUserContribs.js&amp;diff=18764453&amp;oldid=prev</id>
		<title>Base: Base moved page User:Base/Scripts/RenameAllUserContribs.js to User:Base/Scripts/RenameCertainUserContribs.js without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://meta.wikimedia.org/w/index.php?title=User:Base/Scripts/RenameCertainUserContribs.js&amp;diff=18764453&amp;oldid=prev"/>
		<updated>2019-01-07T02:21:38Z</updated>

		<summary type="html">&lt;p&gt;Base moved page &lt;a href=&quot;/w/index.php?title=User:Base/Scripts/RenameAllUserContribs.js&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:Base/Scripts/RenameAllUserContribs.js (page does not exist)&quot;&gt;User:Base/Scripts/RenameAllUserContribs.js&lt;/a&gt; to &lt;a href=&quot;/wiki/User:Base/Scripts/RenameCertainUserContribs.js&quot; title=&quot;User:Base/Scripts/RenameCertainUserContribs.js&quot;&gt;User:Base/Scripts/RenameCertainUserContribs.js&lt;/a&gt; without leaving a redirect&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&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 02:21, 7 January 2019&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>Base</name></author>
	</entry>
	<entry>
		<id>https://meta.wikimedia.org/w/index.php?title=User:Base/Scripts/RenameCertainUserContribs.js&amp;diff=18764329&amp;oldid=prev</id>
		<title>Base at 01:40, 7 January 2019</title>
		<link rel="alternate" type="text/html" href="https://meta.wikimedia.org/w/index.php?title=User:Base/Scripts/RenameCertainUserContribs.js&amp;diff=18764329&amp;oldid=prev"/>
		<updated>2019-01-07T01:40:43Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:40, 7 January 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;            	dataToProceed.forEach(item =&amp;gt; {&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;            	dataToProceed.forEach(item =&amp;gt; {&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;            		const pageFrom = item.title;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;            		const pageFrom = item.title;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;            		const pageTo = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pageTitle&lt;/del&gt;.replace(new RegExp(`/${wrongLanguage}$`), &#039;/&#039; + correctLanguage);&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;            		const pageTo = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pageFrom&lt;/ins&gt;.replace(new RegExp(`/${wrongLanguage}$`), &#039;/&#039; + correctLanguage);&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;            		api.post({&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;            		api.post({&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Base</name></author>
	</entry>
	<entry>
		<id>https://meta.wikimedia.org/w/index.php?title=User:Base/Scripts/RenameCertainUserContribs.js&amp;diff=18763983&amp;oldid=prev</id>
		<title>Base: Created page with &quot;const api = new mw.Api(); const reason = &#039;Renaming translations with incorrect language code&#039;; const namespace = 1198; const user = &#039;Aamrs&#039;; const startDate = &#039;2019-01-06T18:0...&quot;</title>
		<link rel="alternate" type="text/html" href="https://meta.wikimedia.org/w/index.php?title=User:Base/Scripts/RenameCertainUserContribs.js&amp;diff=18763983&amp;oldid=prev"/>
		<updated>2019-01-07T00:58:30Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;const api = new mw.Api(); const reason = &amp;#039;Renaming translations with incorrect language code&amp;#039;; const namespace = 1198; const user = &amp;#039;Aamrs&amp;#039;; const startDate = &amp;#039;2019-01-06T18:0...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;const api = new mw.Api();&lt;br /&gt;
const reason = &amp;#039;Renaming translations with incorrect language code&amp;#039;;&lt;br /&gt;
const namespace = 1198;&lt;br /&gt;
const user = &amp;#039;Aamrs&amp;#039;;&lt;br /&gt;
const startDate = &amp;#039;2019-01-06T18:00:00.000Z&amp;#039;;&lt;br /&gt;
const wrongLanguage = &amp;#039;en-gb&amp;#039;;&lt;br /&gt;
const correctLanguage = &amp;#039;pt&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
api.get({&lt;br /&gt;
        action: &amp;#039;query&amp;#039;,&lt;br /&gt;
        meta: &amp;#039;tokens&amp;#039;&lt;br /&gt;
    }).done((data) =&amp;gt; {&lt;br /&gt;
            console.log(data);&lt;br /&gt;
            const token = data.query.tokens.csrftoken;&lt;br /&gt;
&lt;br /&gt;
            api.get({&lt;br /&gt;
                action: &amp;#039;query&amp;#039;,&lt;br /&gt;
                list: &amp;#039;usercontribs&amp;#039;,&lt;br /&gt;
                ucuser: user,&lt;br /&gt;
                ucstart: startDate,&lt;br /&gt;
                ucnamespace: namespace,&lt;br /&gt;
                ucdir: &amp;#039;newer&amp;#039;,&lt;br /&gt;
                uclimit: &amp;#039;max&amp;#039;&lt;br /&gt;
            }).done((data) =&amp;gt; {&lt;br /&gt;
            	const dataToProceed = data.query.usercontribs.filter(item =&amp;gt; item.title.endsWith(&amp;#039;/&amp;#039; + wrongLanguage));&lt;br /&gt;
&lt;br /&gt;
            	dataToProceed.forEach(item =&amp;gt; {&lt;br /&gt;
            		const pageFrom = item.title;&lt;br /&gt;
            		const pageTo = pageTitle.replace(new RegExp(`/${wrongLanguage}$`), &amp;#039;/&amp;#039; + correctLanguage);&lt;br /&gt;
&lt;br /&gt;
            		api.post({&lt;br /&gt;
                        action: &amp;#039;move&amp;#039;,&lt;br /&gt;
                        from: pageFrom,&lt;br /&gt;
                        to: pageTo,&lt;br /&gt;
                        reason: reason,&lt;br /&gt;
                        token: token,&lt;br /&gt;
                        noredirect: 1&lt;br /&gt;
                    }).done((data) =&amp;gt; {&lt;br /&gt;
                        console.log(pageFrom + &amp;#039; must has been moved to &amp;#039; + pageTo);&lt;br /&gt;
                    });&lt;br /&gt;
            	});&lt;br /&gt;
            });&lt;br /&gt;
        });&lt;/div&gt;</summary>
		<author><name>Base</name></author>
	</entry>
</feed>