Module:Twemoji
Jump to navigation
Jump to search
Documentation for this module may be created at Module:Twemoji/doc
local p= {}
function p.emoji(emojidata)
local bl = mw.loadData ('Module:Twemoji/data').bl
local name = mw.text.trim(emojidata.args[1] or "") -- make sure empty and missing parameters both become the empty string
if '' == name then name = 'skull' end -- the i forgor skull is the best emoji so we default to that one of course
return '<span title="Emoji by Twemoji, from Twitter, licensed under CC-BY 4.0" style="z-index:1;"><span style="pointer-events:none;">[[File:' .. bl[name] .. '|frameless|22px|link=]]</span></span>' or '<span title="Emoji by Twemoji, from Twitter, licensed under CC-BY 4.0" style="z-index:1;"><span style="pointer-events:none;">[[File:' .. name .. '|frameless|22px|link=]]</span></span>'
end
return p