<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fa">
	<id>https://wiki.nebeshtar.com/index.php?action=history&amp;feed=atom&amp;title=%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1%3A%D9%85%D8%AD%D9%85%D8%AF%2FurlStatusFixer.js</id>
	<title>کاربر:محمد/urlStatusFixer.js - تاریخچهٔ نسخه‌ها</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.nebeshtar.com/index.php?action=history&amp;feed=atom&amp;title=%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1%3A%D9%85%D8%AD%D9%85%D8%AF%2FurlStatusFixer.js"/>
	<link rel="alternate" type="text/html" href="https://wiki.nebeshtar.com/index.php?title=%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1:%D9%85%D8%AD%D9%85%D8%AF/urlStatusFixer.js&amp;action=history"/>
	<updated>2026-05-05T19:15:01Z</updated>
	<subtitle>تاریخچهٔ نسخه‌ها برای این صفحه در ویکی</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.nebeshtar.com/index.php?title=%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1:%D9%85%D8%AD%D9%85%D8%AF/urlStatusFixer.js&amp;diff=778&amp;oldid=prev</id>
		<title>محمد در ۲۴ ژانویهٔ ۲۰۲۵، ساعت ۱۳:۱۶</title>
		<link rel="alternate" type="text/html" href="https://wiki.nebeshtar.com/index.php?title=%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1:%D9%85%D8%AD%D9%85%D8%AF/urlStatusFixer.js&amp;diff=778&amp;oldid=prev"/>
		<updated>2025-01-24T13:16:42Z</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-l9&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;         action: mw.config.get(&amp;#039;wgAction&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;         action: mw.config.get(&amp;#039;wgAction&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;div&gt;         ns: mw.config.get(&amp;#039;wgNamespaceNumber&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;         ns: mw.config.get(&amp;#039;wgNamespaceNumber&amp;#039;),&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;         ad: &#039; ([[کاربر:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Jeeputer&lt;/del&gt;/urlStatusFixer|با اسکریپت]])&#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;         ad: &#039; ([[کاربر:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;محمد&lt;/ins&gt;/urlStatusFixer|با اسکریپت]])&#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;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;/table&gt;</summary>
		<author><name>محمد</name></author>
	</entry>
	<entry>
		<id>https://wiki.nebeshtar.com/index.php?title=%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1:%D9%85%D8%AD%D9%85%D8%AF/urlStatusFixer.js&amp;diff=766&amp;oldid=prev</id>
		<title>محمد: صفحه‌ای تازه حاوی «$(function() {     var bool = {         &#039;dead&#039;: &#039;yes&#039;,         &#039;live&#039;: &#039;no&#039;     };      var conf = {         page: mw.config.get(&#039;wgPageName&#039;),         action: mw.config.get(&#039;wgAction&#039;),         ns: mw.config.get(&#039;wgNamespaceNumber&#039;),         ad: &#039; (با اسکریپت)&#039;     };      if ([&#039;history&#039;, &#039;view&#039;].indexOf(conf.action) == -1 || conf.ns != 0) {         return;     }      function loadPage(t...» ایجاد کرد</title>
		<link rel="alternate" type="text/html" href="https://wiki.nebeshtar.com/index.php?title=%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1:%D9%85%D8%AD%D9%85%D8%AF/urlStatusFixer.js&amp;diff=766&amp;oldid=prev"/>
		<updated>2025-01-24T13:11:08Z</updated>

		<summary type="html">&lt;p&gt;صفحه‌ای تازه حاوی «$(function() {     var bool = {         &amp;#039;dead&amp;#039;: &amp;#039;yes&amp;#039;,         &amp;#039;live&amp;#039;: &amp;#039;no&amp;#039;     };      var conf = {         page: mw.config.get(&amp;#039;wgPageName&amp;#039;),         action: mw.config.get(&amp;#039;wgAction&amp;#039;),         ns: mw.config.get(&amp;#039;wgNamespaceNumber&amp;#039;),         ad: &amp;#039; (&lt;a href=&quot;/index.php?title=%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1:Jeeputer/urlStatusFixer&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;کاربر:Jeeputer/urlStatusFixer (صفحه وجود ندارد)&quot;&gt;با اسکریپت&lt;/a&gt;)&amp;#039;     };      if ([&amp;#039;history&amp;#039;, &amp;#039;view&amp;#039;].indexOf(conf.action) == -1 || conf.ns != 0) {         return;     }      function loadPage(t...» ایجاد کرد&lt;/p&gt;
&lt;p&gt;&lt;b&gt;صفحهٔ تازه&lt;/b&gt;&lt;/p&gt;&lt;div&gt;$(function() {&lt;br /&gt;
    var bool = {&lt;br /&gt;
        &amp;#039;dead&amp;#039;: &amp;#039;yes&amp;#039;,&lt;br /&gt;
        &amp;#039;live&amp;#039;: &amp;#039;no&amp;#039;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    var conf = {&lt;br /&gt;
        page: mw.config.get(&amp;#039;wgPageName&amp;#039;),&lt;br /&gt;
        action: mw.config.get(&amp;#039;wgAction&amp;#039;),&lt;br /&gt;
        ns: mw.config.get(&amp;#039;wgNamespaceNumber&amp;#039;),&lt;br /&gt;
        ad: &amp;#039; ([[کاربر:Jeeputer/urlStatusFixer|با اسکریپت]])&amp;#039;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    if ([&amp;#039;history&amp;#039;, &amp;#039;view&amp;#039;].indexOf(conf.action) == -1 || conf.ns != 0) {&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function loadPage(title) {&lt;br /&gt;
        return new mw.Api().get({&lt;br /&gt;
            action: &amp;#039;query&amp;#039;,&lt;br /&gt;
            prop: &amp;#039;revisions&amp;#039;,&lt;br /&gt;
            titles: title,&lt;br /&gt;
            rvprop: &amp;#039;content&amp;#039;,&lt;br /&gt;
            format: &amp;#039;json&amp;#039;&lt;br /&gt;
        }).then(function(data) {&lt;br /&gt;
            return Object.values(data.query.pages)[0].revisions[0][&amp;#039;*&amp;#039;];&lt;br /&gt;
        });&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function savePage(title, text, summary, count) {&lt;br /&gt;
        return new mw.Api().postWithToken(&amp;#039;csrf&amp;#039;, {&lt;br /&gt;
            action: &amp;#039;edit&amp;#039;,&lt;br /&gt;
            title: title,&lt;br /&gt;
            text: text,&lt;br /&gt;
            summary: summary,&lt;br /&gt;
            minor: true&lt;br /&gt;
        }).done(function(result) {&lt;br /&gt;
            console.log(result)&lt;br /&gt;
            mw.notify(&lt;br /&gt;
                &amp;#039;تعداد &amp;#039; + mw.language.convertNumber(count) + &amp;#039; پارامتر ناشناخته اصلاح شد&amp;#039; +&lt;br /&gt;
                (count &amp;gt; 1 ? &amp;#039;ند&amp;#039; : &amp;#039;&amp;#039;), {&lt;br /&gt;
                    type: &amp;#039;success&amp;#039;,&lt;br /&gt;
                    title: &amp;#039;انجام شد!&amp;#039;&lt;br /&gt;
                }&lt;br /&gt;
            );&lt;br /&gt;
            setTimeout(function() {&lt;br /&gt;
                window.location.href = &amp;#039;/wiki/ویژه:تفاوت/&amp;#039; + result.edit.newrevid;&lt;br /&gt;
            }, 2000);&lt;br /&gt;
        });&lt;br /&gt;
    }&lt;br /&gt;
    $(mw.util.addPortletLink(&amp;#039;p-tb&amp;#039;, &amp;#039;#&amp;#039;, &amp;#039;وضعیت پیوند*&amp;#039;, &amp;#039;t-url-status&amp;#039;, &amp;#039;اصلاح پارامتر url-status&amp;#039;)).on(&amp;#039;click&amp;#039;, function(e) {&lt;br /&gt;
        e.preventDefault();&lt;br /&gt;
        loadPage(conf.page).then(function(content) {&lt;br /&gt;
            var urlStatusRe = /\|\s*url\-status\s*=\s*(dead|live)/;&lt;br /&gt;
            var urlStatusReGlobal = /\|\s*url\-status\s*=\s*(dead|live)/g;&lt;br /&gt;
            var allMatches = content.match(urlStatusReGlobal),&lt;br /&gt;
                i,&lt;br /&gt;
                error = false;&lt;br /&gt;
&lt;br /&gt;
            if (!allMatches) {&lt;br /&gt;
                error = true;&lt;br /&gt;
            } else {&lt;br /&gt;
                for (i = 0; i &amp;lt; allMatches.length; i++) {&lt;br /&gt;
                    value = content.match(urlStatusRe)[1];&lt;br /&gt;
                    content = content.replace(urlStatusRe, &amp;#039;| dead-url = &amp;#039; + bool[value]);&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            return [content, allMatches ? allMatches.length : null, error];&lt;br /&gt;
        }).then(function(result) {&lt;br /&gt;
            if (result[2]) {&lt;br /&gt;
                mw.notify(&amp;#039;پارامتر ناشناخته در صفحه یافت نشد&amp;#039;, {&lt;br /&gt;
                    type: &amp;#039;error&amp;#039;,&lt;br /&gt;
                    title: &amp;#039;انجام نشد!&amp;#039;&lt;br /&gt;
                });&lt;br /&gt;
                return;&lt;br /&gt;
            } else {&lt;br /&gt;
                return savePage(&lt;br /&gt;
                    conf.page,&lt;br /&gt;
                    result[0],&lt;br /&gt;
                    &amp;#039;جایگزینی &amp;#039; + mw.language.convertNumber(result[1]) +&lt;br /&gt;
                    &amp;#039; مورد پارامتر «url-status» با «dead-url»&amp;#039; + conf.ad,&lt;br /&gt;
                    result[1]&lt;br /&gt;
                );&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    });&lt;br /&gt;
});&lt;/div&gt;</summary>
		<author><name>محمد</name></author>
	</entry>
</feed>