<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://wiki.undertensai.cn/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=122.100.88.89</id>
	<title>天灾之下：危险连接资料站 - 用户贡献 [zh-cn]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.undertensai.cn/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=122.100.88.89"/>
	<link rel="alternate" type="text/html" href="https://wiki.undertensai.cn/%E7%89%B9%E6%AE%8A:%E7%94%A8%E6%88%B7%E8%B4%A1%E7%8C%AE/122.100.88.89"/>
	<updated>2026-11-17T07:19:14Z</updated>
	<subtitle>用户贡献</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.undertensai.cn/index.php?title=%E6%A8%A1%E5%9D%97:NoteTA&amp;diff=27736</id>
		<title>模块:NoteTA</title>
		<link rel="alternate" type="text/html" href="https://wiki.undertensai.cn/index.php?title=%E6%A8%A1%E5%9D%97:NoteTA&amp;diff=27736"/>
		<updated>2024-02-25T18:01:55Z</updated>

		<summary type="html">&lt;p&gt;122.100.88.89：​Add tracking category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local z = {}&lt;br /&gt;
local WikitextLC = require( &#039;Module:WikitextLC&#039; )&lt;br /&gt;
&lt;br /&gt;
function Tcode( args )&lt;br /&gt;
	if args.T == nil or args.T == &#039;&#039; then&lt;br /&gt;
		return &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
	local div = mw.html.create( &#039;div&#039; )&lt;br /&gt;
		:attr( &#039;class&#039;, &#039;noteTA-title&#039; )&lt;br /&gt;
		:attr( &#039;data-noteta-code&#039;, args.T )&lt;br /&gt;
		:wikitext( WikitextLC.title( args.T ) )&lt;br /&gt;
	if args.dt ~= nil and args.dt ~= &#039;&#039; then&lt;br /&gt;
		div:attr( &#039;data-noteta-desc&#039;, args.dt )&lt;br /&gt;
	end&lt;br /&gt;
	return tostring( div )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function group( name, frame )&lt;br /&gt;
	if name == nil or name == &#039;&#039; then&lt;br /&gt;
		return &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
	local moduleTitle = mw.title.makeTitle( &#039;Module&#039;, &#039;CGroup/&#039; .. name )&lt;br /&gt;
	if moduleTitle and moduleTitle.exists then&lt;br /&gt;
		local data = require( &#039;Module:CGroup/&#039; .. name )&lt;br /&gt;
		local pieces = {}&lt;br /&gt;
		if data.content then&lt;br /&gt;
			for i, v in ipairs( data.content ) do&lt;br /&gt;
				if v.type == &#039;item&#039; and v.rule then&lt;br /&gt;
					table.insert( pieces, &#039;-{H|&#039; .. v.rule .. &#039;}-&#039; )&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			return tostring( mw.html.create( &#039;div&#039; )&lt;br /&gt;
				:attr( &#039;data-noteta-group-source&#039;, &#039;module&#039; )&lt;br /&gt;
				:attr( &#039;data-noteta-group&#039;, data.name or name )&lt;br /&gt;
				:wikitext( table.concat( pieces ) ) )&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local templateTitle = mw.title.makeTitle( &#039;Template&#039;, &#039;CGroup/&#039; .. name )&lt;br /&gt;
	if templateTitle and templateTitle.exists then&lt;br /&gt;
		return frame:expandTemplate{ title = templateTitle }&lt;br /&gt;
	end&lt;br /&gt;
	return tostring( mw.html.create( &#039;div&#039; )&lt;br /&gt;
			-- :attr( &#039;id&#039;, &#039;noteTA-group-&#039; .. mw.uri.anchorEncode( name ) )&lt;br /&gt;
			:attr( &#039;data-noteta-group-source&#039;, &#039;none&#039; )&lt;br /&gt;
			:attr( &#039;data-noteta-group&#039;, name ) )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Gcode( args, frame )&lt;br /&gt;
	local code = {}&lt;br /&gt;
	for i = 1, 30 do&lt;br /&gt;
		table.insert( code, group( args[&#039;G&#039; .. i], frame ) )&lt;br /&gt;
	end&lt;br /&gt;
	code = table.concat( code )&lt;br /&gt;
	if code ~= &#039;&#039; then&lt;br /&gt;
		code = tostring( mw.html.create( &#039;div&#039; )&lt;br /&gt;
				:attr( &#039;class&#039;, &#039;noteTA-group&#039; )&lt;br /&gt;
				:wikitext( code ) )&lt;br /&gt;
	end&lt;br /&gt;
	return code&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function local_( i, code, desc )&lt;br /&gt;
	if code == nil or code == &#039;&#039; then&lt;br /&gt;
		return &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
	local div = mw.html.create( &#039;div&#039; )&lt;br /&gt;
		-- :attr( &#039;id&#039;, &#039;noteTA-local-&#039; .. i )&lt;br /&gt;
		:attr( &#039;data-noteta-code&#039;, code )&lt;br /&gt;
		:wikitext( WikitextLC.hidden( code ) )&lt;br /&gt;
	if desc ~= nil and desc ~= &#039;&#039; then&lt;br /&gt;
		div:attr( &#039;data-noteta-desc&#039;, desc )&lt;br /&gt;
	end&lt;br /&gt;
	return tostring( div )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Lcode( args )&lt;br /&gt;
	local code = {}&lt;br /&gt;
	for i = 1, 30 do&lt;br /&gt;
		table.insert( code, local_( i, args[i], args[&#039;d&#039; .. i] ) )&lt;br /&gt;
	end&lt;br /&gt;
	code = table.concat( code )&lt;br /&gt;
	if code ~= &#039;&#039; then&lt;br /&gt;
		code = tostring( mw.html.create( &#039;div&#039; )&lt;br /&gt;
				:attr( &#039;class&#039;, &#039;noteTA-local&#039; )&lt;br /&gt;
				:wikitext( code ) )&lt;br /&gt;
	end&lt;br /&gt;
	return code&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function z.main( frame )&lt;br /&gt;
	local args&lt;br /&gt;
	if frame == mw.getCurrentFrame() then&lt;br /&gt;
		-- Being called from {{noteTA}}&lt;br /&gt;
		args = frame:getParent().args&lt;br /&gt;
	else&lt;br /&gt;
		-- Being called from another module&lt;br /&gt;
		args = frame&lt;br /&gt;
		frame = mw.getCurrentFrame()&lt;br /&gt;
	end&lt;br /&gt;
	local Tc = Tcode( args )&lt;br /&gt;
	local Gc = Gcode( args, frame )&lt;br /&gt;
	local Lc = Lcode( args )&lt;br /&gt;
	local code = Tc .. Gc .. Lc&lt;br /&gt;
	if code ~= &#039;&#039; then&lt;br /&gt;
		local hash = require( &#039;Module:Crc32lua&#039; ).crc32( mw.dumpObject( args ) )&lt;br /&gt;
		code = frame:extensionTag{&lt;br /&gt;
			name = &#039;indicator&#039;,&lt;br /&gt;
			content = &#039;[[File:Zh conversion icon m.svg|35px|本頁使用了標題或全文手工轉換|link=]]&#039;,&lt;br /&gt;
			args = { name = string.format( &#039;noteTA-%x&#039;, hash ) },&lt;br /&gt;
		} .. tostring( mw.html.create( &#039;div&#039; )&lt;br /&gt;
				:attr( &#039;id&#039;, string.format( &#039;noteTA-%x&#039;, hash ) )&lt;br /&gt;
				:attr( &#039;class&#039;, &#039;noteTA&#039; )&lt;br /&gt;
				:wikitext( code )&lt;br /&gt;
		) .. &#039;[[Category:Pages using deprecated NoteTA template| ]]&#039;&lt;br /&gt;
	end&lt;br /&gt;
	return code&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return z&lt;/div&gt;</summary>
		<author><name>122.100.88.89</name></author>
	</entry>
</feed>