<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://deadlock.wiki/Module:HeroTabs?action=history&amp;feed=atom</id>
	<title>Module:HeroTabs - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://deadlock.wiki/Module:HeroTabs?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://deadlock.wiki/Module:HeroTabs?action=history"/>
	<updated>2026-09-01T08:54:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://deadlock.wiki/Module:HeroTabs?diff=93259&amp;oldid=prev</id>
		<title>Kai at 18:08, 15 July 2026</title>
		<link rel="alternate" type="text/html" href="https://deadlock.wiki/Module:HeroTabs?diff=93259&amp;oldid=prev"/>
		<updated>2026-07-15T18:08:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&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 18:08, 15 July 2026&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-l68&quot;&gt;Line 68:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 68:&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;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;	local root = mw.html.create(&amp;#039;div&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;	local root = mw.html.create(&amp;#039;div&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;		:addClass(&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;navbox-title &lt;/del&gt;hero-tabs&#039;)&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;		:addClass(&#039;hero-tabs&#039;)&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;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;	for _, tab in ipairs(TABS) do&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;	for _, tab in ipairs(TABS) do&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key deadlock:diff:1.41:old-93078:rev-93259:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Kai</name></author>
	</entry>
	<entry>
		<id>https://deadlock.wiki/Module:HeroTabs?diff=93078&amp;oldid=prev</id>
		<title>Vergir: Created page with &quot;local p = {}  local lang_module = require(&#039;Module:Lang&#039;) local dictionary_module = require(&#039;Module:Dictionary&#039;)  -- Tab bar definition, in display order. -- subpage : subpage name appended to the base page (&#039;&#039; = the base page itself) -- key     : translation key -- source  : &#039;dictionary&#039; (via Module:Dictionary) or &#039;lang&#039; (via Module:Lang, Valve strings) local TABS = { 	{ subpage = &#039;&#039;,               key = &#039;Overview&#039;,                   source = &#039;dictionary&#039; }, 	{ subpage =...&quot;</title>
		<link rel="alternate" type="text/html" href="https://deadlock.wiki/Module:HeroTabs?diff=93078&amp;oldid=prev"/>
		<updated>2026-07-15T17:27:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {}  local lang_module = require(&amp;#039;Module:Lang&amp;#039;) local dictionary_module = require(&amp;#039;Module:Dictionary&amp;#039;)  -- Tab bar definition, in display order. -- subpage : subpage name appended to the base page (&amp;#039;&amp;#039; = the base page itself) -- key     : translation key -- source  : &amp;#039;dictionary&amp;#039; (via Module:Dictionary) or &amp;#039;lang&amp;#039; (via Module:Lang, Valve strings) local TABS = { 	{ subpage = &amp;#039;&amp;#039;,               key = &amp;#039;Overview&amp;#039;,                   source = &amp;#039;dictionary&amp;#039; }, 	{ subpage =...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
local lang_module = require(&amp;#039;Module:Lang&amp;#039;)&lt;br /&gt;
local dictionary_module = require(&amp;#039;Module:Dictionary&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
-- Tab bar definition, in display order.&lt;br /&gt;
-- subpage : subpage name appended to the base page (&amp;#039;&amp;#039; = the base page itself)&lt;br /&gt;
-- key     : translation key&lt;br /&gt;
-- source  : &amp;#039;dictionary&amp;#039; (via Module:Dictionary) or &amp;#039;lang&amp;#039; (via Module:Lang, Valve strings)&lt;br /&gt;
local TABS = {&lt;br /&gt;
	{ subpage = &amp;#039;&amp;#039;,               key = &amp;#039;Overview&amp;#039;,                   source = &amp;#039;dictionary&amp;#039; },&lt;br /&gt;
	{ subpage = &amp;#039;Update_history&amp;#039;, key = &amp;#039;Update history&amp;#039;,             source = &amp;#039;dictionary&amp;#039; },&lt;br /&gt;
	{ subpage = &amp;#039;Strategy&amp;#039;,       key = &amp;#039;Strategy&amp;#039;,                   source = &amp;#039;dictionary&amp;#039; },&lt;br /&gt;
	{ subpage = &amp;#039;Movement&amp;#039;,       key = &amp;#039;Citadel_ShopFilter_Movement&amp;#039;, source = &amp;#039;lang&amp;#039; },&lt;br /&gt;
	{ subpage = &amp;#039;Lore&amp;#039;,           key = &amp;#039;Lore&amp;#039;,                       source = &amp;#039;dictionary&amp;#039; },&lt;br /&gt;
	{ subpage = &amp;#039;Voice_lines&amp;#039;,    key = &amp;#039;Voice lines&amp;#039;,                source = &amp;#039;dictionary&amp;#039; },&lt;br /&gt;
	{ subpage = &amp;#039;Sounds&amp;#039;,         key = &amp;#039;Sounds&amp;#039;,                     source = &amp;#039;dictionary&amp;#039; },&lt;br /&gt;
	{ subpage = &amp;#039;Music&amp;#039;,          key = &amp;#039;Music&amp;#039;,                      source = &amp;#039;dictionary&amp;#039; },&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local function lang_suffix()&lt;br /&gt;
	local code = lang_module.get_lang_code()&lt;br /&gt;
	if code == &amp;#039;en&amp;#039; then&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;#039;/&amp;#039; .. code&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function get_label(tab)&lt;br /&gt;
	if tab.source == &amp;#039;lang&amp;#039; then&lt;br /&gt;
		return lang_module.get_string(tab.key)&lt;br /&gt;
	end&lt;br /&gt;
	return dictionary_module.translate(tab.key)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Returns the title object of the first page that exists, or nil.&lt;br /&gt;
-- Checks the localized page first, then falls back to the unlocalized one.&lt;br /&gt;
local function resolve_target(base, subpage, suffix)&lt;br /&gt;
	local path = base&lt;br /&gt;
	if subpage ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		path = path .. &amp;#039;/&amp;#039; .. subpage&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if suffix ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		local localized = mw.title.new(path .. suffix)&lt;br /&gt;
		if localized and localized.exists then&lt;br /&gt;
			return localized&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local plain = mw.title.new(path)&lt;br /&gt;
	if plain and plain.exists then&lt;br /&gt;
		return plain&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.render(frame)&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
	local current = mw.title.getCurrentTitle()&lt;br /&gt;
	local base = args[1]&lt;br /&gt;
	if not base or base == &amp;#039;&amp;#039; then&lt;br /&gt;
		base = current.rootText&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local suffix = lang_suffix()&lt;br /&gt;
&lt;br /&gt;
	local root = mw.html.create(&amp;#039;div&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;navbox-title hero-tabs&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
	for _, tab in ipairs(TABS) do&lt;br /&gt;
		local target = resolve_target(base, tab.subpage, suffix)&lt;br /&gt;
		if target then&lt;br /&gt;
			local is_active = (target.fullText == current.fullText)&lt;br /&gt;
			root:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
				:addClass(&amp;#039;hero-tab&amp;#039;)&lt;br /&gt;
				:addClass(is_active and &amp;#039;hero-tab-active&amp;#039; or &amp;#039;hero-tab-inactive&amp;#039;)&lt;br /&gt;
				:wikitext(string.format(&amp;#039;[[%s|&amp;lt;span&amp;gt;%s&amp;lt;/span&amp;gt;]]&amp;#039;, target.fullText, get_label(tab)))&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return frame:extensionTag{&lt;br /&gt;
		name = &amp;#039;templatestyles&amp;#039;,&lt;br /&gt;
		args = { src = &amp;#039;HeroTabs/styles.css&amp;#039; }&lt;br /&gt;
	} .. tostring(root)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Vergir</name></author>
	</entry>
</feed>