Home
Random
Log in
Settings
About Real-Life Villains
Disclaimers
Real-Life Villains
Search
Editing
Module:Sock list
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local p = {} local getArgs = require('Module:Arguments').getArgs local isIpOrRange = require('Module:IPAddress')._isIpOrRange local yesno = require('Module:Yesno') function p.main(frame) local args = getArgs(frame) return p._main(frame, args) end function listEntry(frame, args, sockNum, sock) local template = (isIpOrRange(sock) ~= "") and (args.IP_template or args.template or 'checkip') or (args.account_template or args.template or 'checkuser') local li = mw.html.create('li') local text = frame:expandTemplate{title=template, args={sock, ['master name']=args.master}} if args['strike' .. sockNum] then text = "<s>" .. text .. "</s>" end local note = args['note' .. sockNum] if note then text = text .. " " .. note end li:wikitext(text) return li end function toolEIA(args) local url = "https://tools.wmflabs.org/sigma/editorinteract.py?users=" .. mw.uri.encode(args.master or "") for i, sock in ipairs(args) do if not args['strike' .. i] then url = url .. "&users=" .. mw.uri.encode(sock) end end return "[" .. url .. " Editor interaction utility]" end function toolTimeline(args) local url = "https://tools.wmflabs.org/interaction-timeline?wiki=enwiki&user=" .. mw.uri.encode(args.master or "") .. "&user=" .. mw.uri.encode(args[1] or "") return "[" .. url .. " Interaction Timeline]" end function toolCompare(args) local url = "https://tools.wmflabs.org/betacommand-dev/UserCompare/" .. mw.uri.encode(args.master or "") return "[" .. url .. " User compare report]" end function p._main(frame, args) local socklist = mw.html.create('ul') if yesno(args.hidden) then socklist:attr('style', 'display:none;') end if args[1] then for sockNum, sock in ipairs(args) do if args.master ~= sock or not yesno(args.remove_master or 'no') then socklist:node(listEntry(frame, args, sockNum, sock)) end end end if yesno(args.tools_link) then local tools = mw.html.create('li') tools :attr('class', 'plainlinks') :wikitext("<b>Tools</b>: ") :node(toolEIA(args)) :wikitext(" β’ ") :node(toolTimeline(args)) :wikitext(" β’ ") :node(toolCompare(args)) :wikitext(" <small>''Auto-generated every hour.''</small>") socklist:node(tools) end return socklist end return p
Summary:
Please note that all contributions to Real-Life Villains may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Real-Life Villains:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Sandbox other
(
edit
)
Template:Template link
(
edit
)
Template:Tl
(
edit
)
Module:Sock list/doc
(
edit
)