您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically skip the first 3 seconds of every video on Pornhub when it starts playing.
// ==UserScript== // @name Skip First 3 Seconds of Pornhub Videos // @namespace http://tampermonkey.net/ // @version 1.0 // @description Automatically skip the first 3 seconds of every video on Pornhub when it starts playing. // @author Miro // @match *://*.pornhub.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; function skipVideo(video) { if (video.currentTime < 3) { video.currentTime = 3; } } function setupSkip() { document.querySelectorAll('video').forEach(video => { video.addEventListener('play', () => skipVideo(video), { once: true }); }); } // Run setupSkip when the page is loaded window.addEventListener('load', setupSkip); // Observe the page for dynamically added videos const observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { mutation.addedNodes.forEach(node => { if (node.nodeName === 'VIDEO') { node.addEventListener('play', () => skipVideo(node), { once: true }); } else if (node.querySelectorAll) { node.querySelectorAll('video').forEach(video => { video.addEventListener('play', () => skipVideo(video), { once: true }); }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true, }); })();