Content deleted Content added
return level |
fix bug when page is a number |
||
Line 15:
end
local data_page = 'Wikipedia:Vital articles/data/' .. subpage .. '.json'
local page2 = tonumber(page) or page --convert to number if page is numerical, otherwise loadJsonData does not work
local data = mw.loadJsonData(data_page)[
if data then
local level = tostring(data.level)
Line 31 ⟶ 32:
link = link .. '/' .. data.sublist
end
end
return link, level
|