您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Corrupts ads on Dailymotion by blocking playback
当前为
// ==UserScript== // @name Enhanced Corrupt Dailymotion Ads // @namespace https://pastebin.com/tiAedV19 // @version 1.4 // @description Corrupts ads on Dailymotion by blocking playback // @match https://www.dailymotion.com/* // @grant none // ==/UserScript== (function() { 'use strict'; const adSources = [ 'ad', 'advertisement', 'doubleclick', 'adserver', 'ads', 'tracking', 'spotxchange', 'krxd.net', 'brighttag', 'vdopia', 'dailymotion.com/ads', ]; const isAdSource = (src) => { return adSources.some(ad => src.includes(ad)); }; const corruptAds = () => { const originalPlay = HTMLMediaElement.prototype.play; HTMLMediaElement.prototype.play = function() { if (isAdSource(this.src)) { return Promise.reject(new Error('Ad playback failed due to connection issues.')); } return originalPlay.call(this); }; }; const suppressConsoleWarnings = () => { const originalError = console.error; console.error = function(...args) { if (args[0] && typeof args[0] === 'string' && args[0].includes('Reading cookie in cross-site context')) { return; } originalError.apply(console, args); }; }; window.addEventListener('load', () => { suppressConsoleWarnings(); corruptAds(); const observer = new MutationObserver(() => { corruptAds(); }); observer.observe(document.body, { childList: true, subtree: true }); }); })();