Module:AWBVersions: Difference between revisions

Content deleted Content added
Try outputting something useful
Use mw.loadJsonData()
 
(8 intermediate revisions by one other user not shown)
Line 2:
 
function p.main( frame )
local versiondecoded = mw.title.makeTitleloadJsonData( 'Wikipedia', ':AutoWikiBrowser/CheckPage/VersionJSON' )
local output = ''
for i, v in ipairs(decoded.enabledversions) do
output = output .. '* ' .. v.version
if v.dev then
output = output .. ' (svn)'
end
output = output .. '\n'
end
local decoded = mw.text.jsonDecode( version:getContent() )
local output = "Current Version: " .. decoded.currentversion .. "\n"
output = output .. "Newest Version: " .. decoded.newestversion .. "\n"
return output
end