Content deleted Content added
debug |
debug |
||
Line 3:
local function ifblank(v, alt) return notblank(v) and v or alt end
local function red(v) return '<span style="color: red;">' .. v .. '</span>' end
local function getContent(page) return
local function diffDays(dargs)
return require('Module:diff days')['diff_days'](
Line 53:
function p._nthView(page, number) -- {{xviews/nth view}}
local views =
return Text.split(views, ',', true)[tonumber(number)]
end
Line 64:
function p._viewCount(page) -- {{xviews/view count}}
local str =
str =
-- Remove leading and trailing delimiters (along with any surrounding whitespace)
str = str:gsub("^%s*,%s*", ""):gsub("%s*,%s*$", "")
Line 157:
function p._xlabel(date, bold01) -- {{xviews/xlabel}}
replace = ((date:sub(-3) == '-01') and notblank(bold01)) and "'''%1'''" or "%1"
return
end
function p.xlabel(frame)
Line 165:
function p._maxViews(page) -- {{xviews/max views}}
local views = 0
for v in Text.gsplit(content, ',', true) do
v = tonumber(v)
if (v and v > views) then views = v end
|