您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Activate with Shift+S
// ==UserScript== // @name Download Video from Studyforge // @namespace studyforge-dl // @match https://tool.studyforge.net/lesson/* // @grant window.open // @version 1.1 // @author InterstellarOne // @description Activate with Shift+S // @license MIT // ==/UserScript== (function() { 'use strict'; document.addEventListener('keydown', function(event) { if (event.shiftKey && event.key === 'S') { event.preventDefault(); const videoElement = document.querySelector('.element.show .video-container .video-wrapper video'); if (videoElement) { const sourceElement = videoElement.querySelector('source'); if (sourceElement && sourceElement.src) { window.open(sourceElement.src, '_blank'); } else { console.log('Could not find video source.'); } } else { console.log('Could not find video.'); } } }); })();