您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Allows you to press g (or another key) to remove favorites from the post page.
// ==UserScript== // @name Remove Favorite Hotkey // @version 1 // @description Allows you to press g (or another key) to remove favorites from the post page. // @author Yoboies // @match https://rule34.xxx/index.php?page=post&s=view&id=* // @match https://rule34.xxx/index.php?page=favorites&s=view&id=* // @icon https://www.google.com/s2/favicons?sz=64&domain=rule34.xxx // @grant GM.getValue // @grant GM.setValue // @license MIT // @namespace https://greasyfork.org/users/1345312 // ==/UserScript== (async function() { 'use strict'; if(location.href.indexOf('https://rule34.xxx/index.php?page=post') == 0){ var hotkey = "KeyG"; //REPLACE WITH WHATEVER KEY WORKS FOR YOU document.addEventListener('keydown', keyPress); function keyPress(e) { if(e.code==hotkey){ var oldURL = location.href; var newURL = oldURL.replace('page=post&s=view','page=favorites&s=delete'); GM.setValue('id',Date.now() + '\n' + oldURL); document.location.href = newURL; } } } else if (location.href.indexOf('https://rule34.xxx/index.php?page=favorites') == 0){ var ID = await GM.getValue('id', ''); if(ID && Date.now() - ID.split('\n')[0] < 1*1000){ ID = ID.split('\n')[1]; document.location.href = ID; } } })();