Module:User contrib/sandbox: Difference between revisions

Content deleted Content added
test count=1 edge case
sync
 
(One intermediate revision by the same user not shown)
Line 31:
count = tonumber(count)
formated_count = mw.getContentLanguage():formatNum( count )
if count == 1 then plural = '' end
-- 0-9,999 is shades of green
elseifif count < 1000 then id_fc = '#000000'; id_c = '#dddddd'; info_fc = '#000000'; info_c = '#eeeeee'
if count == 1 then plural = ''
elseif count < 1000 then id_fc = '#000000'; id_c = '#dddddd'; info_fc = '#000000'; info_c = '#eeeeee'
elseif count < 2000 then id_fc = '#FFFFFF'; id_c = '#347235'; info_fc = '#000000'; info_c = '#728C00'
elseif count < 3000 then id_fc = '#FFFFFF'; id_c = '#6AA121'; info_fc = '#000000'; info_c = '#52D017'
Line 113:
local user = 'user'
local username = args[2] or mw.title.getCurrentTitle().baseText
local url = args['url'] or args['link'] or 'https://xtools.wmflabs.org/ec/'.. project_site .. '?username=' ..urlencode(username)
local url = ''
if args['url'] then
url = args['url']
elseif args['link'] then
url = args['link']
else
url = 'https://xtools.wmflabs.org/ec/'.. project_site .. '?username=' ..urlencode(username)
end
local deleted, articles, automated, distinct, unique, images, insane = '','','', '', '', '', ''