https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3AJctrdt Module:Jctrdt - Revision history 2025-05-30T07:09:20Z Revision history for this page on the wiki MediaWiki 1.45.0-wmf.3 https://en.wikipedia.org/w/index.php?title=Module:Jctrdt&diff=1169201110&oldid=prev MusikBot II: Changed protection settings for "Module:Jctrdt": High-risk template or module: 2500 transclusions (more info) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite)) 2023-08-07T18:00:11Z <p>Changed protection settings for &quot;<a href="/wiki/Module:Jctrdt" title="Module:Jctrdt">Module:Jctrdt</a>&quot;: <a href="/wiki/Wikipedia:High-risk_templates" title="Wikipedia:High-risk templates">High-risk template or module</a>: 2500 transclusions (<a href="/wiki/User:MusikBot_II/TemplateProtector" title="User:MusikBot II/TemplateProtector">more info</a>) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite))</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <tr class="diff-title" lang="en"> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 18:00, 7 August 2023</td> </tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div> </td></tr></table> MusikBot II https://en.wikipedia.org/w/index.php?title=Module:Jctrdt&diff=1104091404&oldid=prev Fredddie: Fix 2022-08-12T15:58:52Z <p>Fix</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 15:58, 12 August 2022</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 164:</td> <td colspan="2" class="diff-lineno">Line 164:</td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><br /></td> <td class="diff-marker"></td> <td style="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;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div> for _,banner in ipairs(banners) do</div></td> <td class="diff-marker"></td> <td style="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;"><div> for _,banner in ipairs(banners) do</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_4_0_lhs">&#x26AB;</a></td> <td style="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;"><div><a name="movedpara_1_0_rhs"></a> shieldCode = format("[[File:%s|%<ins style="font-weight: bold; text-decoration: none;">spx</ins>|<ins style="font-weight: bold; text-decoration: none;">link=|alt=</ins>]]&lt;br&gt;%s",</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="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;"><div> if shieldExists(banner[1]) then</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_6_0_lhs">&#x26AB;</a></td> <td style="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;"><div><a name="movedpara_3_0_rhs"></a> banner[1],</div></td> </tr> <tr> <td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_1_0_rhs">&#x26AB;</a></td> <td style="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;"><div><a name="movedpara_4_0_lhs"></a><del style="font-weight: bold; text-decoration: none;"> </del> shieldCode = format("[[File:%s|%<del style="font-weight: bold; text-decoration: none;">s%s</del>|<del style="font-weight: bold; text-decoration: none;">%s</del>]]&lt;br&gt;%s",</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="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;"><div> defaultShieldSize,</div></td> </tr> <tr> <td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_3_0_rhs">&#x26AB;</a></td> <td style="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;"><div><a name="movedpara_6_0_lhs"></a><del style="font-weight: bold; text-decoration: none;"> </del> banner[1],</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="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;"><div> <del style="font-weight: bold; text-decoration: none;"> banner[2],</del></div></td> <td class="diff-marker" data-marker="+"></td> <td style="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;"><div> <ins style="font-weight: bold; text-decoration: none;">shieldCode)</ins></div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="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;"><div> link,</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="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;"><div> banner[1],</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="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;"><div> shieldCode)</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="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;"><div> end</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div> end</div></td> <td class="diff-marker"></td> <td style="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;"><div> end</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div> return '&lt;span style="display: inline-block; vertical-align: baseline; line-height: 0; text-align: center;"&gt;' .. shieldCode .. '&lt;/span&gt;'</div></td> <td class="diff-marker"></td> <td style="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;"><div> return '&lt;span style="display: inline-block; vertical-align: baseline; line-height: 0; text-align: center;"&gt;' .. shieldCode .. '&lt;/span&gt;'</div></td> </tr> </table> Fredddie https://en.wikipedia.org/w/index.php?title=Module:Jctrdt&diff=1101763499&oldid=prev MusikBot II: Protected "Module:Jctrdt": High-risk template or module: 2234 transclusions (more info) ([Edit=Require autoconfirmed or confirmed access] (indefinite)) 2022-08-01T17:59:54Z <p>Protected &quot;<a href="/wiki/Module:Jctrdt" title="Module:Jctrdt">Module:Jctrdt</a>&quot;: <a href="/wiki/Wikipedia:High-risk_templates" title="Wikipedia:High-risk templates">High-risk template or module</a>: 2234 transclusions (<a href="/wiki/User:MusikBot_II/TemplateProtector" title="User:MusikBot II/TemplateProtector">more info</a>) ([Edit=Require autoconfirmed or confirmed access] (indefinite))</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <tr class="diff-title" lang="en"> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 17:59, 1 August 2022</td> </tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div> </td></tr></table> MusikBot II https://en.wikipedia.org/w/index.php?title=Module:Jctrdt&diff=1101231370&oldid=prev Fredddie: 17 2022-07-29T23:39:25Z <p>17</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 23:39, 29 July 2022</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 18:</td> <td colspan="2" class="diff-lineno">Line 18:</td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><br /></td> <td class="diff-marker"></td> <td style="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;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div>-- Shields</div></td> <td class="diff-marker"></td> <td style="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;"><div>-- Shields</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="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;"><div>local defaultShieldSize = <del style="font-weight: bold; text-decoration: none;">15</del></div></td> <td class="diff-marker" data-marker="+"></td> <td style="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;"><div>local defaultShieldSize = <ins style="font-weight: bold; text-decoration: none;">17</ins></div></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><br /></td> <td class="diff-marker"></td> <td style="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;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div>local function addContextBanner(route, name, suffix, bannerSpec)</div></td> <td class="diff-marker"></td> <td style="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;"><div>local function addContextBanner(route, name, suffix, bannerSpec)</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Line 157:</td> <td colspan="2" class="diff-lineno">Line 157:</td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div> size = concat(sizeparts)</div></td> <td class="diff-marker"></td> <td style="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;"><div> size = concat(sizeparts)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div> else</div></td> <td class="diff-marker"></td> <td style="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;"><div> else</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="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;"><div> size = format("%s%d", landscape<del style="font-weight: bold; text-decoration: none;"> and "x" or ""</del>, defaultShieldSize * scale)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="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;"><div> size = format("%s%d", landscape, defaultShieldSize * scale)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div> end</div></td> <td class="diff-marker"></td> <td style="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;"><div> end</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div> local link = showLink and "" or "|link="</div></td> <td class="diff-marker"></td> <td style="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;"><div> local link = showLink and "" or "|link="</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="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;"><div> local shieldCode = format("[[File:%s|%spx%s|%s]]", shield[1], size, link, shield[1])</div></td> <td class="diff-marker" data-marker="+"></td> <td style="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;"><div> local shieldCode = format("[[File:%s|<ins style="font-weight: bold; text-decoration: none;">x</ins>%spx%s|%s]]", shield[1], size, link, shield[1])</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div> if not banners[1] then return shieldCode end</div></td> <td class="diff-marker"></td> <td style="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;"><div> if not banners[1] then return shieldCode end</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><br /></td> <td class="diff-marker"></td> <td style="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;"><br /></td> </tr> <tr> <td colspan="2" class="diff-lineno">Line 185:</td> <td colspan="2" class="diff-lineno">Line 185:</td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div> insert(rendered, render(entry, scale, showLink))</div></td> <td class="diff-marker"></td> <td style="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;"><div> insert(rendered, render(entry, scale, showLink))</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div> end</div></td> <td class="diff-marker"></td> <td style="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;"><div> end</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="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;"><div> return concat(rendered)<del style="font-weight: bold; text-decoration: none;">, missingShields</del></div></td> <td class="diff-marker" data-marker="+"></td> <td style="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;"><div> return concat(rendered)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div>end</div></td> <td class="diff-marker"></td> <td style="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;"><div>end</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><br /></td> <td class="diff-marker"></td> <td style="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;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div>function p.link(route)</div></td> <td class="diff-marker"></td> <td style="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;"><div>function p.link(route)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div> local abbr, errMsg = parser(route, 'abbr')</div></td> <td class="diff-marker"></td> <td style="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;"><div> local abbr, errMsg = parser(route, 'abbr')</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="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;"><div> if not abbr then</div></td> <td class="diff-marker" data-marker="+"></td> <td style="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;"><div> if not abbr then<ins style="font-weight: bold; text-decoration: none;"> end</ins></div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="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;"><div> route.typeerror = true</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="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;"><div> return util.err(errMsg or format("Invalid type: %s", route.type or "(nil)"))</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="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;"><div> end</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div> if route.nolink then return abbr, abbr end</div></td> <td class="diff-marker"></td> <td style="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;"><div> if route.nolink then return abbr, abbr end</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><br /></td> <td class="diff-marker"></td> <td style="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;"><br /></td> </tr> </table> Fredddie https://en.wikipedia.org/w/index.php?title=Module:Jctrdt&diff=1101230780&oldid=prev Fredddie: reduce 2022-07-29T23:34:25Z <p>reduce</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 23:34, 29 July 2022</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 18:</td> <td colspan="2" class="diff-lineno">Line 18:</td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><br /></td> <td class="diff-marker"></td> <td style="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;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div>-- Shields</div></td> <td class="diff-marker"></td> <td style="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;"><div>-- Shields</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="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;"><div>local defaultShieldSize = <del style="font-weight: bold; text-decoration: none;">17</del></div></td> <td class="diff-marker" data-marker="+"></td> <td style="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;"><div>local defaultShieldSize = <ins style="font-weight: bold; text-decoration: none;">15</ins></div></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><br /></td> <td class="diff-marker"></td> <td style="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;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="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;"><div>local function addContextBanner(route, name, suffix, bannerSpec)</div></td> <td class="diff-marker"></td> <td style="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;"><div>local function addContextBanner(route, name, suffix, bannerSpec)</div></td> </tr> </table> Fredddie https://en.wikipedia.org/w/index.php?title=Module:Jctrdt&diff=1101229826&oldid=prev Fredddie: forked from Module:Road_data and Module:Jct 2022-07-29T23:26:31Z <p>forked from Module:Road_data and Module:Jct</p> <p><b>New page</b></p><div>local p = {}<br /> <br /> -- Change to &quot;&quot; upon deployment.<br /> local moduleSuffix = &quot;&quot;<br /> <br /> local parserModuleName = &quot;Module:Road data/parser&quot; .. moduleSuffix<br /> local statenameModuleName = &quot;Module:Jct/statename&quot; .. moduleSuffix -- TODO transition<br /> local cityModuleName = &quot;Module:Jct/city&quot; .. moduleSuffix<br /> <br /> local concat = table.concat<br /> local insert = table.insert<br /> local format = mw.ustring.format<br /> local trim = mw.text.trim<br /> <br /> local parserModule = require(parserModuleName)<br /> local parser = parserModule.parser<br /> local util = require(&quot;Module:Road data/util&quot;)<br /> <br /> -- Shields<br /> local defaultShieldSize = 17<br /> <br /> local function addContextBanner(route, name, suffix, bannerSpec)<br /> local bannerModule = &#039;Module:Road data/banners/&#039; .. string.upper(route.country)<br /> local shieldfield = name .. &#039;shield&#039;<br /> local shield = parser(route, shieldfield)<br /> if shield == nil then<br /> -- This route type does not define shield.<br /> -- Find shield in the default banner table.<br /> shield = parser(route, &#039;shield&#039;, name, bannerModule)<br /> if shield and shield ~= &#039;&#039; then<br /> if suffix == nil then<br /> suffix = parser(route, &#039;shield&#039;, &#039;suffix&#039;, bannerModule)<br /> end<br /> if suffix and suffix ~= &#039;&#039; then<br /> shield = shield .. &quot; &quot; .. suffix<br /> end<br /> shield = shield .. &quot;.svg&quot;<br /> end<br /> end<br /> if shield and shield ~= &#039;&#039; then<br /> local shieldSize = defaultShieldSize<br /> -- Add banner plate.<br /> insert(bannerSpec, {shield, shieldSize})<br /> end<br /> end<br /> <br /> local function bannerSpec(banner, bannerSize, bannerSuffix, route)<br /> local banners = {}<br /> if type(banner) == &quot;table&quot; then<br /> local bannerSizeIsNotTable = type(bannerSize) ~= &quot;table&quot;<br /> for i,filename in ipairs(banner) do<br /> local bannersize = bannerSizeIsNotTable and bannerSize or bannerSize[i] or defaultShieldSize<br /> insert(banners, {filename, bannersize})<br /> end<br /> elseif banner ~= &#039;&#039; then<br /> insert(banners, {banner, bannerSize})<br /> end<br /> <br /> if route.dir then<br /> addContextBanner(route, &#039;dir&#039;, bannerSuffix, banners)<br /> end<br /> if route.to then<br /> addContextBanner(route, &#039;to&#039;, bannerSuffix, banners)<br /> end<br /> <br /> return banners<br /> end<br /> <br /> local function shieldSpec(route, mainShield)<br /> local shieldSpec = {}<br /> <br /> local shield<br /> if mainShield then shield = parser(route, &quot;shieldmain&quot;) end<br /> if not shield then shield = parser(route, &#039;shield&#039;) or &#039;&#039; end<br /> if shield == &#039;&#039; then return shieldSpec end<br /> local orientation = parser(route, &#039;orientation&#039;)<br /> <br /> local shieldsize = defaultShieldSize<br /> <br /> local banner = parser(route, &#039;banner&#039;) or {}<br /> local bannersize = defaultShieldSize<br /> local bannersuffix = parser(route, &#039;bannersuffix&#039;)<br /> <br /> local bannerIsNotTable = type(banner) ~= &quot;table&quot;<br /> local bannersizeIsNotTable = type(bannersize) ~= &quot;table&quot;<br /> local bannersuffixIsNotTable = type(bannersuffix) ~= &quot;table&quot;<br /> <br /> if type(shield) == &quot;table&quot; then<br /> for i,filename in ipairs(shield) do<br /> local size = shieldsize or shieldsize[i]<br /> if size == &quot;&quot; then size = nil end<br /> -- banner.all describes banners that apply to all multiple shields.<br /> local shieldBanner = bannerIsNotTable and banner or (banner[i] or banner.all or {})<br /> -- Banner size is default if the corresponding entry<br /> -- in bannerSize table is not set.<br /> local shieldBannerSize =<br /> bannersizeIsNotTable and bannersize<br /> or (bannersize[i] or bannersize.all or defaultShieldSize)<br /> local shieldBannerSuffix = bannersuffix and (bannersuffixIsNotTable and bannersuffix or bannersuffix[i])<br /> insert(shieldSpec, {<br /> shield = {filename, size},<br /> banners = bannerSpec(shieldBanner, shieldBannerSize, shieldBannerSuffix, route)<br /> })<br /> end<br /> elseif shield ~= &#039;&#039; then<br /> if shieldsize == &quot;&quot; then shieldsize = nil end<br /> insert(shieldSpec, {<br /> shield = {shield, shieldsize},<br /> banners = bannerSpec(banner, bannersize, bannersuffix, route)<br /> })<br /> end<br /> <br /> return shieldSpec<br /> end<br /> <br /> local missingShields<br /> <br /> local shieldExistsCache = {}<br /> <br /> -- Return up to two booleans.<br /> -- The first boolean is false if `shield` does not exist, and true otherwise.<br /> -- If the first boolean is true, the second boolean is true if the shield is<br /> -- landscape (width &gt;= height), and false otherwise.<br /> local function shieldExists(shield)<br /> local result = shieldExistsCache[shield]<br /> if result == nil then<br /> local file = mw.title.new(shield, &#039;Media&#039;).file<br /> -- Cache result.<br /> local exists = file.exists<br /> result = {exists}<br /> if exists then result[2] = file.width &gt;= file.height end<br /> shieldExistsCache[shield] = result<br /> end<br /> if result[1] then return true, result[2] end<br /> insert(missingShields, shield)<br /> return false<br /> end<br /> <br /> local function render(shieldEntry, scale, showLink)<br /> local shield = shieldEntry.shield<br /> local banners = shieldEntry.banners<br /> local exists, landscape = shieldExists(shield[1])<br /> if not exists then return &#039;&#039; end<br /> <br /> local size<br /> if shield[2] then<br /> local width, height = mw.ustring.match(shield[2], &quot;(%d*)x?(%d*)&quot;)<br /> width = tonumber(width)<br /> height = tonumber(height)<br /> local sizeparts = {}<br /> if width then<br /> insert(sizeparts, format(&quot;%d&quot;, width * scale))<br /> end<br /> if height then<br /> insert(sizeparts, format(&quot;x%d&quot;, height * scale))<br /> end<br /> size = concat(sizeparts)<br /> else<br /> size = format(&quot;%s%d&quot;, landscape and &quot;x&quot; or &quot;&quot;, defaultShieldSize * scale)<br /> end<br /> local link = showLink and &quot;&quot; or &quot;|link=&quot;<br /> local shieldCode = format(&quot;[[File:%s|%spx%s|%s]]&quot;, shield[1], size, link, shield[1])<br /> if not banners[1] then return shieldCode end<br /> <br /> for _,banner in ipairs(banners) do<br /> if shieldExists(banner[1]) then<br /> shieldCode = format(&quot;[[File:%s|%s%s|%s]]&lt;br&gt;%s&quot;,<br /> banner[1],<br /> banner[2],<br /> link,<br /> banner[1],<br /> shieldCode)<br /> end<br /> end<br /> return &#039;&lt;span style=&quot;display: inline-block; vertical-align: baseline; line-height: 0; text-align: center;&quot;&gt;&#039; .. shieldCode .. &#039;&lt;/span&gt;&#039;<br /> end<br /> <br /> function p.shield(route, scale, showLink, mainShield)<br /> missingShields = {}<br /> <br /> scale = 1<br /> <br /> local rendered = {}<br /> for _,entry in ipairs(shieldSpec(route, mainShield)) do<br /> insert(rendered, render(entry, scale, showLink))<br /> end<br /> return concat(rendered), missingShields<br /> end<br /> <br /> function p.link(route)<br /> local abbr, errMsg = parser(route, &#039;abbr&#039;)<br /> if not abbr then<br /> route.typeerror = true<br /> return util.err(errMsg or format(&quot;Invalid type: %s&quot;, route.type or &quot;(nil)&quot;))<br /> end<br /> if route.nolink then return abbr, abbr end<br /> <br /> local link = parser(route, &#039;link&#039;) or &#039;&#039;<br /> if link == &#039;&#039; then return abbr, abbr end<br /> <br /> return format(&quot;[[%s|%s]]&quot;, link, abbr), abbr<br /> end<br /> <br /> local function stateName(args)<br /> -- TODO transition<br /> local data = mw.loadData(statenameModuleName) <br /> local abbr = args.state or args.province<br /> local countryData = data[args.country]<br /> return countryData and countryData[abbr]<br /> end<br /> <br /> -- Links/abbreviations<br /> local function routeText(route, frame)<br /> local link<br /> local type = route.type<br /> if not type or type == &#039;&#039; then<br /> link = route.route<br /> else<br /> link = p.link(route)<br /> end<br /> <br /> local dir = route.dir and &#039; &#039; .. string.lower(route.dir) or &#039;&#039;<br /> local routeText = link .. dir<br /> <br /> local name = route.name<br /> if name and name ~= &#039;&#039; then<br /> local mainText = routeText<br /> local parenText = name<br /> <br /> return frame:expandTemplate{ title = &#039;BSsplit&#039;, args = {mainText, parenText, align = &#039;left&#039;, valign = &#039;middle&#039; } }<br /> else<br /> return routeText<br /> end<br /> end<br /> <br /> local function parseArgs(args)<br /> local state = args.state or args.province or &#039;&#039;<br /> args.state = state<br /> local country<br /> if args.country and args.country ~= &#039;&#039; then<br /> country = string.upper(args.country)<br /> else<br /> local countryModule = mw.loadData(&quot;Module:Road data/countrymask&quot;)<br /> country = countryModule[state] or &#039;UNK&#039;<br /> end<br /> args.country = country<br /> <br /> local params = {&#039;denom&#039;, &#039;county&#039;, &#039;township&#039;, &#039;dab&#039;, &#039;nolink&#039;, &#039;noshield&#039;, &#039;to&#039;, &#039;dir&#039;, &#039;name&#039;}<br /> local routes = {}<br /> local routeCount = 1<br /> local seenTo = false<br /> while true do<br /> local routeType = args[routeCount * 2 - 1]<br /> if not routeType then break end<br /> local route = {type = routeType, route = args[routeCount * 2]}<br /> for _,v in pairs(params) do<br /> route[v] = args[v .. routeCount]<br /> end<br /> route.country = country<br /> route.state = state<br /> <br /> -- Set the first .to to true.<br /> -- Set all following .to to &#039;&#039;.<br /> if seenTo then<br /> if route.to then<br /> -- Report duplicate to flag.<br /> route.toerror = true<br /> end<br /> route.to = &#039;&#039;<br /> elseif route.to then<br /> route.to = true<br /> seenTo = true<br /> end<br /> <br /> route.rdt = args.rdt<br /> insert(routes, route)<br /> routeCount = routeCount + 1<br /> end<br /> return routes<br /> end<br /> <br /> local function prefix(to, num)<br /> if to and to ~= &#039;&#039; then<br /> return num == 1 and &#039;To &#039; or &#039; to &#039;<br /> end<br /> return num == 1 and &#039;&#039; or &#039;&amp;nbsp;/ &#039;<br /> end<br /> <br /> function p._jctrdt(args, frame)<br /> local routes = parseArgs(args)<br /> local shields = {}<br /> local links = {}<br /> frame = frame or mw.getCurrentFrame()<br /> for num,route in ipairs(routes) do<br /> if not (args.noshield or route.noshield) then<br /> local shield = p.shield(route)<br /> insert(shields, shield)<br /> end<br /> local prefix = prefix(route.to, num)<br /> if prefix ~= &#039;&#039; then insert(links, prefix) end<br /> insert(links, routeText(route, frame))<br /> end<br /> local graphics = concat(shields) .. &#039; &#039;<br /> local linkText = concat(links)<br /> local cities = &#039;&#039;<br /> if args.city1 or args.location1 then<br /> local citiesPrefix<br /> if args.citiesprefix then<br /> citiesPrefix = args.citiesprefix ~= &#039;&#039; and format(&quot; %s &quot;, args.citiesprefix) or &#039;&#039;<br /> else<br /> citiesPrefix = &#039;&amp;nbsp;&#039;<br /> end<br /> local cityModule = require(cityModuleName)<br /> cities = citiesPrefix .. cityModule.city(args)<br /> end<br /> <br /> return graphics .. linkText .. cities<br /> end<br /> <br /> function p.jctrdt(frame)<br /> -- Import module function to work with passed arguments<br /> local getArgs = require(&#039;Module:Arguments&#039;).getArgs<br /> local args = getArgs(frame, {removeBlanks = false})<br /> return p._jctrdt(args, frame)<br /> end<br /> <br /> return p</div> Fredddie