您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
A script to that allows you to download videos hosted on Reddit by pressing Ctrl+S or Meta+S on the comments section.
当前为
// ==UserScript== // @name Reddit Video Downloader // @author Berk "SAS41" Alyamach // @homepage https://github.com/sas41/ // @description A script to that allows you to download videos hosted on Reddit by pressing Ctrl+S or Meta+S on the comments section. // @iconURL https://github.com/sas41/RedditVideoDownloader/blob/master/icons/RVD_icon_32.png?raw=true // @icon64URL https://github.com/sas41/RedditVideoDownloader/blob/master/icons/RVD_icon_64.png?raw=true // @copyright 2018, Berk (sas41) Alyamach - https://github.com/sas41/ // @license MIT // @grant none // @contributionAmount €1.00 // @contributionURL https://www.paypal.me/sas41/1 // @namespace reddit // @include *://*reddit.com/r/*/*/*/*/ // @supportURL https://github.com/sas41/RedditVideoDownloader/issues // @version 1.0.2 // ==/UserScript== // ==OpenUserJS== // @author sas41 // @contributionAmount €1.00 // @contributionURL https://www.paypal.me/sas41/1 // ==/OpenUserJS== var jsonLink = document.location.href + '.json'; function getJSON(url) { var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.responseType = 'json'; xhr.onload = function() { var status = xhr.status; if (status === 200) { downloadURI(xhr.response.data.children[0].data.secure_media.reddit_video.fallback_url, "Video"); } else { alert('Sorry, Download Failed'); } }; xhr.send(); } function downloadURI(uri, name) { var link = document.createElement("a"); link.download = name; link.href = uri; document.body.appendChild(link); link.click(); document.body.removeChild(link); } $(window).bind('keydown', function(event) { if (event.ctrlKey || event.metaKey) { if (String.fromCharCode(event.which).toLowerCase() === 's') { event.preventDefault(); getJSON(jsonLink, downloadVideo); } } });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址