Content deleted Content added
m call mw.getCurrentFrame properly |
wrap pcall to make it easier to use, seeing as we will probably be calling it multiple times and we don't need the error messages |
||
Line 5:
local function makeCategory(s)
return string.format('[[Category:%s]]', s)
local function quickPcall(func)
local success, result = pcall(func)
return result
end
end
local fetchWikidataUrl
fetchWikidataUrl = function()
local
return mw.wikibase.getEntityObject().claims.P856[1].mainsnak.datavalue.value
end)
▲ if not success then
▲ end
fetchWikidataUrl = function ()
return url
|