<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://fandombackroomscn.icu/index.php?action=history&amp;feed=atom&amp;title=%E7%94%A8%E6%88%B7%3APandaFiredoge%2F%E6%96%87%E4%BB%B62.js</id>
	<title>用户:PandaFiredoge/文件2.js - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://fandombackroomscn.icu/index.php?action=history&amp;feed=atom&amp;title=%E7%94%A8%E6%88%B7%3APandaFiredoge%2F%E6%96%87%E4%BB%B62.js"/>
	<link rel="alternate" type="text/html" href="https://fandombackroomscn.icu/index.php?title=%E7%94%A8%E6%88%B7:PandaFiredoge/%E6%96%87%E4%BB%B62.js&amp;action=history"/>
	<updated>2026-08-09T00:35:46Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://fandombackroomscn.icu/index.php?title=%E7%94%A8%E6%88%B7:PandaFiredoge/%E6%96%87%E4%BB%B62.js&amp;diff=720&amp;oldid=prev</id>
		<title>PandaFiredoge：​创建页面，内容为“(async function fetchAllFilesDirectUrl() {   const scriptPath = mw.config.get(&#039;wgScriptPath&#039;) || &#039;&#039;;   const apiEndpoint = `${window.location.origin}${scriptPath}/api.php`;   const redirectBaseUrl = `${window.location.origin}${scriptPath}/wiki/Special:%E9%87%8D%E5%AE%9A%E5%90%91/file?wpvalue=`;      let urlList = [];   let apcontinue = &#039;&#039;;    console.log(&#039;开始获取并生成文件下载链接...&#039;);    do {     const params = new URLSearchParams({       action…”</title>
		<link rel="alternate" type="text/html" href="https://fandombackroomscn.icu/index.php?title=%E7%94%A8%E6%88%B7:PandaFiredoge/%E6%96%87%E4%BB%B62.js&amp;diff=720&amp;oldid=prev"/>
		<updated>2026-08-07T07:29:55Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“(async function fetchAllFilesDirectUrl() {   const scriptPath = mw.config.get(&amp;#039;wgScriptPath&amp;#039;) || &amp;#039;&amp;#039;;   const apiEndpoint = `${window.location.origin}${scriptPath}/api.php`;   const redirectBaseUrl = `${window.location.origin}${scriptPath}/wiki/Special:%E9%87%8D%E5%AE%9A%E5%90%91/file?wpvalue=`;      let urlList = [];   let apcontinue = &amp;#039;&amp;#039;;    console.log(&amp;#039;开始获取并生成文件下载链接...&amp;#039;);    do {     const params = new URLSearchParams({       action…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;(async function fetchAllFilesDirectUrl() {&lt;br /&gt;
  const scriptPath = mw.config.get(&amp;#039;wgScriptPath&amp;#039;) || &amp;#039;&amp;#039;;&lt;br /&gt;
  const apiEndpoint = `${window.location.origin}${scriptPath}/api.php`;&lt;br /&gt;
  const redirectBaseUrl = `${window.location.origin}${scriptPath}/wiki/Special:%E9%87%8D%E5%AE%9A%E5%90%91/file?wpvalue=`;&lt;br /&gt;
  &lt;br /&gt;
  let urlList = [];&lt;br /&gt;
  let apcontinue = &amp;#039;&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
  console.log(&amp;#039;开始获取并生成文件下载链接...&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
  do {&lt;br /&gt;
    const params = new URLSearchParams({&lt;br /&gt;
      action: &amp;#039;query&amp;#039;,&lt;br /&gt;
      list: &amp;#039;allpages&amp;#039;,&lt;br /&gt;
      apnamespace: &amp;#039;6&amp;#039;, // File 命名空间&lt;br /&gt;
      aplimit: &amp;#039;max&amp;#039;,&lt;br /&gt;
      format: &amp;#039;json&amp;#039;,&lt;br /&gt;
      origin: &amp;#039;*&amp;#039;&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
    if (apcontinue) {&lt;br /&gt;
      params.append(&amp;#039;apcontinue&amp;#039;, apcontinue);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    try {&lt;br /&gt;
      const response = await fetch(`${apiEndpoint}?${params.toString()}`);&lt;br /&gt;
      const data = await response.json();&lt;br /&gt;
&lt;br /&gt;
      if (data.query &amp;amp;&amp;amp; data.query.allpages) {&lt;br /&gt;
        // 直接在获取时拼好完整 Redirect URL&lt;br /&gt;
        const urls = data.query.allpages.map(page =&amp;gt; `${redirectBaseUrl}${encodeURIComponent(page.title)}`);&lt;br /&gt;
        urlList.push(...urls);&lt;br /&gt;
        console.log(`已处理 ${urlList.length} 个文件链接...`);&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      apcontinue = data.continue ? data.continue.apcontinue : null;&lt;br /&gt;
    } catch (error) {&lt;br /&gt;
      console.error(&amp;#039;获取失败:&amp;#039;, error);&lt;br /&gt;
      break;&lt;br /&gt;
    }&lt;br /&gt;
  } while (apcontinue);&lt;br /&gt;
&lt;br /&gt;
  console.log(`✅ 完成！生成了 ${urlList.length} 个下载链接。`);&lt;br /&gt;
&lt;br /&gt;
  // 直接导出拼好的 URL 列表，开箱即用&lt;br /&gt;
  const blob = new Blob([urlList.join(&amp;#039;\n&amp;#039;)], { type: &amp;#039;text/plain&amp;#039; });&lt;br /&gt;
  const url = URL.createObjectURL(blob);&lt;br /&gt;
  const a = document.createElement(&amp;#039;a&amp;#039;);&lt;br /&gt;
  a.href = url;&lt;br /&gt;
  a.download = &amp;#039;fdm_download_links.txt&amp;#039;;&lt;br /&gt;
  a.click();&lt;br /&gt;
  URL.revokeObjectURL(url);&lt;br /&gt;
})();&lt;/div&gt;</summary>
		<author><name>PandaFiredoge</name></author>
	</entry>
</feed>