<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://shanghaidc1.gaoice.run/index.php?action=history&amp;feed=atom&amp;title=%E5%BE%AE%E4%BB%B6%3A%E5%8F%B3%E4%B8%8B%E8%A7%92%E7%9B%AE%E5%BD%95</id>
	<title>微件:右下角目录 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://shanghaidc1.gaoice.run/index.php?action=history&amp;feed=atom&amp;title=%E5%BE%AE%E4%BB%B6%3A%E5%8F%B3%E4%B8%8B%E8%A7%92%E7%9B%AE%E5%BD%95"/>
	<link rel="alternate" type="text/html" href="https://shanghaidc1.gaoice.run/index.php?title=%E5%BE%AE%E4%BB%B6:%E5%8F%B3%E4%B8%8B%E8%A7%92%E7%9B%AE%E5%BD%95&amp;action=history"/>
	<updated>2026-10-31T20:44:35Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://shanghaidc1.gaoice.run/index.php?title=%E5%BE%AE%E4%BB%B6:%E5%8F%B3%E4%B8%8B%E8%A7%92%E7%9B%AE%E5%BD%95&amp;diff=58260&amp;oldid=prev</id>
		<title>TheNewMillium：​创建页面，内容为“&lt;script&gt; /* loaded only by Widget:右下角目录 in Version1.1. */ (function () {     &#039;use strict&#039;;     if (window.pdLongTocV11) {         window.pdLongTocV11.init(document);         return;     }     var nextId = 0;      function directChild(element, tag) {         return Array.prototype.find.call(element.children, function (child) {             return child.tagName === tag;         });     }      function enhance(root) {         if (root.dataset.pdLongTocRea…”</title>
		<link rel="alternate" type="text/html" href="https://shanghaidc1.gaoice.run/index.php?title=%E5%BE%AE%E4%BB%B6:%E5%8F%B3%E4%B8%8B%E8%A7%92%E7%9B%AE%E5%BD%95&amp;diff=58260&amp;oldid=prev"/>
		<updated>2026-10-13T07:25:49Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“&amp;lt;script&amp;gt; &lt;span class=&quot;autocomment&quot;&gt;loaded only by Widget:右下角目录 in Version1.1.：​&lt;/span&gt; (function () {     &amp;#039;use strict&amp;#039;;     if (window.pdLongTocV11) {         window.pdLongTocV11.init(document);         return;     }     var nextId = 0;      function directChild(element, tag) {         return Array.prototype.find.call(element.children, function (child) {             return child.tagName === tag;         });     }      function enhance(root) {         if (root.dataset.pdLongTocRea…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;script&amp;gt;&lt;br /&gt;
/* loaded only by Widget:右下角目录 in Version1.1. */&lt;br /&gt;
(function () {&lt;br /&gt;
    &amp;#039;use strict&amp;#039;;&lt;br /&gt;
    if (window.pdLongTocV11) {&lt;br /&gt;
        window.pdLongTocV11.init(document);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
    var nextId = 0;&lt;br /&gt;
&lt;br /&gt;
    function directChild(element, tag) {&lt;br /&gt;
        return Array.prototype.find.call(element.children, function (child) {&lt;br /&gt;
            return child.tagName === tag;&lt;br /&gt;
        });&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function enhance(root) {&lt;br /&gt;
        if (root.dataset.pdLongTocReady) return;&lt;br /&gt;
        var mode = /^[012]$/.test(root.dataset.mode || &amp;#039;&amp;#039;) ? Number(root.dataset.mode) : 0;&lt;br /&gt;
        var fold = /^[1-6]$/.test(root.dataset.fold || &amp;#039;&amp;#039;) ? Number(root.dataset.fold) : 1;&lt;br /&gt;
        var listHost = root.querySelector(&amp;#039;.pd-long-toc-list&amp;#039;);&lt;br /&gt;
        var original = listHost &amp;amp;&amp;amp; listHost.querySelector(&amp;#039;.toc &amp;gt; ul&amp;#039;);&lt;br /&gt;
        if (!original) return;&lt;br /&gt;
        root.dataset.mode = String(mode);&lt;br /&gt;
        root.dataset.fold = String(fold);&lt;br /&gt;
        if (mode === 0) {&lt;br /&gt;
            root.dataset.pdLongTocReady = &amp;#039;1.1&amp;#039;;&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        /* Build off-DOM. A failure leaves the complete, working original TOC. */&lt;br /&gt;
        var list = original.cloneNode(true);&lt;br /&gt;
        var branches = [];&lt;br /&gt;
        Array.prototype.forEach.call(list.querySelectorAll(&amp;#039;li&amp;#039;), function (item) {&lt;br /&gt;
            var match = item.className.match(/(?:^|\s)toclevel-(\d+)(?:\s|$)/);&lt;br /&gt;
            var level = match ? Number(match[1]) : 0;&lt;br /&gt;
            var children = directChild(item, &amp;#039;UL&amp;#039;);&lt;br /&gt;
            var link = directChild(item, &amp;#039;A&amp;#039;);&lt;br /&gt;
            if (!children || !link || (mode === 1 ? level !== fold : level &amp;lt; fold)) return;&lt;br /&gt;
            var label = link.textContent.trim();&lt;br /&gt;
            var row = document.createElement(&amp;#039;div&amp;#039;);&lt;br /&gt;
            row.className = &amp;#039;pd-long-toc-row&amp;#039;;&lt;br /&gt;
            var button = document.createElement(&amp;#039;button&amp;#039;);&lt;br /&gt;
            button.type = &amp;#039;button&amp;#039;;&lt;br /&gt;
            button.className = &amp;#039;pd-long-toc-toggle&amp;#039;;&lt;br /&gt;
            button.setAttribute(&amp;#039;aria-expanded&amp;#039;, &amp;#039;false&amp;#039;);&lt;br /&gt;
            children.id = &amp;#039;pd-long-toc-children-&amp;#039; + (++nextId);&lt;br /&gt;
            button.setAttribute(&amp;#039;aria-controls&amp;#039;, children.id);&lt;br /&gt;
            while (link.firstChild) button.appendChild(link.firstChild);&lt;br /&gt;
            link.className += &amp;#039; pd-long-toc-jump&amp;#039;;&lt;br /&gt;
            link.textContent = &amp;#039;跳转&amp;#039;;&lt;br /&gt;
            link.setAttribute(&amp;#039;aria-label&amp;#039;, &amp;#039;跳转到 &amp;#039; + label);&lt;br /&gt;
            link.title = &amp;#039;跳转到 &amp;#039; + label;&lt;br /&gt;
            item.insertBefore(row, children);&lt;br /&gt;
            row.appendChild(button);&lt;br /&gt;
            row.appendChild(link);&lt;br /&gt;
            children.hidden = true;&lt;br /&gt;
            children.inert = true;&lt;br /&gt;
            children.setAttribute(&amp;#039;aria-hidden&amp;#039;, &amp;#039;true&amp;#039;);&lt;br /&gt;
            branches.push({ item: item, button: button, children: children, group: item.parentElement, animation: null });&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        function settle(branch, open) {&lt;br /&gt;
            if (branch.animation) {&lt;br /&gt;
                branch.animation.cancel();&lt;br /&gt;
                branch.animation = null;&lt;br /&gt;
            }&lt;br /&gt;
            branch.children.style.overflow = &amp;#039;&amp;#039;;&lt;br /&gt;
            branch.children.hidden = !open;&lt;br /&gt;
            branch.children.inert = !open;&lt;br /&gt;
            branch.children.setAttribute(&amp;#039;aria-hidden&amp;#039;, String(!open));&lt;br /&gt;
            branch.button.setAttribute(&amp;#039;aria-expanded&amp;#039;, String(open));&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function transition(branch, open, startHeight) {&lt;br /&gt;
            var children = branch.children;&lt;br /&gt;
            var from = startHeight === undefined ? (children.hidden ? 0 : children.getBoundingClientRect().height) : startHeight;&lt;br /&gt;
            settle(branch, open);&lt;br /&gt;
            var reduced = window.matchMedia &amp;amp;&amp;amp; window.matchMedia(&amp;#039;(prefers-reduced-motion: reduce)&amp;#039;).matches;&lt;br /&gt;
            if (reduced || !children.animate || !root.querySelector(&amp;#039;.pd-long-toc-panel&amp;#039;).matches(&amp;#039;:target&amp;#039;)) return;&lt;br /&gt;
            children.hidden = false;&lt;br /&gt;
            var to = open ? children.getBoundingClientRect().height : 0;&lt;br /&gt;
            if (from === to) {&lt;br /&gt;
                settle(branch, open);&lt;br /&gt;
                return;&lt;br /&gt;
            }&lt;br /&gt;
            children.style.overflow = &amp;#039;hidden&amp;#039;;&lt;br /&gt;
            var animation;&lt;br /&gt;
            try {&lt;br /&gt;
                animation = children.animate([&lt;br /&gt;
                    { height: from + &amp;#039;px&amp;#039;, opacity: open ? 0.6 : 1 },&lt;br /&gt;
                    { height: to + &amp;#039;px&amp;#039;, opacity: open ? 1 : 0.6 }&lt;br /&gt;
                ], { duration: 200, easing: &amp;#039;cubic-bezier(0.2, 0, 0, 1)&amp;#039; });&lt;br /&gt;
            } catch (error) {&lt;br /&gt;
                settle(branch, open);&lt;br /&gt;
                return;&lt;br /&gt;
            }&lt;br /&gt;
            branch.animation = animation;&lt;br /&gt;
            animation.finished.then(function () {&lt;br /&gt;
                if (branch.animation === animation) settle(branch, open);&lt;br /&gt;
            }, function () { /* Superseded by a newer click. */ });&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function close(branch) {&lt;br /&gt;
            var height = branch.children.hidden ? 0 : branch.children.getBoundingClientRect().height;&lt;br /&gt;
            branches.forEach(function (descendant) {&lt;br /&gt;
                if (branch.children.contains(descendant.item)) {&lt;br /&gt;
                    settle(descendant, false);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
            transition(branch, false, height);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        branches.forEach(function (branch) {&lt;br /&gt;
            branch.button.addEventListener(&amp;#039;click&amp;#039;, function () {&lt;br /&gt;
                /* Nested clicks release any still-animating ancestor height. */&lt;br /&gt;
                branches.forEach(function (ancestor) {&lt;br /&gt;
                    if (ancestor.animation &amp;amp;&amp;amp; ancestor.children.contains(branch.item)) {&lt;br /&gt;
                        settle(ancestor, ancestor.button.getAttribute(&amp;#039;aria-expanded&amp;#039;) === &amp;#039;true&amp;#039;);&lt;br /&gt;
                    }&lt;br /&gt;
                });&lt;br /&gt;
                if (branch.button.getAttribute(&amp;#039;aria-expanded&amp;#039;) === &amp;#039;true&amp;#039;) {&lt;br /&gt;
                    close(branch);&lt;br /&gt;
                    return;&lt;br /&gt;
                }&lt;br /&gt;
                branches.forEach(function (other) {&lt;br /&gt;
                    if (other !== branch &amp;amp;&amp;amp; (mode === 1 || other.group === branch.group)) close(other);&lt;br /&gt;
                });&lt;br /&gt;
                transition(branch, true);&lt;br /&gt;
            });&lt;br /&gt;
        });&lt;br /&gt;
        /* Resize, motion preference changes and printing must not retain clipped heights. */&lt;br /&gt;
        function settleAll() {&lt;br /&gt;
            branches.forEach(function (branch) {&lt;br /&gt;
                if (branch.animation) settle(branch, branch.button.getAttribute(&amp;#039;aria-expanded&amp;#039;) === &amp;#039;true&amp;#039;);&lt;br /&gt;
            });&lt;br /&gt;
        }&lt;br /&gt;
        window.addEventListener(&amp;#039;resize&amp;#039;, settleAll);&lt;br /&gt;
        window.addEventListener(&amp;#039;beforeprint&amp;#039;, settleAll);&lt;br /&gt;
        window.addEventListener(&amp;#039;hashchange&amp;#039;, function () {&lt;br /&gt;
            if (!root.querySelector(&amp;#039;.pd-long-toc-panel&amp;#039;).matches(&amp;#039;:target&amp;#039;)) settleAll();&lt;br /&gt;
        });&lt;br /&gt;
        if (window.matchMedia) {&lt;br /&gt;
            var motionPreference = window.matchMedia(&amp;#039;(prefers-reduced-motion: reduce)&amp;#039;);&lt;br /&gt;
            if (motionPreference.addEventListener) motionPreference.addEventListener(&amp;#039;change&amp;#039;, settleAll);&lt;br /&gt;
        }&lt;br /&gt;
        original.replaceWith(list);&lt;br /&gt;
        root.classList.add(&amp;#039;pd-long-toc-enhanced&amp;#039;);&lt;br /&gt;
        root.addEventListener(&amp;#039;pointerdown&amp;#039;, function () {&lt;br /&gt;
            root.classList.remove(&amp;#039;pd-long-toc-keyboard&amp;#039;);&lt;br /&gt;
        });&lt;br /&gt;
        root.addEventListener(&amp;#039;keydown&amp;#039;, function () {&lt;br /&gt;
            root.classList.add(&amp;#039;pd-long-toc-keyboard&amp;#039;);&lt;br /&gt;
        });&lt;br /&gt;
        document.addEventListener(&amp;#039;keydown&amp;#039;, function (event) {&lt;br /&gt;
            if (event.key === &amp;#039;Tab&amp;#039; &amp;amp;&amp;amp; root.isConnected) {&lt;br /&gt;
                root.classList.add(&amp;#039;pd-long-toc-keyboard&amp;#039;);&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
        root.dataset.pdLongTocReady = &amp;#039;1.1&amp;#039;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function init(scope) {&lt;br /&gt;
        var roots = [];&lt;br /&gt;
        if (scope.matches &amp;amp;&amp;amp; scope.matches(&amp;#039;.pd-long-toc-root&amp;#039;)) roots.push(scope);&lt;br /&gt;
        roots = roots.concat(Array.prototype.slice.call(scope.querySelectorAll(&amp;#039;.pd-long-toc-root&amp;#039;)));&lt;br /&gt;
        roots.forEach(function (root) {&lt;br /&gt;
            try { enhance(root); } catch (error) {&lt;br /&gt;
                if (window.console) console.warn(&amp;#039;Long TOC: retained original directory.&amp;#039;, error);&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    }&lt;br /&gt;
    window.pdLongTocV11 = { init: init };&lt;br /&gt;
    if (window.mw &amp;amp;&amp;amp; mw.hook) {&lt;br /&gt;
        mw.hook(&amp;#039;wikipage.content&amp;#039;).add(function (content) {&lt;br /&gt;
            init(content[0] || content);&lt;br /&gt;
        });&lt;br /&gt;
    }&lt;br /&gt;
    if (document.readyState === &amp;#039;loading&amp;#039;) {&lt;br /&gt;
        document.addEventListener(&amp;#039;DOMContentLoaded&amp;#039;, function () { init(document); }, { once: true });&lt;br /&gt;
    } else {&lt;br /&gt;
        init(document);&lt;br /&gt;
    }&lt;br /&gt;
}());&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;/div&gt;</summary>
		<author><name>TheNewMillium</name></author>
	</entry>
</feed>