您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
按右键下载cat上打开的图片,通过左右箭头、pageUp和pageDown、数字键来控制翻页
// ==UserScript== // @name pixiv图片自动下载&快捷键换页 // @namespace http://tampermonkey.net/ // @version 0.2 // @description 按右键下载cat上打开的图片,通过左右箭头、pageUp和pageDown、数字键来控制翻页 // @author Pikaqian // @match https://pixiv.cat/* // @icon https://pixiv.cat/favicon.ico // @grant none // ==/UserScript== (function() { 'use strict'; // Your code here... window.addEventListener('keydown',function(event){ var url=window.location.href if(url.match("-")!=null){ var first=url.split("-")[0] var num=url.split("-")[1].match(/\d{1,3}/)[0] if(event.keyCode=="39"){ window.open(first+"-"+((parseInt(num)+1)+".png"),"_self") } else if(event.keyCode=="37"){ window.open(first+"-"+((parseInt(num)-1)+".png"),"_self") } else if(event.keyCode=="34"){ window.open(first+"-"+((parseInt(num)+10)+".png"),"_self") } else if(event.keyCode=="33"){ window.open(first+"-"+((parseInt(num)-10)+".png"),"_self") } else if(event.keyCode>="49"&&event.keyCode<="57"){ var press=event.keyCode-48 if(event.altKey!=true){ window.open(first+"-"+((parseInt(num)+press)+".png"),"_self") } else{ window.open(first+"-"+((parseInt(num)-press)+".png"),"_self")} } } }) window.addEventListener('contextmenu',function (event){ if(event.ctrlKey!=true){ var a = document.createElement('a'); var url=window.location.href a.href = url; a.download = url; a.click(); window.URL.revokeObjectURL(url); event.preventDefault() } }) })();