<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fa">
	<id>http://wiki.iki.ac.ir/w/index.php?action=history&amp;feed=atom&amp;title=%D9%85%D8%AF%DB%8C%D8%A7%D9%88%DB%8C%DA%A9%DB%8C%3AGadget-dark-mode-toggle.js</id>
	<title>مدیاویکی:Gadget-dark-mode-toggle.js - تاریخچهٔ نسخه‌ها</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.iki.ac.ir/w/index.php?action=history&amp;feed=atom&amp;title=%D9%85%D8%AF%DB%8C%D8%A7%D9%88%DB%8C%DA%A9%DB%8C%3AGadget-dark-mode-toggle.js"/>
	<link rel="alternate" type="text/html" href="http://wiki.iki.ac.ir/w/index.php?title=%D9%85%D8%AF%DB%8C%D8%A7%D9%88%DB%8C%DA%A9%DB%8C:Gadget-dark-mode-toggle.js&amp;action=history"/>
	<updated>2026-11-20T13:15:59Z</updated>
	<subtitle>تاریخچهٔ نسخه‌ها برای این صفحه در ویکی</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>http://wiki.iki.ac.ir/w/index.php?title=%D9%85%D8%AF%DB%8C%D8%A7%D9%88%DB%8C%DA%A9%DB%8C:Gadget-dark-mode-toggle.js&amp;diff=4059&amp;oldid=prev</id>
		<title>imported&gt;Ebrahim: جزئی</title>
		<link rel="alternate" type="text/html" href="http://wiki.iki.ac.ir/w/index.php?title=%D9%85%D8%AF%DB%8C%D8%A7%D9%88%DB%8C%DA%A9%DB%8C:Gadget-dark-mode-toggle.js&amp;diff=4059&amp;oldid=prev"/>
		<updated>2025-03-05T08:02:15Z</updated>

		<summary type="html">&lt;p&gt;جزئی&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&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;fa&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;→ نسخهٔ قدیمی‌تر&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;نسخهٔ ۵ مارس ۲۰۲۵، ساعت ۰۸:۰۲&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l54&quot;&gt;خط ۵۴:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&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;		var gadgetsLinkElement = $(&amp;#039;link[rel=&amp;quot;stylesheet&amp;quot;][href^=&amp;quot;&amp;#039; + scriptPath + &amp;#039;?&amp;quot;][href*=&amp;quot;ext.gadget.&amp;quot;]&amp;#039;)[0];&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;		var gadgetsLinkElement = $(&amp;#039;link[rel=&amp;quot;stylesheet&amp;quot;][href^=&amp;quot;&amp;#039; + scriptPath + &amp;#039;?&amp;quot;][href*=&amp;quot;ext.gadget.&amp;quot;]&amp;#039;)[0];&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;		if (gadgetsLinkElement) {&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;		if (gadgetsLinkElement) {&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;			var uri = new URL(gadgetsLinkElement.href);&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;			var uri = new URL(gadgetsLinkElement.href&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, window.location&lt;/ins&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;			if (newState) {&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;			if (newState) {&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;				uri.searchParams.set(&amp;quot;modules&amp;quot;, uri.searchParams.get(&amp;quot;modules&amp;quot;) + &amp;#039;,dark-mode&amp;#039;);&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;				uri.searchParams.set(&amp;quot;modules&amp;quot;, uri.searchParams.get(&amp;quot;modules&amp;quot;) + &amp;#039;,dark-mode&amp;#039;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Ebrahim</name></author>
	</entry>
	<entry>
		<id>http://wiki.iki.ac.ir/w/index.php?title=%D9%85%D8%AF%DB%8C%D8%A7%D9%88%DB%8C%DA%A9%DB%8C:Gadget-dark-mode-toggle.js&amp;diff=4058&amp;oldid=prev</id>
		<title>imported&gt;Huji: remove dependency to deprecated mw.Uri</title>
		<link rel="alternate" type="text/html" href="http://wiki.iki.ac.ir/w/index.php?title=%D9%85%D8%AF%DB%8C%D8%A7%D9%88%DB%8C%DA%A9%DB%8C:Gadget-dark-mode-toggle.js&amp;diff=4058&amp;oldid=prev"/>
		<updated>2025-03-02T04:53:38Z</updated>

		<summary type="html">&lt;p&gt;remove dependency to deprecated mw.Uri&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&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;fa&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;→ نسخهٔ قدیمی‌تر&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;نسخهٔ ۲ مارس ۲۰۲۵، ساعت ۰۴:۵۳&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l17&quot;&gt;خط ۱۷:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&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;}&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;}&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; 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;$.when($.ready, mw.loader.using([&#039;mediawiki.util&#039;, &#039;mediawiki.api&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;, &#039;mediawiki.Uri&lt;/del&gt;&#039;, &#039;mediawiki.storage&#039;])).then(function() {&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;$.when($.ready, mw.loader.using([&#039;mediawiki.util&#039;, &#039;mediawiki.api&#039;, &#039;mediawiki.storage&#039;])).then(function() {&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;	var isOn = !!mw.user.options.get(&amp;#039;gadget-dark-mode&amp;#039;);&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;	var isOn = !!mw.user.options.get(&amp;#039;gadget-dark-mode&amp;#039;);&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 colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l54&quot;&gt;خط ۵۴:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&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;		var gadgetsLinkElement = $(&amp;#039;link[rel=&amp;quot;stylesheet&amp;quot;][href^=&amp;quot;&amp;#039; + scriptPath + &amp;#039;?&amp;quot;][href*=&amp;quot;ext.gadget.&amp;quot;]&amp;#039;)[0];&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;		var gadgetsLinkElement = $(&amp;#039;link[rel=&amp;quot;stylesheet&amp;quot;][href^=&amp;quot;&amp;#039; + scriptPath + &amp;#039;?&amp;quot;][href*=&amp;quot;ext.gadget.&amp;quot;]&amp;#039;)[0];&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;		if (gadgetsLinkElement) {&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;		if (gadgetsLinkElement) {&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;			var uri = new &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;mw.Uri&lt;/del&gt;(gadgetsLinkElement.href);&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;			var uri = new &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;URL&lt;/ins&gt;(gadgetsLinkElement.href);&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;			if (newState) {&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;			if (newState) {&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;				uri.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;query&lt;/del&gt;.modules +&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= &lt;/del&gt;&#039;,dark-mode&#039;;&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;				uri.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;searchParams&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;set(&quot;&lt;/ins&gt;modules&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;, uri.searchParams.get(&quot;modules&quot;) &lt;/ins&gt;+ &#039;,dark-mode&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&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;			} else {&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;			} else {&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;				uri.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;query&lt;/del&gt;.modules &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= &lt;/del&gt;uri.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;query&lt;/del&gt;.modules&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;				uri.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;searchParams&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;set(&quot;&lt;/ins&gt;modules&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;, &lt;/ins&gt;uri.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;searchParams&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;get(&quot;&lt;/ins&gt;modules&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;)&lt;/ins&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;					.replace(&amp;#039;ext.gadget.dark-mode&amp;#039;, &amp;#039;ext.gadget.&amp;#039;) // dark-mode is first in the gadget list&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;					.replace(&amp;#039;ext.gadget.dark-mode&amp;#039;, &amp;#039;ext.gadget.&amp;#039;) // dark-mode is first in the gadget list&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;					.replace(/,dark-mode(,|$)/, &#039;$1&#039;)&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;; &lt;/del&gt;// dark-mode is in middle or end of the list&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;					.replace(/,dark-mode(,|$)/, &#039;$1&#039;) // dark-mode is in middle or end of the list&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;				);&lt;/ins&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;			}&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;			}&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;			gadgetsLinkElement.href = uri.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;getRelativePath&lt;/del&gt;();&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;			gadgetsLinkElement.href = uri.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;toString&lt;/ins&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;		} else {&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;		} else {&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;			// No gadget-containing styles are enabled&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;			// No gadget-containing styles are enabled&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Huji</name></author>
	</entry>
	<entry>
		<id>http://wiki.iki.ac.ir/w/index.php?title=%D9%85%D8%AF%DB%8C%D8%A7%D9%88%DB%8C%DA%A9%DB%8C:Gadget-dark-mode-toggle.js&amp;diff=4057&amp;oldid=prev</id>
		<title>imported&gt;MusikAnimal: es6-polyfills no longer needed, see phab:T75714</title>
		<link rel="alternate" type="text/html" href="http://wiki.iki.ac.ir/w/index.php?title=%D9%85%D8%AF%DB%8C%D8%A7%D9%88%DB%8C%DA%A9%DB%8C:Gadget-dark-mode-toggle.js&amp;diff=4057&amp;oldid=prev"/>
		<updated>2024-01-19T04:10:48Z</updated>

		<summary type="html">&lt;p&gt;es6-polyfills no longer needed, see &lt;a href=&quot;/w/index.php?title=Phab:T75714&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Phab:T75714 (صفحه وجود ندارد)&quot;&gt;phab:T75714&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&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;fa&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;→ نسخهٔ قدیمی‌تر&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;نسخهٔ ۱۹ ژانویهٔ ۲۰۲۴، ساعت ۰۴:۱۰&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l17&quot;&gt;خط ۱۷:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&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;}&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;}&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; 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;$.when($.ready, mw.loader.using([&#039;mediawiki.util&#039;, &#039;mediawiki.api&#039;, &#039;mediawiki.Uri&#039;, &#039;mediawiki.storage&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;, &#039;es6-polyfills&lt;/del&gt;&#039;])).then(function() {&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;$.when($.ready, mw.loader.using([&#039;mediawiki.util&#039;, &#039;mediawiki.api&#039;, &#039;mediawiki.Uri&#039;, &#039;mediawiki.storage&#039;])).then(function() {&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;	var isOn = !!mw.user.options.get(&amp;#039;gadget-dark-mode&amp;#039;);&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;	var isOn = !!mw.user.options.get(&amp;#039;gadget-dark-mode&amp;#039;);&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;/table&gt;</summary>
		<author><name>imported&gt;MusikAnimal</name></author>
	</entry>
	<entry>
		<id>http://wiki.iki.ac.ir/w/index.php?title=%D9%85%D8%AF%DB%8C%D8%A7%D9%88%DB%8C%DA%A9%DB%8C:Gadget-dark-mode-toggle.js&amp;diff=4056&amp;oldid=prev</id>
		<title>imported&gt;Jeeputer: صفحه‌ای تازه حاوی «/**  * Enables or disables the dark-mode gadget.  *  * Authors: User:SD0001, User:Nardog (enwiki)  */  // &#039;Dark mode&#039; and &#039;Light mode&#039; messages must match the ::before content in // MediaWiki:Gadget-dark-mode-toggle-pagestyles.css and MediaWiki:Gadget-dark-mode.css, respectively. // Don&#039;t overwrite existing messages, if already set on a foreign wiki prior to loading this file if (!mw.messages.get(&#039;darkmode-turn-on-label...» ایجاد کرد</title>
		<link rel="alternate" type="text/html" href="http://wiki.iki.ac.ir/w/index.php?title=%D9%85%D8%AF%DB%8C%D8%A7%D9%88%DB%8C%DA%A9%DB%8C:Gadget-dark-mode-toggle.js&amp;diff=4056&amp;oldid=prev"/>
		<updated>2022-02-08T00:04:51Z</updated>

		<summary type="html">&lt;p&gt;صفحه‌ای تازه حاوی «&lt;span class=&quot;autocomment&quot;&gt;*  * Enables or disables the dark-mode gadget.  *  * Authors: &amp;#91;&amp;#91;User:SD0001&amp;#93;&amp;#93;, &amp;#91;&amp;#91;User:Nardog&amp;#93;&amp;#93; (enwiki): &lt;/span&gt;  // &amp;#039;Dark mode&amp;#039; and &amp;#039;Light mode&amp;#039; messages must match the ::before content in // &lt;a href=&quot;/fa/%D9%85%D8%AF%DB%8C%D8%A7%D9%88%DB%8C%DA%A9%DB%8C:Gadget-dark-mode-toggle-pagestyles.css&quot; title=&quot;مدیاویکی:Gadget-dark-mode-toggle-pagestyles.css&quot;&gt;MediaWiki:Gadget-dark-mode-toggle-pagestyles.css&lt;/a&gt; and &lt;a href=&quot;/w/index.php?title=%D9%85%D8%AF%DB%8C%D8%A7%D9%88%DB%8C%DA%A9%DB%8C:Gadget-dark-mode.css&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;مدیاویکی:Gadget-dark-mode.css (صفحه وجود ندارد)&quot;&gt;MediaWiki:Gadget-dark-mode.css&lt;/a&gt;, respectively. // Don&amp;#039;t overwrite existing messages, if already set on a foreign wiki prior to loading this file if (!mw.messages.get(&amp;#039;darkmode-turn-on-label...» ایجاد کرد&lt;/p&gt;
&lt;p&gt;&lt;b&gt;صفحهٔ تازه&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/**&lt;br /&gt;
 * Enables or disables the dark-mode gadget.&lt;br /&gt;
 *&lt;br /&gt;
 * Authors: [[User:SD0001]], [[User:Nardog]] (enwiki)&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// &amp;#039;Dark mode&amp;#039; and &amp;#039;Light mode&amp;#039; messages must match the ::before content in&lt;br /&gt;
// [[MediaWiki:Gadget-dark-mode-toggle-pagestyles.css]] and [[MediaWiki:Gadget-dark-mode.css]], respectively.&lt;br /&gt;
// Don&amp;#039;t overwrite existing messages, if already set on a foreign wiki prior to loading this file&lt;br /&gt;
if (!mw.messages.get(&amp;#039;darkmode-turn-on-label&amp;#039;)) {&lt;br /&gt;
	mw.messages.set({&lt;br /&gt;
		&amp;#039;darkmode-turn-on-label&amp;#039;: &amp;#039;حالت تاریک&amp;#039;,&lt;br /&gt;
		&amp;#039;darkmode-turn-on-tooltip&amp;#039;: &amp;#039;روشن‌کردن حالت تاریک&amp;#039;,&lt;br /&gt;
		&amp;#039;darkmode-turn-off-label&amp;#039;: &amp;#039;حالت روشن&amp;#039;,&lt;br /&gt;
		&amp;#039;darkmode-turn-off-tooltip&amp;#039;: &amp;#039;خاموش کردن حالت تاریک&amp;#039;,&lt;br /&gt;
	});&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$.when($.ready, mw.loader.using([&amp;#039;mediawiki.util&amp;#039;, &amp;#039;mediawiki.api&amp;#039;, &amp;#039;mediawiki.Uri&amp;#039;, &amp;#039;mediawiki.storage&amp;#039;, &amp;#039;es6-polyfills&amp;#039;])).then(function() {&lt;br /&gt;
	var isOn = !!mw.user.options.get(&amp;#039;gadget-dark-mode&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
	if (isOn) {&lt;br /&gt;
		// CSS class for externally styling elements in dark mode via TemplateStyles (or CSS from other gadgets or common.css)&lt;br /&gt;
		// A brief flash of the original styles will occur, so this is only suitable for style changes for which flashes are tolerable.&lt;br /&gt;
		// For others, update Gadget-dark-mode.css directly which is loaded without FOUCs&lt;br /&gt;
		document.documentElement.classList.add(&amp;#039;client-dark-mode&amp;#039;);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	var onOrOff = isOn ? &amp;#039;off&amp;#039; : &amp;#039;on&amp;#039;;&lt;br /&gt;
	var label = mw.msg(&amp;#039;darkmode-turn-&amp;#039; + onOrOff + &amp;#039;-label&amp;#039;);&lt;br /&gt;
	var tooltip = mw.msg(&amp;#039;darkmode-turn-&amp;#039; + onOrOff + &amp;#039;-tooltip&amp;#039;);&lt;br /&gt;
	var nextnode = mw.config.get(&amp;#039;skin&amp;#039;) !== &amp;#039;minerva&amp;#039; &amp;amp;&amp;amp; &amp;#039;#pt-watchlist&amp;#039;;&lt;br /&gt;
	var portletLink = mw.util.addPortletLink(&amp;#039;p-personal&amp;#039;, &amp;#039;#&amp;#039;, label, &amp;#039;pt-darkmode&amp;#039;, tooltip, &amp;#039;&amp;#039;, nextnode);&lt;br /&gt;
&lt;br /&gt;
	function toggleMode() {&lt;br /&gt;
		var newState = Number(!mw.user.options.get(&amp;#039;gadget-dark-mode&amp;#039;));&lt;br /&gt;
		new mw.Api().saveOption(&amp;#039;gadget-dark-mode&amp;#039;, newState);&lt;br /&gt;
		mw.user.options.set(&amp;#039;gadget-dark-mode&amp;#039;, newState);&lt;br /&gt;
		$(document.documentElement).toggleClass(&amp;#039;client-dark-mode&amp;#039;, !!newState);&lt;br /&gt;
&lt;br /&gt;
		// In case the user navigates to another page too quickly&lt;br /&gt;
		mw.storage.session.set(&amp;#039;dark-mode-toggled&amp;#039;, newState);&lt;br /&gt;
&lt;br /&gt;
		var onOrOff = [&amp;#039;on&amp;#039;, &amp;#039;off&amp;#039;][newState];&lt;br /&gt;
&lt;br /&gt;
		// Toggle portlet link label and tooltip&lt;br /&gt;
		var labelSelector = [&amp;#039;vector&amp;#039;, &amp;#039;minerva&amp;#039;].includes(mw.config.get(&amp;#039;skin&amp;#039;)) ? &amp;#039;#pt-darkmode span:not(.mw-ui-icon)&amp;#039; : &amp;#039;#pt-darkmode a&amp;#039;;&lt;br /&gt;
		$(labelSelector).text(mw.msg(&amp;#039;darkmode-turn-&amp;#039; + onOrOff + &amp;#039;-label&amp;#039;));&lt;br /&gt;
		$(&amp;#039;#pt-darkmode a&amp;#039;).attr(&amp;#039;title&amp;#039;, mw.msg(&amp;#039;darkmode-turn-&amp;#039; + onOrOff + &amp;#039;-tooltip&amp;#039;));&lt;br /&gt;
&lt;br /&gt;
		// Modify the &amp;lt;link&amp;gt; element on the page to include/exclude dark-mode styles&lt;br /&gt;
		// We can&amp;#039;t use mw.loader as it doesn&amp;#039;t work both ways (see talk page)&lt;br /&gt;
		var scriptPath = mw.util.wikiScript(&amp;#039;load&amp;#039;);&lt;br /&gt;
		var gadgetsLinkElement = $(&amp;#039;link[rel=&amp;quot;stylesheet&amp;quot;][href^=&amp;quot;&amp;#039; + scriptPath + &amp;#039;?&amp;quot;][href*=&amp;quot;ext.gadget.&amp;quot;]&amp;#039;)[0];&lt;br /&gt;
		if (gadgetsLinkElement) {&lt;br /&gt;
			var uri = new mw.Uri(gadgetsLinkElement.href);&lt;br /&gt;
			if (newState) {&lt;br /&gt;
				uri.query.modules += &amp;#039;,dark-mode&amp;#039;;&lt;br /&gt;
			} else {&lt;br /&gt;
				uri.query.modules = uri.query.modules&lt;br /&gt;
					.replace(&amp;#039;ext.gadget.dark-mode&amp;#039;, &amp;#039;ext.gadget.&amp;#039;) // dark-mode is first in the gadget list&lt;br /&gt;
					.replace(/,dark-mode(,|$)/, &amp;#039;$1&amp;#039;); // dark-mode is in middle or end of the list&lt;br /&gt;
			}&lt;br /&gt;
			gadgetsLinkElement.href = uri.getRelativePath();&lt;br /&gt;
		} else {&lt;br /&gt;
			// No gadget-containing styles are enabled&lt;br /&gt;
			$(&amp;#039;&amp;lt;link&amp;gt;&amp;#039;).attr({&lt;br /&gt;
				rel: &amp;#039;stylesheet&amp;#039;,&lt;br /&gt;
				href: scriptPath + &amp;#039;?lang=&amp;#039; + mw.config.get(&amp;#039;wgUserLanguage&amp;#039;) +&lt;br /&gt;
					&amp;#039;&amp;amp;modules=ext.gadget.dark-mode&amp;amp;only=styles&amp;amp;skin=&amp;#039; + mw.config.get(&amp;#039;skin&amp;#039;)&lt;br /&gt;
			}).appendTo(document.head);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	$(portletLink).on(&amp;#039;click&amp;#039;, function(e) {&lt;br /&gt;
		e.preventDefault();&lt;br /&gt;
		toggleMode();&lt;br /&gt;
	});&lt;br /&gt;
&lt;br /&gt;
	// Recover state if the navigation was too quick&lt;br /&gt;
	var storageState = mw.storage.session.get(&amp;#039;dark-mode-toggled&amp;#039;);&lt;br /&gt;
	if (storageState &amp;amp;&amp;amp; Number(storageState) !== Number(isOn)) {&lt;br /&gt;
		toggleMode();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	if (window.wpDarkModeAutoToggle) {&lt;br /&gt;
		var toggleBasedOnSystemColourScheme = function () {&lt;br /&gt;
			var systemSchemeNow = matchMedia(&amp;#039;(prefers-color-scheme: dark)&amp;#039;).matches;&lt;br /&gt;
			var systemSchemeLast = mw.storage.get(&amp;#039;dark-mode-system-scheme&amp;#039;) === &amp;#039;1&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
			var wpSchemeNow = !!mw.user.options.get(&amp;#039;gadget-dark-mode&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
			if (systemSchemeNow !== systemSchemeLast) {&lt;br /&gt;
				if (systemSchemeNow !== wpSchemeNow) {&lt;br /&gt;
					toggleMode();&lt;br /&gt;
				}&lt;br /&gt;
				mw.requestIdleCallback(function() {&lt;br /&gt;
					mw.storage.set(&amp;#039;dark-mode-system-scheme&amp;#039;, Number(systemSchemeNow));&lt;br /&gt;
				});&lt;br /&gt;
			}&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		toggleBasedOnSystemColourScheme();&lt;br /&gt;
&lt;br /&gt;
		// If system colour scheme changes while user is viewing, toggle immediately&lt;br /&gt;
		var mediaQuery = matchMedia(&amp;#039;(prefers-color-scheme: dark)&amp;#039;);&lt;br /&gt;
		if (mediaQuery.addEventListener) {&lt;br /&gt;
			mediaQuery.addEventListener(&amp;#039;change&amp;#039;, toggleBasedOnSystemColourScheme);&lt;br /&gt;
		} else if (mediaQuery.addListener) { // Safari 13 and older&lt;br /&gt;
			mediaQuery.addListener(toggleBasedOnSystemColourScheme);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
});&lt;/div&gt;</summary>
		<author><name>imported&gt;Jeeputer</name></author>
	</entry>
</feed>