Module:LoadData and Module:LoadData/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
MusikBot II (talk | contribs) m Protected "Module:LoadData": High-risk template or module: 398 transclusions (more info) ([Edit=Require autoconfirmed or confirmed access] (indefinite)) | Create sandbox version of Module:LoadData | ||
| Line 55: | Line 55: | ||
__index = function(t, k) | __index = function(t, k) | ||
return function(frame) | return function(frame) | ||
if k:sub(-5) == '.json' then | |||
| ⚫ | |||
return load(mw.text.jsonDecode(mw.title.new(k).getContent()), frame) | |||
| ⚫ | |||
else | |||
| ⚫ | |||
end | |||
| ⚫ | |||
end | end | ||
}) | }) | ||