<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://moasspedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AAfC_topic</id>
	<title>Module:AfC topic - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://moasspedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AAfC_topic"/>
	<link rel="alternate" type="text/html" href="https://moasspedia.org/w/index.php?title=Module:AfC_topic&amp;action=history"/>
	<updated>2026-04-06T03:45:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://moasspedia.org/w/index.php?title=Module:AfC_topic&amp;diff=608&amp;oldid=prev</id>
		<title>Wikipedia&gt;SD0001: use mw.text.jsonDecode instead of Module:Jf-JSON</title>
		<link rel="alternate" type="text/html" href="https://moasspedia.org/w/index.php?title=Module:AfC_topic&amp;diff=608&amp;oldid=prev"/>
		<updated>2021-11-26T16:20:58Z</updated>

		<summary type="html">&lt;p&gt;use mw.text.jsonDecode instead of &lt;a href=&quot;/wiki/Module:Jf-JSON&quot; title=&quot;Module:Jf-JSON&quot;&gt;Module:Jf-JSON&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local ns = mw.title.getCurrentTitle().namespace&lt;br /&gt;
	if ns ~= 118 and ns ~= 2 then&lt;br /&gt;
		return &amp;#039;[[Category:AfC topic used in wrong namespace]]&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local jsondata = mw.title.new(&amp;#039;Wikipedia:WikiProject Articles for creation/AfC topic map.json&amp;#039;):getContent()&lt;br /&gt;
	local data = mw.text.jsonDecode(jsondata)&lt;br /&gt;
	&lt;br /&gt;
	local topic = args[1]&lt;br /&gt;
	local match = data[topic]&lt;br /&gt;
	&lt;br /&gt;
	if match ~= nil then&lt;br /&gt;
		return &amp;#039;[[Category:&amp;#039; .. match.category .. &amp;#039;]]&amp;#039;&lt;br /&gt;
	else &lt;br /&gt;
		return &amp;#039;[[Category:AfC topic: invalid parameter]]&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Wikipedia&gt;SD0001</name></author>
	</entry>
</feed>