|
|
| (未显示同一用户的3个中间版本) |
| 第1行: |
第1行: |
| local p = {} | | local p = {} |
|
| |
|
| function p.test() --p.getEditCounts()
| | -- 原来用户奉献页面不能被 Transclusion 啊… |
| 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 | | return p |