<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wonkpedia.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AIcon</id>
	<title>Module:Icon - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wonkpedia.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AIcon"/>
	<link rel="alternate" type="text/html" href="https://wonkpedia.org/mediawiki/index.php?title=Module:Icon&amp;action=history"/>
	<updated>2026-04-15T07:36:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.13</generator>
	<entry>
		<id>https://wonkpedia.org/mediawiki/index.php?title=Module:Icon&amp;diff=1969&amp;oldid=prev</id>
		<title>Bmueller: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wonkpedia.org/mediawiki/index.php?title=Module:Icon&amp;diff=1969&amp;oldid=prev"/>
		<updated>2022-04-21T09:39:01Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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 09:39, 21 April 2022&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key lets_get_wonky-mediawiki-:diff:wikidiff2:1.12:old-1968:rev-1969:1.11.0 --&gt;
&lt;/table&gt;</summary>
		<author><name>Bmueller</name></author>
	</entry>
	<entry>
		<id>https://wonkpedia.org/mediawiki/index.php?title=Module:Icon&amp;diff=1968&amp;oldid=prev</id>
		<title>Wikipedia&gt;Hike395: auto detect calls from sandbox</title>
		<link rel="alternate" type="text/html" href="https://wonkpedia.org/mediawiki/index.php?title=Module:Icon&amp;diff=1968&amp;oldid=prev"/>
		<updated>2022-02-12T18:06:28Z</updated>

		<summary type="html">&lt;p&gt;auto detect calls from sandbox&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module implements [[Template:Icon]].&lt;br /&gt;
&lt;br /&gt;
require(&amp;quot;Module:No globals&amp;quot;)&lt;br /&gt;
local yesNo = require(&amp;quot;Module:Yesno&amp;quot;)&lt;br /&gt;
local getArgs = require(&amp;quot;Module:Arguments&amp;quot;).getArgs&lt;br /&gt;
local getPlain = nil&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Determine whether we're being called from a sandbox&lt;br /&gt;
local sandbox = mw.getCurrentFrame():getTitle():find('sandbox', 1, true) and '/sandbox' or ''&lt;br /&gt;
&lt;br /&gt;
-- Implements [[Template:Icon]]&lt;br /&gt;
-- Returns the icon image corresponding to a string (like 'B')&lt;br /&gt;
function p._main(args, data)&lt;br /&gt;
	local data_module = 'Module:Icon/data'..sandbox&lt;br /&gt;
	data = data or mw.loadData(data_module)&lt;br /&gt;
	local code = args.class or args[1]&lt;br /&gt;
	local iconData&lt;br /&gt;
	if code then&lt;br /&gt;
		code = code:match('^%s*(.-)%s*$'):lower() -- trim whitespace and put in lower case&lt;br /&gt;
		iconData = data[code]&lt;br /&gt;
	end&lt;br /&gt;
	if not iconData then&lt;br /&gt;
		iconData = data._DEFAULT&lt;br /&gt;
	end&lt;br /&gt;
	return string.format(&lt;br /&gt;
		'[[File:%s%s%s|%s|class=noviewer|alt=%s]]',&lt;br /&gt;
		iconData.image,&lt;br /&gt;
		iconData.tooltip and '|' .. iconData.tooltip or '',&lt;br /&gt;
		iconData.link == false and '|link=' or '',&lt;br /&gt;
		args.size or '16x16px',&lt;br /&gt;
		iconData.alt or ''&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Implements [[Template:Icon link]], a superset of [[Template:Icon]]&lt;br /&gt;
-- Returns an icon, plus a suitably formatted wikilink&lt;br /&gt;
function p._link(args, data)&lt;br /&gt;
	args.size = args.size or args.iconsize&lt;br /&gt;
	local icon = p._main(args, data)&lt;br /&gt;
	-- If no link given in args[2], default back to [[Template:Icon]]&lt;br /&gt;
	if not args[2] then&lt;br /&gt;
		return icon&lt;br /&gt;
	end&lt;br /&gt;
	-- Strip wiki markup out of link&lt;br /&gt;
	getPlain = getPlain or require(&amp;quot;Module:Text&amp;quot;).Text().getPlain&lt;br /&gt;
	local link = getPlain(args[2])&lt;br /&gt;
	local display = args[3] or args[2]&lt;br /&gt;
	-- italicize display string, if requested&lt;br /&gt;
	if yesNo(args.i) or yesNo(args.italic) or yesNo(args.italics) then&lt;br /&gt;
		display = '&amp;lt;i&amp;gt;'..display..'&amp;lt;/i&amp;gt;'&lt;br /&gt;
	end&lt;br /&gt;
	-- if display is link, just use standard wlink&lt;br /&gt;
	if link == display then&lt;br /&gt;
		return icon..'&amp;amp;nbsp;[['..link..']]'&lt;br /&gt;
	end&lt;br /&gt;
	return icon..'&amp;amp;nbsp;[['..link..'|'..display..']]'&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = getArgs(frame,{parentFirst=true})&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.link(frame)&lt;br /&gt;
	local args = getArgs(frame,{parentFirst=true})&lt;br /&gt;
	return p._link(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Wikipedia&gt;Hike395</name></author>
	</entry>
</feed>