Anonymous user
Module:UserLinks: Difference between revisions
Add nuke
Richardpruen (talk | contribs) m (1 revision imported) |
imported>Trialpears (Add nuke) |
||
Line 58: | Line 58: | ||
snippets.username | snippets.username | ||
) | ) | ||
end | |||
function linkFunctions.np(snippets) | |||
-- User page (no ping) | |||
return '<span class="plainlinks">' .. makeFullUrlLink( | |||
snippets.interwiki, | |||
2, | |||
snippets.username, | |||
'', | |||
snippets.username | |||
) .. '</span>' | |||
end | end | ||
Line 337: | Line 348: | ||
'ListFiles/' .. snippets.username, | 'ListFiles/' .. snippets.username, | ||
message('display-uploads') | message('display-uploads') | ||
) | |||
end | |||
function linkFunctions.nuke(snippets) | |||
-- Mass delete/Special:Nuke | |||
return makeWikilink( | |||
snippets.interwiki, | |||
-1, | |||
'Nuke/' .. snippets.username, | |||
message('display-nuke') | |||
) | ) | ||
end | end | ||
Line 698: | Line 720: | ||
local options = {} | local options = {} | ||
options.isDemo = yesno(args.demo) or false | options.isDemo = yesno(args.demo) or false | ||
options.noPing = yesno(args.noPing) or yesno(args.noping) or yesno(args.np) or false | |||
options.toolbarStyle = yesno(args.small) and 'font-size: 90%;' or nil | options.toolbarStyle = yesno(args.small) and 'font-size: 90%;' or nil | ||
options.sup = yesno(args.sup, true) | options.sup = yesno(args.sup, true) | ||
Line 723: | Line 746: | ||
function p.export(codes, links, options) | function p.export(codes, links, options) | ||
-- Make the user link. | -- Make the user link. | ||
local userLink = links.u | local userLink = options.noPing and links.np or links.u | ||
-- If we weren't passed any link codes, just return the user link. | -- If we weren't passed any link codes, just return the user link. |