auto_download_Unsplash_image

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

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 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         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 ======");
  }
})();