Greasy Fork is available in English.
Auto unmute Reuters Video!
当前为
// ==UserScript==
// @name Reuters Video Unmute
// @namespace http://greasyfork.icu/users/28298
// @version 1.1
// @description Auto unmute Reuters Video!
// @author Jerry
// @match *://www.reuters.com/video/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=reuters.com
// @noframes
// @license GNU GPLv3
// ==/UserScript==
(function() {
'use strict';
// Delay before starting the unmute process (in milliseconds)
const delay = 1000; // seconds delay
setTimeout(() => {
const videoElement = document.querySelector('video');
if (videoElement) {
videoElement.muted = false; // Unmute the video
// Handle unexpected pauses after unmuting
videoElement.addEventListener('pause', () => {
if (!videoElement.muted) {
videoElement.play(); // Resume playing if it's unmuted
}
});
}
}, delay);
})();