Modul:Wikidata Infobox: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
←Membuat halaman berisi ' local p = {} local WikidataIB = require("Module:WikidataIB") -- Code from 'Module:No globals' local mt = getmetatable(_G) or {} function mt.__index (t, k) if k ~= '...'
 
Taylor 49 (bicara | kontrib)
-require('Module:No globals')
 
Baris 1:
 
local p = {}
local WikidataIB = require("Module:WikidataIB")
require('strict')
 
-- Code from 'Module:No globals'
local mt = getmetatable(_G) or {}
function mt.__index (t, k)
if k ~= 'arg' then
error('Tried to read nil global ' .. tostring(k), 2)
end
return nil
end
function mt.__newindex(t, k, v)
if k ~= 'arg' then
error('Tried to write global ' .. tostring(k), 2)
end
rawset(t, k, v)
end
setmetatable(_G, mt)
-- End of code from 'Module:No globals'
 
function p.getMID()
return "M" .. mw.title.getCurrentTitle().id