Module:RfX tally: Difference between revisions
Appearance
Content deleted Content added
←Created page with 'local p = {} local rfx = require("Module:Rfx") function p.main(frame) local title = mw.text.trim(frame.args[1]) local obj if title == nil or #title == 0 then obj = rfx.new(mw.title.getCurrentTitle()) else obj = rfx.new("Wikipedia:Requests for bueraucratship/" .. title) if obj == nil then obj = rfx.new("Wikipedia:Requests for adminship/" .. title) end end if obj == nil then return "(?/?/?)" else return string.format("(%s/%s/%s)",obj.su...' |
No edit summary |
||
Line 7: | Line 7: | ||
obj = rfx.new(mw.title.getCurrentTitle()) |
obj = rfx.new(mw.title.getCurrentTitle()) |
||
else |
else |
||
obj = rfx.new("Wikipedia:Requests for |
obj = rfx.new("Wikipedia:Requests for bureaucratship/" .. title) |
||
if obj == nil then |
if obj == nil then |
||
obj = rfx.new("Wikipedia:Requests for adminship/" .. title) |
obj = rfx.new("Wikipedia:Requests for adminship/" .. title) |
Revision as of 19:20, 3 July 2021
local p = {}
local rfx = require("Module:Rfx")
function p.main(frame)
local title = mw.text.trim(frame.args[1])
local obj
if title == nil or #title == 0 then
obj = rfx.new(mw.title.getCurrentTitle())
else
obj = rfx.new("Wikipedia:Requests for bureaucratship/" .. title)
if obj == nil then
obj = rfx.new("Wikipedia:Requests for adminship/" .. title)
end
end
if obj == nil then
return "(?/?/?)"
else
return string.format("(%s/%s/%s)",obj.supports,obj.opposes,obj.neutrals)
end
end
return p