More languages
More actions
function splitLines(text)
local lines = {}
for line in text:gmatch("[^\r\n]+") do
table.insert(lines, line)
end
return lines
end
local p = {}
function p.Sitename(frame)
local extDataTable = mw.ext.externalData.getExternalData(frame.args[1])[1]["__text"]
local lines = splitLines(extDataTable)
-- first check for matching "og:site_name"
-- match("content=\"(%a+)\"") needs to be somewhere
end
return p