模組:No ping

文出維基大典
跳至導覽 跳至搜尋

此模組的說明文件可於模組:No ping/doc建立

-- This module implements {{noping}}.

local p = {}

function p.main(frame)
	local args = frame:getParent().args
	return p._main(args)
end

function p._main(args)
	local ret = {}
	local fullUrl = mw.uri.fullUrl
	local format = string.format
	for i, username in ipairs(args) do
		ret[#ret + 1] = format('[[%s:%s]]', mw.site.namespaces.User.name, username)
		if #ret >= 50 then
			break
		end
	end
	ret = mw.text.listToText(ret)
	ret = '<span style="display:none">' .. ret .. '</span>'
	return ret
end

return p