您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
created on 2022-06-12, 12:35:31 a.m.
// ==UserScript== // @name RedditSave button (old reddit) // @namespace Violentmonkey Scripts // @match https://old.reddit.com/* // @grant none // @version 1.0 // @author thismoon // @description created on 2022-06-12, 12:35:31 a.m. // @license GNU GPLv3 // ==/UserScript== buttons = document.querySelectorAll('[data-kind="video"] > .entry > .top-matter > .flat-list, [data-kind="gif"] > .entry > .top-matter > .flat-list'); Array.prototype.forEach.call( buttons, function( node ) { //node.parentNode.removeChild( node ); //node.style.opacity = 0.5; //create the button //const post = node.parentNode //const url = post.querySelector('.title > a').getAttribute("href"); //const saveurl = 'https://redditsave.com' + url; const url = node.querySelector('.comments').getAttribute("href").replace("old.reddit", "redditsave"); const savebtn = document.createElement("li"); const link = document.createElement("a"); //link.href = saveurl; link.href = url; link.target = "_blank"; link.rel = "noreferrer noopener"; savebtn.appendChild(link); const textnode = document.createTextNode("redditsave"); link.appendChild(textnode); node.appendChild(savebtn); });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址