<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.transpeopletogether.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ABaseDomain</id>
	<title>Module:BaseDomain - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.transpeopletogether.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ABaseDomain"/>
	<link rel="alternate" type="text/html" href="https://www.transpeopletogether.org/w/index.php?title=Module:BaseDomain&amp;action=history"/>
	<updated>2026-04-18T23:58:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://www.transpeopletogether.org/w/index.php?title=Module:BaseDomain&amp;diff=976&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;-- Module:BaseDomain local p = {}  -- frame.args[1] or frame.args.url is the URL to process function p.extract(frame)     local url = frame.args[1] or frame.args.url or &#039;&#039;     local host      -- Try to parse with mw.uri (MediaWiki ≥1.35)     local ok, uri = pcall(mw.uri.new, url)     if ok and uri and uri.host then         host = uri.host     else         -- Fallback: grab everything after scheme:// up to the next /         host = url:match(&#039;^%w+://([^/]+)&#039;) or url...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.transpeopletogether.org/w/index.php?title=Module:BaseDomain&amp;diff=976&amp;oldid=prev"/>
		<updated>2025-05-09T00:47:56Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- Module:BaseDomain local p = {}  -- frame.args[1] or frame.args.url is the URL to process function p.extract(frame)     local url = frame.args[1] or frame.args.url or &amp;#039;&amp;#039;     local host      -- Try to parse with mw.uri (MediaWiki ≥1.35)     local ok, uri = pcall(mw.uri.new, url)     if ok and uri and uri.host then         host = uri.host     else         -- Fallback: grab everything after scheme:// up to the next /         host = url:match(&amp;#039;^%w+://([^/]+)&amp;#039;) or url...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Module:BaseDomain&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- frame.args[1] or frame.args.url is the URL to process&lt;br /&gt;
function p.extract(frame)&lt;br /&gt;
    local url = frame.args[1] or frame.args.url or &amp;#039;&amp;#039;&lt;br /&gt;
    local host&lt;br /&gt;
&lt;br /&gt;
    -- Try to parse with mw.uri (MediaWiki ≥1.35)&lt;br /&gt;
    local ok, uri = pcall(mw.uri.new, url)&lt;br /&gt;
    if ok and uri and uri.host then&lt;br /&gt;
        host = uri.host&lt;br /&gt;
    else&lt;br /&gt;
        -- Fallback: grab everything after scheme:// up to the next /&lt;br /&gt;
        host = url:match(&amp;#039;^%w+://([^/]+)&amp;#039;) or url&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- Drop any port number&lt;br /&gt;
    host = host:gsub(&amp;#039;:%d+$&amp;#039;, &amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
    -- Split on dots&lt;br /&gt;
    local parts = {}&lt;br /&gt;
    for label in host:gmatch(&amp;#039;([^.]+)&amp;#039;) do&lt;br /&gt;
        parts[#parts + 1] = label&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- If we have at least two labels, return the last two; otherwise the whole host&lt;br /&gt;
    local n = #parts&lt;br /&gt;
    if n &amp;gt;= 2 then&lt;br /&gt;
        return parts[n-1] .. &amp;#039;.&amp;#039; .. parts[n]&lt;br /&gt;
    else&lt;br /&gt;
        return host&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>