Module:Vital article: Difference between revisions

Content deleted Content added
m Changed protection settings for "Module:Vital article": low usage ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed access] (indefinite))
fix for words like 'infinity' which were recognised by tonumber
Line 15:
end
local data_page = 'Wikipedia:Vital articles/data/' .. subpage .. '.json'
local page2 = tostring(tonumber(page))==page and tonumber(page) or page --convert to number if page is numerical, otherwise loadJsonData does not work
local data = mw.loadJsonData(data_page)[page2]
if data then