<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FNardog%2F14</id>
	<title>Module:Sandbox/Nardog/14 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FNardog%2F14"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Nardog/14&amp;action=history"/>
	<updated>2026-04-21T07:47:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Sandbox/Nardog/14&amp;diff=145871&amp;oldid=prev</id>
		<title>imported&gt;Legoktm: Replace Module:No globals with require( &quot;strict&quot; )</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Nardog/14&amp;diff=145871&amp;oldid=prev"/>
		<updated>2022-10-23T21:03:42Z</updated>

		<summary type="html">&lt;p&gt;Replace &lt;a href=&quot;/research/Module:No_globals&quot; title=&quot;Module:No globals&quot;&gt;Module:No globals&lt;/a&gt; with require( &amp;quot;strict&amp;quot; )&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require(&amp;#039;strict&amp;#039;)&lt;br /&gt;
local data = mw.loadData(&amp;#039;Module:Sandbox/Nardog/14d&amp;#039;)&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local code = args.code&lt;br /&gt;
	local doc = args.doc&lt;br /&gt;
	local name = args.name&lt;br /&gt;
	local desc = args.desc&lt;br /&gt;
	&lt;br /&gt;
	if not code and not doc then&lt;br /&gt;
		return mw.html.create(&amp;#039;tr&amp;#039;):tag(&amp;#039;td&amp;#039;):attr(&amp;#039;colspan&amp;#039;, 4)&lt;br /&gt;
			:tag(&amp;#039;span&amp;#039;)&lt;br /&gt;
				:addClass(&amp;#039;error&amp;#039;)&lt;br /&gt;
				:wikitext(&amp;#039;Error: &amp;lt;code&amp;gt;|code=&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;|doc=&amp;lt;/code&amp;gt; must be specified&amp;#039;)&lt;br /&gt;
				:allDone()&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not code and not args.instruction then&lt;br /&gt;
		code = doc .. &amp;#039;.js&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	if not doc then&lt;br /&gt;
		local title = code:match(&amp;#039;^(.+)%.[CJcj][Ss][Ss]?$&amp;#039;)&lt;br /&gt;
		if title then&lt;br /&gt;
			title = mw.title.new(title)&lt;br /&gt;
			if not title.isExternal and title.exists then&lt;br /&gt;
				doc = title.fullText&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if not name then&lt;br /&gt;
		name = doc and mw.ustring.match(doc, &amp;#039;[^/]+$&amp;#039;) or&lt;br /&gt;
			mw.ustring.match(code, &amp;#039;([^/]+)%.js&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local row = mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	local instruction&lt;br /&gt;
	if args.instruction ~= &amp;#039;no&amp;#039; then&lt;br /&gt;
		instruction = args.instruction&lt;br /&gt;
		if not instruction then&lt;br /&gt;
			local isGlobal = args.skin == &amp;#039;global&amp;#039;&lt;br /&gt;
			local temp = code:find(&amp;#039;%.[Cc][Ss][Ss]$&amp;#039;) and &amp;#039;luss&amp;#039; or &amp;#039;lusc&amp;#039;&lt;br /&gt;
			if isGlobal then&lt;br /&gt;
				local interwiki = mw.title.new(code).interwiki&lt;br /&gt;
				local path = interwiki == &amp;#039;meta&amp;#039; and code:sub(6) or&lt;br /&gt;
					interwiki == &amp;#039;&amp;#039; and &amp;#039;w:&amp;#039; .. code or code&lt;br /&gt;
				temp = mw.getCurrentFrame():expandTemplate{&lt;br /&gt;
					title = temp, args = { path, &amp;#039;&amp;#039; }&lt;br /&gt;
				}:gsub(&amp;#039;{{subst:localurl&amp;#039;, &amp;#039;{{subst:fullurl&amp;#039;):gsub(&amp;#039;%s*//.-$&amp;#039;, &amp;#039;&amp;#039;)&lt;br /&gt;
			else&lt;br /&gt;
				temp = string.format(&amp;#039;{{subst:%s|1=%s%s}}&amp;#039;,&lt;br /&gt;
					temp,&lt;br /&gt;
					code,&lt;br /&gt;
					args.backlink and &amp;#039;|2=&amp;#039; .. args.backlink or &amp;#039;&amp;#039;&lt;br /&gt;
				)&lt;br /&gt;
			end&lt;br /&gt;
			instruction = string.format(&lt;br /&gt;
				&amp;#039;\&amp;#039;\&amp;#039;\&amp;#039;[[%sSpecial:EditPage/Special:MyPage/%s.js|Click here]]\&amp;#039;\&amp;#039;\&amp;#039; and paste:&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;%s&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt;&amp;#039;,&lt;br /&gt;
				isGlobal and &amp;#039;meta:&amp;#039; or &amp;#039;&amp;#039;,&lt;br /&gt;
				args.skin or &amp;#039;common&amp;#039;,&lt;br /&gt;
				temp&lt;br /&gt;
			)&lt;br /&gt;
		end&lt;br /&gt;
		instruction = mw.html.create(&amp;#039;&amp;#039;)&lt;br /&gt;
			:newline()&lt;br /&gt;
			:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
				:addClass(&amp;#039;mw-collapsible mw-collapsed userscripttable-instruction&amp;#039;)&lt;br /&gt;
				:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
					:addClass(&amp;#039;userscripttable-instruction-head&amp;#039;)&lt;br /&gt;
					:wikitext(&amp;#039;How to install&amp;#039;)&lt;br /&gt;
					:done()&lt;br /&gt;
				:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
					:addClass(&amp;#039;mw-collapsible-content&amp;#039;)&lt;br /&gt;
					:wikitext(instruction)&lt;br /&gt;
					:done()&lt;br /&gt;
				:done()&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	do&lt;br /&gt;
		local cell = mw.html.create(&amp;#039;td&amp;#039;)&lt;br /&gt;
			:wikitext(doc and string.format(&amp;#039;[[:%s|%s]]&amp;#039;, doc, name) or name)&lt;br /&gt;
		&lt;br /&gt;
		if args.indent and args.indent:find(&amp;#039;^%d+$&amp;#039;) then&lt;br /&gt;
			cell:css(&amp;#039;padding-left&amp;#039;, args.indent .. &amp;#039;em&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if code then&lt;br /&gt;
			cell&lt;br /&gt;
				:wikitext(&amp;#039; &amp;#039;)&lt;br /&gt;
				:tag(&amp;#039;span&amp;#039;)&lt;br /&gt;
					:addClass(&amp;#039;userscripttable-sourcelink&amp;#039;)&lt;br /&gt;
					:wikitext(string.format(&amp;#039;([[:%s|source]])&amp;#039;, code))&lt;br /&gt;
					:done()&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if instruction and code then&lt;br /&gt;
			cell:tag(&amp;#039;span&amp;#039;)&lt;br /&gt;
				:addClass(&amp;#039;scriptInstallerLink&amp;#039;)&lt;br /&gt;
				:attr(&amp;#039;id&amp;#039;, code)&lt;br /&gt;
				:done()&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		row:node(cell)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	row:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
		:wikitext(desc)&lt;br /&gt;
		:node(instruction)&lt;br /&gt;
		:done()&lt;br /&gt;
	&lt;br /&gt;
	local stats = code and data[code] or { total = &amp;#039;N/A&amp;#039;, active = &amp;#039;N/A&amp;#039; }&lt;br /&gt;
	row&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(stats.total):done()&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(stats.active)&lt;br /&gt;
	&lt;br /&gt;
	return row&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = {}&lt;br /&gt;
	-- for k, v in pairs(frame:getParent().args) do&lt;br /&gt;
	for k, v in pairs(frame.args or frame:getParent().args) do&lt;br /&gt;
		if v and v ~= &amp;#039;&amp;#039; then&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Legoktm</name></author>
	</entry>
</feed>