auto_download_Unsplash_image

while you open Unspladh photo web , will download this photo.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         auto_download_Unsplash_image
// @name:zh-TW   自動下載 Unsplash 的照片
// @version      3.0
// @description  while you open Unspladh photo web , will download this photo.
// @description:zh-tw  當你打開 Unsplash 網站的照片網址時,這個腳本會自動下載圖片到你的電腦。
// @author       we684123@github
// @namespace    https://github.com/we684123/auto_download_Unsplash_image
// @match        https://unsplash.com/photos/*
// @connect      unsplash.com
// @run-at       document-end
// ==/UserScript==

(function () {
  //基礎定義
  const image_download_butter = document.querySelector("a.untracked");
  try {
    image_download_butter.click();
    var magic = [
      "  ∧_∧\n",
      "(。・ω・。)つ━☆・*。\n",
      "⊂   ノ    ・゜+.\n",
      "しーJ   °。+ *´¨)\n",
      "           .· ´¸.·*´¨) ¸.·*¨)\n",
      "        (¸.·´ (¸.·’*"
    ]
    console.log(magic.join(""));
    console.log("====== download done. ======");
  } catch (e) {
    console.log("error:");
    console.log(e);
  } finally {
    console.log("====== end ======");
  }
})();