<?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%B6.js</id>
	<title>用户:PandaFiredoge/文件.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%B6.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%B6.js&amp;action=history"/>
	<updated>2026-08-08T23:36:18Z</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%B6.js&amp;diff=710&amp;oldid=prev</id>
		<title>PandaFiredoge：​创建页面，内容为“(async function fetchAllDirectImageUrls() {   const scriptPath = mw.config.get(&#039;wgScriptPath&#039;) || &#039;&#039;;   const apiEndpoint = `${window.location.origin}${scriptPath}/api.php`;   let urlList = [];   let aicontinue = &#039;&#039;;    console.log(&#039;开始获取图片直链...&#039;);    do {     const params = new URLSearchParams({       action: &#039;query&#039;,       list: &#039;allimages&#039;, // 直接查图片表       ailimit: &#039;max&#039;,       format: &#039;json&#039;,       origin: &#039;*&#039;     });      if (aic…”</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%B6.js&amp;diff=710&amp;oldid=prev"/>
		<updated>2026-08-07T07:21:21Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“(async function fetchAllDirectImageUrls() {   const scriptPath = mw.config.get(&amp;#039;wgScriptPath&amp;#039;) || &amp;#039;&amp;#039;;   const apiEndpoint = `${window.location.origin}${scriptPath}/api.php`;   let urlList = [];   let aicontinue = &amp;#039;&amp;#039;;    console.log(&amp;#039;开始获取图片直链...&amp;#039;);    do {     const params = new URLSearchParams({       action: &amp;#039;query&amp;#039;,       list: &amp;#039;allimages&amp;#039;, // 直接查图片表       ailimit: &amp;#039;max&amp;#039;,       format: &amp;#039;json&amp;#039;,       origin: &amp;#039;*&amp;#039;     });      if (aic…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;(async function fetchAllDirectImageUrls() {&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;
  let urlList = [];&lt;br /&gt;
  let aicontinue = &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;allimages&amp;#039;, // 直接查图片表&lt;br /&gt;
      ailimit: &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 (aicontinue) {&lt;br /&gt;
      params.append(&amp;#039;aicontinue&amp;#039;, aicontinue);&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.allimages) {&lt;br /&gt;
        // 直接读取图片的原图 URL (url 字段)&lt;br /&gt;
        const urls = data.query.allimages.map(img =&amp;gt; img.url);&lt;br /&gt;
        urlList.push(...urls);&lt;br /&gt;
        console.log(`已获取 ${urlList.length} 个原图直链...`);&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      aicontinue = data.continue ? data.continue.aicontinue : 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 (aicontinue);&lt;br /&gt;
&lt;br /&gt;
  console.log(`✅ 获取完成！共找到 ${urlList.length} 个原图直链。`);&lt;br /&gt;
&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;direct_image_urls.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>