无编辑摘要 标签:已被回退 |
无编辑摘要 标签:已被回退 |
||
第16行: | 第16行: | ||
local edits = mw.site.stats.edits |
local edits = mw.site.stats.edits |
||
return edits |
|||
local title = randoms[edits % randoms.length + 1] |
-- local title = randoms[edits % randoms.length + 1] |
||
-- return title |
-- return title |
||
return frame:expandTemplate {title = title} |
-- return frame:expandTemplate {title = title} |
||
end |
end |
||
return p |
return p |
2024年4月18日 (四) 10:32的版本
local randoms = mw.loadData 'Module:Featured picture list/randoms'
local dates = mw.loadData 'Module:Featured picture list/dates'
local p = {}
function p.main(frame)
local lang = mw.language.getContentLanguage()
local year = lang:formatDate('Y', nil, true)
local month = lang:formatDate('n', nil, true)
local day = lang:formatDate('j', nil, true)
if dates[year] and dates[year][month] and dates[year][month][day] then
return frame:preprocess(dates[year][month][day])
elseif dates['any'] and dates['any'][month] and dates['any'][month][day] then
return frame:preprocess(dates['any'][month][day])
end
local edits = mw.site.stats.edits
return edits
-- local title = randoms[edits % randoms.length + 1]
-- return title
-- return frame:expandTemplate {title = title}
end
return p