<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hant-HK">
	<id>https://www.unitedbook.org/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E7%B5%84%3AAirport_destination_list</id>
	<title>模組:Airport destination list - 修訂歷史</title>
	<link rel="self" type="application/atom+xml" href="https://www.unitedbook.org/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E7%B5%84%3AAirport_destination_list"/>
	<link rel="alternate" type="text/html" href="https://www.unitedbook.org/index.php?title=%E6%A8%A1%E7%B5%84:Airport_destination_list&amp;action=history"/>
	<updated>2026-07-09T16:56:11Z</updated>
	<subtitle>本 Wiki 上此頁面的修訂歷史</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://www.unitedbook.org/index.php?title=%E6%A8%A1%E7%B5%84:Airport_destination_list&amp;diff=16588&amp;oldid=prev</id>
		<title>CWF625：​建立內容為「local p = {}  local function isnotempty(s) 	return s and s:match( &#039;^%s*(.-)%s*$&#039; ) ~= &#039;&#039; end   function p.table(frame) 	local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args 	local cols 	if isnotempty(args[&#039;4thcoltitle&#039;]) and isnotempty(args[&#039;3rdcoltitle&#039;]) then 		cols = 4 	elseif isnotempty(args[&#039;3rdcoltitle&#039;]) then cols = 3 	else cols = 2 	end  	-- compute the maximum cell index 	local cellcount = 0 	for k, v in pairs( args ) do 		if…」的新頁面</title>
		<link rel="alternate" type="text/html" href="https://www.unitedbook.org/index.php?title=%E6%A8%A1%E7%B5%84:Airport_destination_list&amp;diff=16588&amp;oldid=prev"/>
		<updated>2024-06-24T04:09:16Z</updated>

		<summary type="html">&lt;p&gt;建立內容為「local p = {}  local function isnotempty(s) 	return s and s:match( &amp;#039;^%s*(.-)%s*$&amp;#039; ) ~= &amp;#039;&amp;#039; end   function p.table(frame) 	local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args 	local cols 	if isnotempty(args[&amp;#039;4thcoltitle&amp;#039;]) and isnotempty(args[&amp;#039;3rdcoltitle&amp;#039;]) then 		cols = 4 	elseif isnotempty(args[&amp;#039;3rdcoltitle&amp;#039;]) then cols = 3 	else cols = 2 	end  	-- compute the maximum cell index 	local cellcount = 0 	for k, v in pairs( args ) do 		if…」的新頁面&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新頁面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
local function isnotempty(s)&lt;br /&gt;
	return s and s:match( &amp;#039;^%s*(.-)%s*$&amp;#039; ) ~= &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
function p.table(frame)&lt;br /&gt;
	local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args&lt;br /&gt;
	local cols&lt;br /&gt;
	if isnotempty(args[&amp;#039;4thcoltitle&amp;#039;]) and isnotempty(args[&amp;#039;3rdcoltitle&amp;#039;]) then&lt;br /&gt;
		cols = 4&lt;br /&gt;
	elseif isnotempty(args[&amp;#039;3rdcoltitle&amp;#039;]) then cols = 3&lt;br /&gt;
	else cols = 2&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- compute the maximum cell index&lt;br /&gt;
	local cellcount = 0&lt;br /&gt;
	for k, v in pairs( args ) do&lt;br /&gt;
		if type( k ) == &amp;#039;number&amp;#039; and isnotempty(v) then&lt;br /&gt;
			cellcount = math.max(cellcount, k)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- compute the number of rows&lt;br /&gt;
	local rows = math.ceil(cellcount / cols)&lt;br /&gt;
&lt;br /&gt;
	-- create the root table&lt;br /&gt;
	local root = mw.html.create(&amp;#039;table&amp;#039;)&lt;br /&gt;
	root&lt;br /&gt;
		:addClass(&amp;#039;wikitable&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;sortable&amp;#039;)&lt;br /&gt;
		:css(&amp;#039;font-size&amp;#039;, &amp;#039;85%&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
	-- add the header row&lt;br /&gt;
	local row = root:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
	local cell= row:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
	cell:wikitext(&amp;#039;航空公司&amp;#039;)&lt;br /&gt;
	cell= row:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
	cell:addClass(&amp;#039;unsortable&amp;#039;)&lt;br /&gt;
	cell:wikitext(&amp;#039;目的地&amp;#039;)&lt;br /&gt;
	if (isnotempty(args[&amp;#039;3rdcoltitle&amp;#039;])) then&lt;br /&gt;
		cell= row:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
		cell:css(&amp;#039;width&amp;#039;,&amp;#039;10%&amp;#039;)&lt;br /&gt;
		if (isnotempty(args[&amp;#039;3rdcolunsortable&amp;#039;])) then&lt;br /&gt;
			cell:addClass(&amp;#039;unsortable&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
		cell:wikitext(args[&amp;#039;3rdcoltitle&amp;#039;])&lt;br /&gt;
	end&lt;br /&gt;
	if (isnotempty(args[&amp;#039;4thcoltitle&amp;#039;])) then&lt;br /&gt;
		cell= row:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
		if (isnotempty(args[&amp;#039;4thcolunsortable&amp;#039;])) then&lt;br /&gt;
			cell:addClass(&amp;#039;unsortable&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
		cell:wikitext(args[&amp;#039;4thcoltitle&amp;#039;])&lt;br /&gt;
	end&lt;br /&gt;
	-- loop over rows&lt;br /&gt;
	for j=1,rows do&lt;br /&gt;
		row = root:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
		for i=1,cols do&lt;br /&gt;
			cell= row:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
			if (i &amp;gt; 2) then cell:css(&amp;#039;text-align&amp;#039;,&amp;#039;center&amp;#039;) end&lt;br /&gt;
			cell:wikitext(args[cols*(j - 1) + i] or &amp;#039;&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- return the root table&lt;br /&gt;
	return tostring(root)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>CWF625</name></author>
	</entry>
</feed>