<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://trolleybus.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ANavpills</id>
	<title>Module:Navpills - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://trolleybus.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ANavpills"/>
	<link rel="alternate" type="text/html" href="https://trolleybus.wiki/index.php?title=Module:Navpills&amp;action=history"/>
	<updated>2026-04-04T14:16:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://trolleybus.wiki/index.php?title=Module:Navpills&amp;diff=165&amp;oldid=prev</id>
		<title>TickoGrey at 01:19, 17 December 2024</title>
		<link rel="alternate" type="text/html" href="https://trolleybus.wiki/index.php?title=Module:Navpills&amp;diff=165&amp;oldid=prev"/>
		<updated>2024-12-17T01:19:39Z</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;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:19, 17 December 2024&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-l37&quot;&gt;Line 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&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;		if args[ &amp;#039;image&amp;#039; .. i ] then&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;		if args[ &amp;#039;image&amp;#039; .. i ] then&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;			navpill:tag(&amp;#039;div&amp;#039;):addClass(&amp;#039;template-navpill-background&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;			navpill:tag(&amp;#039;div&amp;#039;):addClass(&amp;#039;template-navpill-background&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;				:wikitext( string.format( &#039;[[File:%s|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;x48px&lt;/del&gt;|link=]]&#039;, args[ &#039;image&#039; .. num ] ) )&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;				:wikitext( string.format( &#039;[[File:%s|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;x128px&lt;/ins&gt;|link=]]&#039;, args[ &#039;image&#039; .. num ] ) )&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;		end&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;		end&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;!-- diff cache key my_wiki:diff:1.41:old-15:rev-165:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>TickoGrey</name></author>
	</entry>
	<entry>
		<id>https://trolleybus.wiki/index.php?title=Module:Navpills&amp;diff=15&amp;oldid=prev</id>
		<title>TickoGrey: Created page with &quot;local mArguments --initialize lazily local p = {}   -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was &#039;data&#039;, and -- &#039;data1&#039;, &#039;data2&#039;, and &#039;data5&#039; exist, it would return {1, 2, 5}. local function getArgNums(prefix, args) 	local nums = {} 	for k, v in pairs(args) do 		local num = tostring(k):match(&#039;^&#039; .. prefix .. &#039;([1-9]%d*)$&#039;) 		if num then table.insert(nums, tonumber(num)) end 	end 	table.s...&quot;</title>
		<link rel="alternate" type="text/html" href="https://trolleybus.wiki/index.php?title=Module:Navpills&amp;diff=15&amp;oldid=prev"/>
		<updated>2024-12-04T06:49:50Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local mArguments --initialize lazily local p = {}   -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was &amp;#039;data&amp;#039;, and -- &amp;#039;data1&amp;#039;, &amp;#039;data2&amp;#039;, and &amp;#039;data5&amp;#039; exist, it would return {1, 2, 5}. local function getArgNums(prefix, args) 	local nums = {} 	for k, v in pairs(args) do 		local num = tostring(k):match(&amp;#039;^&amp;#039; .. prefix .. &amp;#039;([1-9]%d*)$&amp;#039;) 		if num then table.insert(nums, tonumber(num)) end 	end 	table.s...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local mArguments --initialize lazily&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Returns a table containing the numbers of the arguments that exist&lt;br /&gt;
-- for the specified prefix. For example, if the prefix was &amp;#039;data&amp;#039;, and&lt;br /&gt;
-- &amp;#039;data1&amp;#039;, &amp;#039;data2&amp;#039;, and &amp;#039;data5&amp;#039; exist, it would return {1, 2, 5}.&lt;br /&gt;
local function getArgNums(prefix, args)&lt;br /&gt;
	local nums = {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		local num = tostring(k):match(&amp;#039;^&amp;#039; .. prefix .. &amp;#039;([1-9]%d*)$&amp;#039;)&lt;br /&gt;
		if num then table.insert(nums, tonumber(num)) end&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(nums)&lt;br /&gt;
	return nums&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--Implements {{Navpills}} from the frame&lt;br /&gt;
function p.navpills( frame )&lt;br /&gt;
	mArguments = require( &amp;#039;Module:Arguments&amp;#039; )&lt;br /&gt;
	return p._navpills( mArguments.getArgs( frame ) )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._navpills( args )&lt;br /&gt;
	if not args then&lt;br /&gt;
		return &amp;#039;Missing arguments&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local html = mw.html.create( &amp;#039;div&amp;#039; ):addClass( &amp;#039;template-navpills&amp;#039; ):attr( &amp;#039;role&amp;#039;, &amp;#039;navigation&amp;#039; )&lt;br /&gt;
	&lt;br /&gt;
	for i, _ in ipairs( getArgNums( &amp;#039;page&amp;#039;, args ) ) do&lt;br /&gt;
		if not args[ &amp;#039;page&amp;#039; .. i ] then return end&lt;br /&gt;
		local num = tostring( i )&lt;br /&gt;
		local navpill = mw.html.create(&amp;#039;div&amp;#039;):addClass(&amp;#039;template-navpill&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
		if args[ &amp;#039;image&amp;#039; .. i ] then&lt;br /&gt;
			navpill:tag(&amp;#039;div&amp;#039;):addClass(&amp;#039;template-navpill-background&amp;#039;)&lt;br /&gt;
				:wikitext( string.format( &amp;#039;[[File:%s|x48px|link=]]&amp;#039;, args[ &amp;#039;image&amp;#039; .. num ] ) )&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		navpill:wikitext( string.format( &amp;#039;[[%s|%s]]&amp;#039;, args[ &amp;#039;page&amp;#039; .. num ], args[ &amp;#039;text&amp;#039; .. num ] or args[ &amp;#039;page&amp;#039; .. num ] ) )&lt;br /&gt;
		html:node(navpill)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return mw.getCurrentFrame():extensionTag{&lt;br /&gt;
		name = &amp;#039;templatestyles&amp;#039;, args = { src = &amp;#039;Module:Navpills/styles.css&amp;#039; }&lt;br /&gt;
	} .. tostring( html )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>TickoGrey</name></author>
	</entry>
</feed>