Jump to content

Module:AWBVersions: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
iv
dev
Line 7: Line 7:
local output = ''
local output = ''
for i, v in ipairs(decoded.enabledversions) do
for i, v in ipairs(decoded.enabledversions) do
output = output .. '* ' .. v.version .. '<br />'
output = output .. '* ' .. v.version
if v.dev then
output = output .. ' (svn)'
end
output = output .. '<br />'
end
end

Revision as of 02:49, 17 September 2018

local p = {}

function p.main( frame )
    local version = mw.title.makeTitle( 'Wikipedia', 'AutoWikiBrowser/CheckPage/VersionJSON' )
    
    local decoded = mw.text.jsonDecode( version:getContent() )
    local output = ''
    for i, v in ipairs(decoded.enabledversions) do
    	output = output .. '* ' .. v.version
    	if v.dev then
    		output = output .. ' (svn)'
    	end
    	output = output .. '<br />'
    end
    
    return output
end

return p