您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Skip Ads in Prime Video Spain (might work in other countries too). Adapted from RawMeatEater's script for spanish Amazon site.
当前为
// ==UserScript== // @name Prime Video Ad Blocker [ESP] // @namespace http://greasyfork.icu/en/users/5102-jeau // @version 0.2 // @description Skip Ads in Prime Video Spain (might work in other countries too). Adapted from RawMeatEater's script for spanish Amazon site. // @description:es Bloquea los anuncios en Prime Video España (podría funcionar también en otros países). Adaptado a partir del código de RawMeatEater para la web de Amazon España. // @author Jeau // @license MIT // @match https://www.primevideo.com/* // @icon https://m.media-amazon.com/images/G/01/digital/video/DVUI/favicons/favicon-32x32.png // @grant none // ==/UserScript== (function() { 'use strict'; // This value when true shows that the Ad has been skipped var adSkipped = false; // Every 0.2 seconds this function runs setInterval(function() { var video; var renderer = document.getElementsByClassName("rendererContainer")[0]; // Get the video element if (renderer && renderer.querySelector('video')) { video = renderer.querySelector('video'); } // If video started playing and a 'Time to Skip' element is detected if (video && video.currentTime && document.getElementsByClassName("atvwebplayersdk-adtimeindicator-text")[0]) { // Has it been skipped aready? (To be sure that you don't skip forward twice) if ( adSkipped == false ) { // Grab the Ad timer in HH:MM:SS format and split it into an array var currentAdTime = document.getElementsByClassName("atvwebplayersdk-adtimeindicator-text")[0].innerHTML.match(/(\d\d:)?(\d\d:)?\d\d/)[0].split(':'); // Calculate the Ad time in seconds var adTimeInSecs = 0; for (let i = 0; i < currentAdTime.length; i++) { adTimeInSecs += parseInt(currentAdTime[i]) * Math.pow(60, currentAdTime.length - 1 - i); } // Forward the video by how much Ad time the timer shows video.currentTime += adTimeInSecs; // Mark the Ad as skipped adSkipped = true; } } else { // When Ad timer disappers, reset the Ad skip value adSkipped = false; } // When 200 milliseconds pass, execute script }, 200); })();