跳转到内容

模組:Spam-whitelist request

本页使用了标题或全文手工转换
维基百科,自由的百科全书

这是Module:Spam-whitelist request当前版本,由Xiplus留言 | 贡献编辑于2024年6月1日 (六) 11:42 (+abusefilterblockeddomainhit)。这个网址是本页该版本的固定链接。

(差异) ←上一修订 | 最后版本 (差异) | 下一修订→ (差异)

local p = {}

local error = require('Module:Error')

function p.main(frame)
	local args = frame:getParent().args
	
	local argurl = args["網址"] or ""
	local text = {}
	local url = nil
	local host = ""
	
	table.insert(text, "== 申請解除對")
	
	if argurl ~= "" then
		url = mw.uri.new(argurl)
		if url.host == nil then
			url = mw.uri.new("//" .. argurl)
		end
		table.insert(text, url.host)
	else
		table.insert(text, "未給網址")
	end
	
	table.insert(text, "的限制 ==")
	table.insert(text, "\n{{Editprotected")
	table.insert(text, "}}\n* 網址:")
	if url ~= nil then
		table.insert(text, url.host .. url.relativePath .. "")
	else
		table.insert(text, error.error{[1] = "錯誤:沒有提供網址!"})
	end
	
	table.insert(text, "\n* 工具:")
	table.insert(text, string.format("[[Special:Log/spamblacklist/%s|垃圾連結黑名單日誌]]、[[Special:Log/abusefilterblockeddomainhit/%s|封鎖網域觸發日誌]]、[https://searchsbl.toolforge.org/?userdeflang=zh&userdefproj=w&url=%s searchsbl]",
		frame:preprocess('{{subst:REVISIONUSER}}'),
		frame:preprocess('{{subst:REVISIONUSER}}'),
		(url and mw.uri.encode(url.host .. url.relativePath)) or ""
	))

	table.insert(text, "\n理由:" .. (args["理由"] or ""))
	
	return table.concat(text)
end

return p