https://nordiclarp.org/w/index.php?title=Module:Toolbar&feed=atom&action=history
Module:Toolbar - Revision history
2024-03-28T15:09:33Z
Revision history for this page on the wiki
MediaWiki 1.34.2
https://nordiclarp.org/w/index.php?title=Module:Toolbar&diff=9197&oldid=prev
Johannes Axner: 1 revision imported
2018-12-29T18:23:04Z
<p>1 revision imported</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">Revision as of 18:23, 29 December 2018</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Johannes Axner
https://nordiclarp.org/w/index.php?title=Module:Toolbar&diff=9196&oldid=prev
en>Ahecht: automatically fix double-leading-colon errors (which are present in many signatures that use this template per Special:LintErrors/multi-colon-escape)
2017-10-09T16:15:03Z
<p>automatically fix double-leading-colon errors (which are present in many signatures that use this template per <a href="/wiki/Special:LintErrors/multi-colon-escape" title="Special:LintErrors/multi-colon-escape">Special:LintErrors/multi-colon-escape</a>)</p>
<p><b>New page</b></p><div>-- This module implements {{toolbar}}.<br />
<br />
local mArguments -- Lazily initialise [[Module:Arguments]]<br />
local mTableTools = require('Module:TableTools')<br />
local yesno = require('Module:Yesno')<br />
<br />
local p = {}<br />
<br />
function p.main(frame)<br />
mArguments = require('Module:Arguments')<br />
local args = mArguments.getArgs(frame)<br />
return p._main(args)<br />
end<br />
<br />
function p._main(args)<br />
local toolbarItems = p.makeToolbarItems(args)<br />
if not toolbarItems then<br />
-- Return the blank string if no arguments were specified, rather than<br />
-- returning empty brackets.<br />
return ''<br />
elseif yesno(args.span) == false then<br />
return string.format(<br />
'(%s)',<br />
toolbarItems<br />
)<br />
else<br />
return string.format(<br />
'<span class="plainlinks%s"%s>(%s)</span>',<br />
type(args.class) == 'string' and ' ' .. args.class or '',<br />
type(args.style) == 'string' and string.format(' style="%s"', args.style) or '',<br />
toolbarItems<br />
)<br />
end<br />
end<br />
<br />
function p.makeToolbarItems(args)<br />
local nums = mTableTools.numKeys(args)<br />
local sep = (args.separator or 'pipe') .. '-separator'<br />
sep = mw.message.new(sep):plain()<br />
local ret = {}<br />
for i, v in ipairs(nums) do<br />
ret[#ret + 1] = mw.ustring.gsub(args[v], "%[%[::+(.-)%]%]", "[[:%1]]")<br />
end<br />
if #ret > 0 then<br />
return table.concat(ret, sep)<br />
else<br />
return nil<br />
end<br />
end<br />
<br />
return p</div>
en>Ahecht