您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Automatically play videos at 2x speed and mute on Aike
当前为
// ==UserScript== // @name 南方医科大学爱课平台自动二倍速静音播放全部视频/Auto Aike 2x Speed Muted Video Player // @namespace https://aike.smu.edu.cn/ // @version 1.2 // @description Automatically play videos at 2x speed and mute on Aike // @author Lily Yu // @match https://aike.smu.edu.cn/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // Define the elements to be manipulated var videos, nextPageButton; // Wait for the window to load completely window.onload = function() { // Find all the video elements on the page videos = document.querySelectorAll("video"); // Find the next page button on the page nextPageButton = document.querySelector("#next-activity-link"); // Loop through all the video elements for (var i = 0; i < videos.length; i++) { // Get the current video element var video = videos[i]; // Play the video at 2x speed and mute video.playbackRate = 2; video.muted = true; video.play(); // Add an event listener to the video element to detect when it ends video.addEventListener("ended", function() { // Click the next page button to load a new video nextPageButton.click(); }); } }; })();