userscript-konachan-downloader

Konachan.com图片按当前页面批量打包下载, 默认下载大图

As of 29. 04. 2025. See the latest version.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         userscript-konachan-downloader
// @namespace    https://github.com/Vincent-the-gamer/userscript-konachan-downloader
// @version      1.0.0
// @author       Vincent-the-gamer
// @description  Konachan.com图片按当前页面批量打包下载, 默认下载大图
// @license      MIT
// @icon         data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAABnRSTlMAAAAAAABupgeRAAAFw0lEQVR4Ab2WA3MlCRSF95+sbdsb23kZxZk3se282MaY8di2Fdsa2+j9st3V6e2gtrSvbnXd1jkX595+r/wfP0E4IjzdOYMJB4SJ2khrw/nf/x6+wDnG2Y3jbJal1YbZOEbZWw4eK5QBcSYJ8ABS282G+4NrF3zzteZHPd4PsHeawzxMrEpDA/IC/XCM3vrk4IpIEZPj7AT3txC73Te//Rf0FA+PGwPHa3N1+FyBo2t/NgizEnBlb1X4X699Mh3dy9BceepmZF7o43t/4Ljwsmfg5CatuXWw0wJonH/4/slY9awE3NMa6PH0dHQRAt/bxoHTxpTEl+NnhLtNwo0LOKTCdcLSe/PzxmzfmXvA6a7yEOvPf1KFTw8TLTU4EEATY+PUXL9ShuYoPGyrTo0jfB5Y8Lupj8HvyGQGAtrLPbGamIy4ztlHN8+FAJ3/MMxydn/Ye1R43gmubBA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eWPh4qAzY9MJQLxCdacl7km1CMsJTo3N60SgvT4wvLkVAhY90cT0/YFxEJDNt7f6yFiuSYqA1Dc1VIG7BCixvLiEgEVDWgMJ8JPV18wuZpkjs1+kQv+spH/XsxIwJDyz0Ei4JLDL2YRi0NqV1SfPXSEIxmALnOEa2PYpkgF/VzIyE61dfdYEIgQVbiqDKaazKPEfnjbhmV5ubqIlB21m47t2gu0kiPZPXho92SHMdru7uDjPd9frr7K1Cpak5X5+GqvaKf3btIFRVZll5KKkiAuLKs0MIzdh1j5tsRaOPt7RSME9DMjARmw/yUCQXgiPL8lPLo+acL9F1e7oawpX9XfxOSvLslageHEBeoOVq8Sbg7ywPqYJL+FIVwJdgkGTvXfG58M/pnkpr8BTXHKJ0TcJfQAAAAASUVORK5CYII=
// @match        https://konachan.com/**
// @require      https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.global.prod.js
// @grant        GM_addStyle
// ==/UserScript==

(e=>{if(typeof GM_addStyle=="function"){GM_addStyle(e);return}const t=document.createElement("style");t.textContent=e,document.head.append(t)})(" .user-btn[data-v-d8b0c0c8]{position:fixed;top:5px;right:5px;height:30px;border-radius:7px;padding:8px;margin:0;border:1px solid yellow;background-color:#40e0d0;display:flex;align-items:center} ");

(function (vue) {
  'use strict';

  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
    __name: "App",
    setup(__props) {
      const postList = Array.from(document.querySelectorAll("a.largeimg"));
      async function getLargeImgLink() {
        if (postList) {
          let linkList = postList.map((el) => el.href);
          await navigator.clipboard.writeText(linkList.join("\n\n"));
          alert("复制成功!");
        }
      }
      return (_ctx, _cache) => {
        return vue.unref(postList).length > 0 ? (vue.openBlock(), vue.createElementBlock("button", {
          key: 0,
          class: "user-btn",
          onClick: getLargeImgLink
        }, "复制所有当前页面大图链接")) : vue.createCommentVNode("", true);
      };
    }
  });
  const _export_sfc = (sfc, props) => {
    const target = sfc.__vccOpts || sfc;
    for (const [key, val] of props) {
      target[key] = val;
    }
    return target;
  };
  const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d8b0c0c8"]]);
  vue.createApp(App).mount(
    (() => {
      const app = document.createElement("div");
      document.body.append(app);
      return app;
    })()
  );

})(Vue);