<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AMainonly</id>
	<title>Module:Mainonly - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AMainonly"/>
	<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Module:Mainonly&amp;action=history"/>
	<updated>2026-05-12T11:40:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.runerealm.org/index.php?title=Module:Mainonly&amp;diff=335&amp;oldid=prev</id>
		<title>Alex: Created page with &quot;--fuse2=Returns true if invoked in the content namespace, otherwise false }} -- -- -- Module to return text only when invoked in the content namespace --  local p = {}  function p.main(frame) 	local ret = frame:getParent().args[1] or &#039;&#039; 	return p._main...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Module:Mainonly&amp;diff=335&amp;oldid=prev"/>
		<updated>2024-10-11T20:51:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;--[[ {{Helper module|name=Mainonly |fname1=_main(arg) |ftype1=Any value |fuse1=If the module is invoked in the content namespace, it will return arg, otherwise, it will return an empty string |fname2=on_main() |ftype2=N/A |fuse2=Returns true if invoked in the content namespace, otherwise false }} --]] -- -- Module to return text only when invoked in the content namespace --  local p = {}  function p.main(frame) 	local ret = frame:getParent().args[1] or &amp;#039;&amp;#039; 	return p._main...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--[[&lt;br /&gt;
{{Helper module|name=Mainonly&lt;br /&gt;
|fname1=_main(arg)&lt;br /&gt;
|ftype1=Any value&lt;br /&gt;
|fuse1=If the module is invoked in the content namespace, it will return arg, otherwise, it will return an empty string&lt;br /&gt;
|fname2=on_main()&lt;br /&gt;
|ftype2=N/A&lt;br /&gt;
|fuse2=Returns true if invoked in the content namespace, otherwise false&lt;br /&gt;
}}&lt;br /&gt;
--]]&lt;br /&gt;
--&lt;br /&gt;
-- Module to return text only when invoked in the content namespace&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local ret = frame:getParent().args[1] or &amp;#039;&amp;#039;&lt;br /&gt;
	return p._main(ret)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(text)&lt;br /&gt;
	if mw.title.getCurrentTitle().namespace == 0 then&lt;br /&gt;
		return text&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
-- Boolean for whether or not the page is in the mainspace&lt;br /&gt;
-- Sometimes it might be better to just check first&lt;br /&gt;
-- Rather than spend processing time on something that won&amp;#039;t be used&lt;br /&gt;
function p.on_main()&lt;br /&gt;
	return mw.title.getCurrentTitle().namespace == 0&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Alex</name></author>
	</entry>
</feed>