https://de.wikipedia.org/w/index.php?action=history&feed=atom&title=Modul%3APageTitleSimilar Modul:PageTitleSimilar - Versionsgeschichte 2025-06-05T04:37:36Z Versionsgeschichte dieser Seite in Wikipedia MediaWiki 1.45.0-wmf.3 https://de.wikipedia.org/w/index.php?title=Modul:PageTitleSimilar&diff=253255778&oldid=prev PerfektesChaos: 2025-02-11 2025-02-12T12:47:31Z <p>2025-02-11</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="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 12. Februar 2025, 14:47 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 5:</td> <td colspan="2" class="diff-lineno">Zeile 5:</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>Check whether similar page name is existing</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>Check whether similar page name is existing</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>]==]</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>]==]</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;"><br /></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;"><br /></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>if mw.site.server:find( ".beta.wmflabs.org", 4, true ) then</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> require( "strict" )</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" 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;"><br /></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>local Failsafe = PageTitleSimilar</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 Failsafe = PageTitleSimilar</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 THIS = { }</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 THIS = { }</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 57:</td> <td colspan="2" class="diff-lineno">Zeile 51:</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> -- apply -- string, with message type</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> -- apply -- string, with message type</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> -- -- Typogr</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> -- -- Typogr</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> -- -- <del style="font-weight: bold; text-decoration: none;">eURL</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;">URL</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;"><div> -- THIS.title has been defined</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> -- THIS.title has been defined</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> -- Postcondition:</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> -- Postcondition:</div></td> </tr> </table> PerfektesChaos https://de.wikipedia.org/w/index.php?title=Modul:PageTitleSimilar&diff=253239396&oldid=prev TenWhile6: Schützte „Modul:PageTitleSimilar“: per request ([Bearbeiten=Nur Sichter] (unbeschränkt) [Verschieben=Nur Administratoren] (unbeschränkt)) 2025-02-11T23:36:13Z <p>Schützte „<a href="/wiki/Modul:PageTitleSimilar" title="Modul:PageTitleSimilar">Modul:PageTitleSimilar</a>“: per <a href="/wiki/Spezial:Permanenter_Link/253239317" title="Spezial:Permanenter Link/253239317">request</a> ([Bearbeiten=Nur Sichter] (unbeschränkt) [Verschieben=Nur Administratoren] (unbeschränkt))</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <tr class="diff-title" lang="de"> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Version vom 12. Februar 2025, 01:36 Uhr</td> </tr><tr><td colspan="2" class="diff-notice" lang="de"><div class="mw-diff-empty">(kein Unterschied)</div> </td></tr></table> TenWhile6 https://de.wikipedia.org/w/index.php?title=Modul:PageTitleSimilar&diff=253239204&oldid=prev PerfektesChaos: 2025-02-11 2025-02-11T23:23:30Z <p>2025-02-11</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="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 12. Februar 2025, 01:23 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 67:</td> <td colspan="2" class="diff-lineno">Zeile 67:</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 t = mw.title.new( shift )</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 t = mw.title.new( shift )</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 t and t.exists then</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 t and t.exists then</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 params = { <del style="font-weight: bold; text-decoration: none;">SEITE</del> = THIS.title.prefixedText }</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 params = { <ins style="font-weight: bold; text-decoration: none;">["1"]</ins> = THIS.title.prefixedText }</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> r = THIS.frame:expandTemplate{ title = t,</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> r = THIS.frame:expandTemplate{ title = t,</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> args = params }</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> args = params }</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 116:</td> <td colspan="2" class="diff-lineno">Zeile 116:</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 type( v[ 1 ] ) == "string" and</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 type( v[ 1 ] ) == "string" and</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> type( v[ 2 ] ) == "string" then</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> type( v[ 2 ] ) == "string" then</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> shift = <del style="font-weight: bold; text-decoration: none;">s:</del>gsub( v[ 1 ], v[ 2 ] )</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> shift = <ins style="font-weight: bold; text-decoration: none;">mw.ustring.</ins>gsub(<ins style="font-weight: bold; text-decoration: none;"> s,</ins> v[ 1 ], v[ 2 ] )</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 shift ~= s then</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 shift ~= s then</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 find( shift ) then</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 find( shift ) then</div></td> </tr> </table> PerfektesChaos https://de.wikipedia.org/w/index.php?title=Modul:PageTitleSimilar&diff=253238756&oldid=prev PerfektesChaos: Setup 2025-02-11T22:49:27Z <p>Setup</p> <p><b>Neue Seite</b></p><div>local PageTitleSimilar = { suite = &quot;PageTitleSimilar&quot;,<br /> serial = &quot;2025-02-11&quot;,<br /> item = 0 }<br /> --[==[<br /> Check whether similar page name is existing<br /> ]==]<br /> <br /> <br /> if mw.site.server:find( &quot;.beta.wmflabs.org&quot;, 4, true ) then<br /> require( &quot;strict&quot; )<br /> end<br /> <br /> local Failsafe = PageTitleSimilar<br /> local THIS = { }<br /> <br /> <br /> <br /> local fault = function ( alert )<br /> -- Format error message<br /> -- Precondition:<br /> -- alert -- string, with message<br /> -- Postcondition:<br /> -- Returns string<br /> local e = mw.html.create( &quot;span&quot; )<br /> :addClass( &quot;error&quot; )<br /> :wikitext( string.format( &quot;%s * %s&quot;,<br /> PageTitleSimilar.suite,<br /> alert ) )<br /> return tostring( e )<br /> end -- fault()<br /> <br /> <br /> <br /> local find = function ( ask )<br /> -- Check whether page title exists in this namespace<br /> -- Precondition:<br /> -- ask -- string, with page title<br /> -- Postcondition:<br /> -- Returns true, if existing<br /> -- THIS.title is the title of an existing page<br /> local t = mw.title.new( ask, THIS.ns )<br /> local r<br /> if t then<br /> r = t.exists<br /> if r then<br /> THIS.title = t<br /> end<br /> end<br /> return r<br /> end -- find()<br /> <br /> <br /> <br /> local found = function ( apply )<br /> -- Communicate match by transclusion<br /> -- Precondition:<br /> -- apply -- string, with message type<br /> -- -- Typogr<br /> -- -- eURL<br /> -- THIS.title has been defined<br /> -- Postcondition:<br /> -- Returns string<br /> local source = &quot;source&quot; .. apply<br /> local shift = THIS.JSON[ source ]<br /> local r<br /> if type( shift ) == &quot;string&quot; then<br /> local t = mw.title.new( shift )<br /> if t and t.exists then<br /> local params = { SEITE = THIS.title.prefixedText }<br /> r = THIS.frame:expandTemplate{ title = t,<br /> args = params }<br /> end<br /> end<br /> if not r then<br /> r = fault( &quot;missing transclusion for &quot; .. source )<br /> end<br /> return r<br /> end -- found()<br /> <br /> <br /> <br /> local fraction = function ()<br /> -- Try URL completion when common special chars were truncated<br /> -- Postcondition:<br /> -- Returns string, or not<br /> local s = THIS.self<br /> local r<br /> if s:find( &quot;(&quot;, 1, true ) then<br /> find( s .. &quot;)&quot; )<br /> end<br /> if not THIS.title then<br /> local shift = s .. &quot;.&quot;<br /> if not find( shift ) then<br /> shift = s .. &quot;?&quot;<br /> find( shift )<br /> end<br /> end<br /> if THIS.title then<br /> r = found( &quot;URL&quot; )<br /> end<br /> return r<br /> end -- fraction()<br /> <br /> <br /> <br /> local further = function ()<br /> -- Try improvements by typographical chars<br /> -- Postcondition:<br /> -- Returns string, or not<br /> local rep = THIS.JSON.replace<br /> local r<br /> if type( rep ) == &quot;table&quot; then<br /> local s = THIS.self<br /> local shift<br /> for k, v in pairs( rep ) do<br /> if type( v[ 1 ] ) == &quot;string&quot; and<br /> type( v[ 2 ] ) == &quot;string&quot; then<br /> shift = s:gsub( v[ 1 ], v[ 2 ] )<br /> if shift ~= s then<br /> if find( shift ) then<br /> r = found( &quot;Typogr&quot; )<br /> break -- for k, v<br /> else<br /> s = shift<br /> end<br /> end<br /> else<br /> r = fault( string.format( &quot;replace&amp;#91;%s&amp;#93;&quot;, k ) )<br /> break -- for k, v<br /> end<br /> end -- for k, v<br /> end<br /> return r<br /> end -- further()<br /> <br /> <br /> <br /> Failsafe.failsafe = function ( atleast )<br /> -- Retrieve versioning and check for compliance<br /> -- Precondition:<br /> -- atleast -- string, with required version<br /> -- or wikidata|item|~|@ or false<br /> -- Postcondition:<br /> -- Returns string -- with queried version/item, also if problem<br /> -- false -- if appropriate<br /> -- 2024-03-01<br /> local since = atleast<br /> local last = ( since == &quot;~&quot; )<br /> local linked = ( since == &quot;@&quot; )<br /> local link = ( since == &quot;item&quot; )<br /> local r<br /> if last or link or linked or since == &quot;wikidata&quot; then<br /> local item = Failsafe.item<br /> since = false<br /> if type( item ) == &quot;number&quot; and item &gt; 0 then<br /> local suited = string.format( &quot;Q%d&quot;, item )<br /> if link then<br /> r = suited<br /> else<br /> local entity = mw.wikibase.getEntity( suited )<br /> if type( entity ) == &quot;table&quot; then<br /> local seek = Failsafe.serialProperty or &quot;P348&quot;<br /> local vsn = entity:formatPropertyValues( seek )<br /> if type( vsn ) == &quot;table&quot; and<br /> type( vsn.value ) == &quot;string&quot; and<br /> vsn.value ~= &quot;&quot; then<br /> if last and vsn.value == Failsafe.serial then<br /> r = false<br /> elseif linked then<br /> if mw.title.getCurrentTitle().prefixedText<br /> == mw.wikibase.getSitelink( suited ) then<br /> r = false<br /> else<br /> r = suited<br /> end<br /> else<br /> r = vsn.value<br /> end<br /> end<br /> end<br /> end<br /> elseif link then<br /> r = false<br /> end<br /> end<br /> if type( r ) == &quot;nil&quot; then<br /> if not since or since &lt;= Failsafe.serial then<br /> r = Failsafe.serial<br /> else<br /> r = false<br /> end<br /> end<br /> return r<br /> end -- Failsafe.failsafe()<br /> <br /> <br /> <br /> -- Export<br /> local p = { }<br /> <br /> p.f = function ( frame )<br /> local source = frame.args[ 1 ]<br /> local r, scream<br /> if source then<br /> local lucky<br /> lucky, THIS.JSON = pcall( mw.loadJsonData, source )<br /> if lucky then<br /> local t = mw.title.getCurrentTitle()<br /> THIS.frame = frame<br /> THIS.ns = t.ns<br /> THIS.self = t.prefixedText<br /> if frame.args.URL == &quot;1&quot; then<br /> r = fraction()<br /> end<br /> if not r then<br /> r = further()<br /> end<br /> else<br /> scream = &quot;no valid JSON found: &quot; .. mw.text.nowiki( source )<br /> end<br /> else<br /> scream = &quot;invoked without JSON&quot;<br /> end<br /> if scream then<br /> r = fault( scream )<br /> end<br /> return r or &quot;&quot;<br /> end -- p.f<br /> <br /> <br /> <br /> p.failsafe = function ( frame )<br /> -- Versioning interface<br /> local s = type( frame )<br /> local since<br /> if s == &quot;table&quot; then<br /> since = frame.args[ 1 ]<br /> elseif s == &quot;string&quot; then<br /> since = frame<br /> end<br /> if since then<br /> since = mw.text.trim( since )<br /> if since == &quot;&quot; then<br /> since = false<br /> end<br /> end<br /> return Failsafe.failsafe( since ) or &quot;&quot;<br /> end -- p.failsafe<br /> <br /> return p</div> PerfektesChaos