<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans">
	<id>http://scr.wiki/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3AYesno</id>
	<title>模块:Yesno - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="http://scr.wiki/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3AYesno"/>
	<link rel="alternate" type="text/html" href="http://scr.wiki/index.php?title=%E6%A8%A1%E5%9D%97:Yesno&amp;action=history"/>
	<updated>2026-04-14T16:55:27Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>http://scr.wiki/index.php?title=%E6%A8%A1%E5%9D%97:Yesno&amp;diff=10&amp;oldid=prev</id>
		<title>Wikipedia zhwiki&gt;Xiplus-abot：​已保护“Module:Yesno”：​高風險模板：3127208引用&lt;!-- 機器人3 --&gt;（[编辑=仅允许管理员]（无限期）[移动=仅允许管理员]（无限期））</title>
		<link rel="alternate" type="text/html" href="http://scr.wiki/index.php?title=%E6%A8%A1%E5%9D%97:Yesno&amp;diff=10&amp;oldid=prev"/>
		<updated>2024-06-24T20:51:11Z</updated>

		<summary type="html">&lt;p&gt;已保护“&lt;a href=&quot;/wiki/%E6%A8%A1%E5%9D%97:Yesno&quot; title=&quot;模块:Yesno&quot;&gt;Module:Yesno&lt;/a&gt;”：​高風險模板：3127208引用&amp;lt;!-- &lt;a href=&quot;/index.php?title=%E7%94%A8%E6%88%B7:Xiplus-abot/task/3&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;用户:Xiplus-abot/task/3（页面不存在）&quot;&gt;機器人3&lt;/a&gt; --&amp;gt;（[编辑=仅允许管理员]（无限期）[移动=仅允许管理员]（无限期））&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Function allowing for consistent treatment of boolean-like wikitext input.&lt;br /&gt;
-- It works similarly to the template {{yesno}}.&lt;br /&gt;
&lt;br /&gt;
return function (val, default)&lt;br /&gt;
	-- If your wiki uses non-ascii characters for any of &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, etc., you&lt;br /&gt;
	-- should replace &amp;quot;val:lower()&amp;quot; with &amp;quot;mw.ustring.lower(val)&amp;quot; in the&lt;br /&gt;
	-- following line.&lt;br /&gt;
	val = type(val) == &amp;#039;string&amp;#039; and val:lower() or val&lt;br /&gt;
	if val == nil then&lt;br /&gt;
		return nil&lt;br /&gt;
	elseif val == true &lt;br /&gt;
		or val == &amp;#039;yes&amp;#039;&lt;br /&gt;
		or val == &amp;#039;y&amp;#039;&lt;br /&gt;
		or val == &amp;#039;true&amp;#039;&lt;br /&gt;
		or val == &amp;#039;t&amp;#039;&lt;br /&gt;
		or val == &amp;#039;on&amp;#039;&lt;br /&gt;
		or val == &amp;#039;是&amp;#039;&lt;br /&gt;
		or val == &amp;#039;开&amp;#039;&lt;br /&gt;
		or val == &amp;#039;開&amp;#039;&lt;br /&gt;
		or tonumber(val) == 1&lt;br /&gt;
	then&lt;br /&gt;
		return true&lt;br /&gt;
	elseif val == false&lt;br /&gt;
		or val == &amp;#039;no&amp;#039;&lt;br /&gt;
		or val == &amp;#039;n&amp;#039;&lt;br /&gt;
		or val == &amp;#039;false&amp;#039;&lt;br /&gt;
		or val == &amp;#039;f&amp;#039;&lt;br /&gt;
		or val == &amp;#039;off&amp;#039;&lt;br /&gt;
		or val == &amp;#039;否&amp;#039;&lt;br /&gt;
		or val == &amp;#039;关&amp;#039;&lt;br /&gt;
		or val == &amp;#039;關&amp;#039;&lt;br /&gt;
		or tonumber(val) == 0&lt;br /&gt;
	then&lt;br /&gt;
		return false&lt;br /&gt;
	else&lt;br /&gt;
		return default&lt;br /&gt;
	end&lt;br /&gt;
end&lt;/div&gt;</summary>
		<author><name>Wikipedia zhwiki&gt;Xiplus-abot</name></author>
	</entry>
</feed>