Jump to content

Module:Edit summary

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Codemini (talk | contribs) at 16:06, 2 June 2025 (created new module). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

local p = {}
function p.main(frame)
args = frame.args
date = args.date or os.date('%d %B %Y')
time = args.time or ''
username = args.username
user = '[[User:' .. username .. '|]] ([[User talk:' .. username .. '|talk]] | [[Special:Contribs/' .. username .. '|contribs]])'
bytes = ''
if args.byte then
bytes = '('..args.byte..' byte)'
elseif args.bytes then
bytes = '('..args.bytes..' bytes)'
else
bytes = ''
end
add = ''
if args.added or args.plus then
add = '<span style="color: green;">(+ '..args.added..')</span>'
end
remove = ''
if args.removed or args.minus then
remove = '<span style="color: red;">(&rarr; '..args.removed..')</span>'
end
text = '('..args.text..')'
minor = ''
if args.minor then
minor = 'm . . '
else minor = ''
end
page = args.pagename
return '' .. date .. '<br>* &nbsp;(' .. time .. ', ' .. date .. '  ' .. user ..' . . ' .. bytes .. ' ' .. add .. '' .. remove .. ' . . ' .. minor .. '' .. page .. '' .. text .. ''
end
return p