amberstudent / image auto download

// ==UserScript==
// @name         image auto download
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @license      MIT
// @match        https://*.jpg
// @grant        none
// ==/UserScript==

(function() {
    var link = document.createElement('a');
link.href = window.location.href;
 let array = window.location.href.split("\/");
link.download =array[array.length - 1];
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
})();