更多操作
此模块的文档可以在模块:Unown/Utils/doc创建
local p = {}
function p.test() --p.getEditCounts()
local frame = mw.getCurrentFrame()
--local parent = frame:getParent()
local offset = nil
local namespace = nil
local userName = 'UnownHearn'
local namespaceID = nil
if namespace ~= nil then
namespaceID = mw.site.namespaces[namespace].id
end
while true do
local rawTitle = 'Contributions/' .. userName .. '?limit=500'
if namespaceID ~= nil then rawTitle = rawTitle .. '&namespace=' .. namespaceID end
if offset ~= nil then rawTitle = rawTitle .. '&offset=' .. offset end
local pageTitleObj = mw.title.new(rawTitle, Special)
local pageContent = pageTitleObj.getContent()
return '<nowiki>' .. pageContent .. '</nowiki>'
end
end
return p