Greasy Fork is available in English.
结合了低音增强、1000% 音量、智能广告拦截加速和 Shorts 支持。
当前为
// ==UserScript==
// @name YouTubeAdSolutions
// @name:ar YouTubeAdSolutions
// @name:be YouTubeAdSolutions
// @name:bg YouTubeAdSolutions
// @name:ckb YouTubeAdSolutions
// @name:cs YouTubeAdSolutions
// @name:da YouTubeAdSolutions
// @name:de YouTubeAdSolutions
// @name:el YouTubeAdSolutions
// @name:en YouTubeAdSolutions
// @name:eo YouTubeAdSolutions
// @name:es YouTubeAdSolutions
// @name:es-419 YouTubeAdSolutions
// @name:fi YouTubeAdSolutions
// @name:fr YouTubeAdSolutions
// @name:fr-CA YouTubeAdSolutions
// @name:he YouTubeAdSolutions
// @name:hr YouTubeAdSolutions
// @name:hu YouTubeAdSolutions
// @name:id YouTubeAdSolutions
// @name:it YouTubeAdSolutions
// @name:ja YouTubeAdSolutions
// @name:ka YouTubeAdSolutions
// @name:ko YouTubeAdSolutions
// @name:mr YouTubeAdSolutions
// @name:nb YouTubeAdSolutions
// @name:nl YouTubeAdSolutions
// @name:pl YouTubeAdSolutions
// @name:pt-BR YouTubeAdSolutions
// @name:ro YouTubeAdSolutions
// @name:ru YouTubeAdSolutions
// @name:sk YouTubeAdSolutions
// @name:sr YouTubeAdSolutions
// @name:sv YouTubeAdSolutions
// @name:th YouTubeAdSolutions
// @name:tr YouTubeAdSolutions
// @name:uk YouTubeAdSolutions
// @name:ug YouTubeAdSolutions
// @name:vi YouTubeAdSolutions
// @name:zh-CN YouTubeAdSolutions
// @name:zh-TW YouTubeAdSolutions
// @description Combines bass boost, 1000% volume, intelligent ad-block speedup, and Shorts support.
// @description:ar يجمع بين تعزيز الباس، صوت 1000%، تسريع حظر الإعلانات الذكي، ودعم الشورتس.
// @description:be Комбінуе bass boost, гучнасць 1000%, інтэлектуальнае прыцягненне блякавання рэкламы і падтрымку Shorts.
// @description:bg Комбинира бас буст, 1000% сила, интелигентно ускоряване на блокиране на реклами и поддръжка на Shorts.
// @description:ckb هەموو بەس بوست، دەنگی ١٠٠٠٪، خێراکی زیرەک لە کۆتکردنەوەی ڕیکلامەکان، و پشتگیری Shorts.
// @description:cs Kombinuje basový posilovač, 1000% hlasitost, inteligentní urychlení blokování reklam a podporu Shorts.
// @description:da Kombinerer bas boost, 1000% volumen, intelligent annonceringsblokering og Shorts-understøttelse.
// @description:de Kombiniert Bass-Boost, 1000% Lautstärke, intelligente Ad-Block-Beschleunigung und Shorts-Unterstützung.
// @description:el Συνδυάζει ενίσχυση μπάσων, ένταση 1000%, έξυπνη επιτάχυνση μπλοκ διαφημίσεων και υποστήριξη Shorts.
// @description:en Combines bass boost, 1000% volume, intelligent ad-block speedup, and Shorts support.
// @description:eo Kombinas bass-plifortigo, 1000% sono, inteligenta reklamŝildo-akcelo, kaj Shorts subteno.
// @description:es Combina refuerzo de graves, volumen 1000%, aceleración inteligente de bloqueo de anuncios y soporte Shorts.
// @description:es-419 Combina refuerzo de graves, volumen 1000%, aceleración inteligente de bloqueo de anuncios y soporte Shorts.
// @description:fi Yhdistää bass boostin, 1000% äänenvoimakkuuden, älykkään mainosesto-nopeuden ja Shorts-tuen.
// @description:fr Combine boost de basse, volume 1000%, accélération intelligente de blocage de pubs et support Shorts.
// @description:fr-CA Combine boost de basse, volume 1000%, accélération intelligente de blocage de pubs et support Shorts.
// @description:he משלב הגברת באס, עוצמת קול של 1000%, האצת חסימת פרסומות חכמה ותמיכה ב-Shorts.
// @description:hr Kombinira pojačanje basa, 1000% volumen, inteligentno ubrzanje blokiranja oglasa i podršku za Shorts.
// @description:hu Kombinálja a basszuskiemelést, az 1000%-os hangerőt, az intelligens hirdetésblokkoló-gyorsítást és a Shorts támogatást.
// @description:id Menggabungkan peningkatan bass, volume 1000%, akselerasi blokir iklan cerdas, dan dukungan Shorts.
// @description:it Combina bass boost, volume al 1000%, accelerazione intelligente del blocco degli annunci e supporto per i Shorts.
// @description:ja ベースブースト、1000%ボリューム、インテリジェントな広告ブロック加速、Shortsサポートを組み合わせたもの。
// @description:ka აერთიანებს ბასის გაძლიერებას, 1000% ხმას, რეკლამის დაბლოკვის ინტელექტუალურ დაჩქარებას და Shorts მხარდაჭერას.
// @description:ko 베이스 부스트, 1000% 볼륨, 지능형 광고 차단 가속 및 Shorts 지원을 결합합니다.
// @description:mr बास बूस्ट, 1000% आवाज, इंटेलिजेंट जाहिरात-ब्लॉक प्रवेग आणि शॉर्ट्स सपोर्ट एकत्र करते.
// @description:nb Kombinerer bassboost, 1000 % volum, intelligent annonseblokkeringsakselerasjon og Shorts-støtte.
// @description:nl Combineert bass boost, 1000% volume, intelligente advertentieblokkeringversnelling en Shorts-ondersteuning.
// @description:pl Łączy wzmocnienie basów, 1000% głośności, inteligentne przyspieszanie blokowania reklam i obsługę Shorts.
// @description:pt-BR Combina reforço de graves, volume de 1000%, aceleração inteligente de bloqueio de anúncios e suporte a Shorts.
// @description:ro Combină amplificarea basului, volumul de 1000%, accelerarea inteligentă a blocării reclamelor și suportul pentru Shorts.
// @description:ru Сочетает в себе усиление басов, 1000% громкость, интеллектуальное ускорение блокировки рекламы и поддержку Shorts.
// @description:sk Kombinuje zosilnenie basov, 1000% hlasitosť, inteligentné zrýchlenie blokovania reklám a podporu Shorts.
// @description:sr Комбинује појачање баса, 1000% јачину звука, интелигентно убрзање блокирања огласа и подршку за Shorts.
// @description:sv Kombinerar basförstärkning, 1000 % volym, intelligent annonsblockeringsacceleration och Shorts-stöd.
// @description:th ผสมผสานการเพิ่มเบส, ระดับเสียง 1000%, การเร่งความเร็วการบล็อกโฆษณาอัจฉริยะ และการรองรับ Shorts
// @description:tr Bas güçlendirme, %1000 ses düzeyi, akıllı reklam engelleme hızlandırma ve Shorts desteğini birleştirir.
// @description:uk Поєднує посилення басів, 1000% гучності, інтелектуальне прискорення блокування реклами та підтримку Shorts.
// @description:ug بۇ باس كۈچەيتىش، 1000% ئاۋاز مىقدارى، ئەقلىي ئىقتىدارلىق ئېلان توسۇشنى تېزلىتىش ۋە Shorts قوللاشنى بىرلەشتۈرگەن.
// @description:vi Kết hợp tăng cường âm trầm, âm lượng 1000%, tăng tốc chặn quảng cáo thông minh và hỗ trợ Shorts.
// @description:zh-CN 结合了低音增强、1000% 音量、智能广告拦截加速和 Shorts 支持。
// @description:zh-TW 結合了低音增強、1000% 音量、智能廣告攔截加速和 Shorts 支持。
// @namespace http://tampermonkey.net/
// @version 1.2
// @author Pascal
// @match https://www.youtube.com/*
// @icon https://www.youtube.com/s/desktop/ee47b5e0/img/logos/favicon_144x144.png
// @grant none
// @run-at document-start
// @license MIT
// ==/UserScript==
(function() {
'use strict';
const SETTINGS = {
startDelayMs: 2000,
fastSpeed: 15,
turboSpeedShort: 2.0,
checkInterval: 100,
logoColor: "#00FFCC"
};
let audioCtx, source, gainNode, bassFilter;
let isAudioInited = false;
let isAdActive = false;
let adStartedAt = 0;
const tripleControlClass = 'custom-ultimate-wrapper';
const shortsSliderClassname = 'custom-shorts-volume-slider';
function initAudio() {
const video = document.querySelector('video');
if (!video || isAudioInited) return;
try {
audioCtx = new (window.AudioContext || window.webkitAudioContext)();
source = audioCtx.createMediaElementSource(video);
gainNode = audioCtx.createGain();
bassFilter = audioCtx.createBiquadFilter();
bassFilter.type = "lowshelf";
bassFilter.frequency.value = 150;
source.connect(bassFilter);
bassFilter.connect(gainNode);
gainNode.connect(audioCtx.destination);
isAudioInited = true;
} catch (e) { console.error("Audio Init Error", e); }
}
function handleAdsAndStyle() {
const video = document.querySelector('video');
const ad = document.querySelector('.ad-showing, .ad-interrupting');
const overlay = document.querySelector('ytd-enforcement-message-view-model');
if (overlay) {
overlay.remove();
document.body.style.overflow = "auto";
}
if (video && ad) {
if (!isAdActive) {
isAdActive = true;
adStartedAt = Date.now();
}
video.muted = true;
const timeElapsed = Date.now() - adStartedAt;
const timeLeft = video.duration - video.currentTime;
if (video.duration < 10) {
video.playbackRate = SETTINGS.turboSpeedShort;
} else {
if (timeElapsed < SETTINGS.startDelayMs) {
video.playbackRate = 1.0;
} else if (timeLeft > 5.0) {
video.playbackRate = SETTINGS.fastSpeed;
} else {
video.playbackRate = 1.0;
}
}
const skipBtn = document.querySelector('.ytp-ad-skip-button, .ytp-ad-skip-button-modern, .ytp-skip-ad-button');
if (skipBtn) skipBtn.click();
} else if (video && isAdActive) {
isAdActive = false;
video.playbackRate = 1.0;
video.muted = false;
}
const logo = document.querySelector('ytd-logo svg, a#logo svg');
if (logo) logo.style.setProperty('fill', SETTINGS.logoColor, 'important');
}
function createControlPair(color, title) {
const $container = document.createElement('span');
$container.className = tripleControlClass;
$container.style.cssText = 'display: inline-flex; align-items: center; height: 100%; vertical-align: middle; margin-right: 8px;';
const $btn = document.createElement('button');
$btn.className = 'ytp-button';
$btn.title = title;
$btn.style.cssText = 'display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 100%; cursor: pointer; padding: 0; border: none; background: none;';
const svgNS = "http://www.w3.org/2000/svg";
const $svg = document.createElementNS(svgNS, "svg");
$svg.setAttribute("viewBox", "0 0 36 36");
$svg.setAttribute("width", "100%"); $svg.setAttribute("height", "100%");
const $path = document.createElementNS(svgNS, "path");
$path.setAttribute("d", "M18,11 L18,25 M11,18 L25,18");
$path.setAttribute("stroke", color); $path.setAttribute("stroke-width", "3"); $path.setAttribute("fill", "none");
$svg.appendChild($path); $btn.appendChild($svg);
const $slider = document.createElement('input');
$slider.type = 'range';
$slider.title = title;
$slider.style.cssText = `display: none; width: 8vw !important; height: 12px; accent-color: ${color}; margin: 0 5px; cursor: pointer; outline: none; border: none;`;
const $label = document.createElement('span');
$label.style.cssText = `display: none; color: ${color}; font-size: 11px; font-weight: bold; min-width: 35px; margin-left: 2px; font-family: Roboto, Arial;`;
$btn.onclick = (e) => {
e.preventDefault();
const show = ($slider.style.display === 'none');
$slider.style.display = $label.style.display = show ? 'inline-block' : 'none';
};
$container.appendChild($btn); $container.appendChild($slider); $container.appendChild($label);
return { $container, $slider, $label };
}
function setupUI() {
const videoPlayer = document.querySelector('#movie_player.html5-video-player');
const ytLeft = document.querySelector('.ytp-left-controls');
const timeDisp = document.querySelector('.ytp-time-display');
if (!videoPlayer || !ytLeft || !timeDisp || document.querySelector('.' + tripleControlClass)) return;
const savedVol = localStorage.getItem('custom-player-volume') ?? 0.4;
const vol = createControlPair('red', 'Volume (100%)');
vol.$slider.min = '0'; vol.$slider.max = '1'; vol.$slider.step = '0.01'; vol.$slider.value = savedVol;
const upVol = () => { vol.$label.textContent = Math.round((vol.$slider.value**2)*100) + "%"; };
vol.$slider.oninput = () => { videoPlayer.setVolume((vol.$slider.value**2)*100); upVol(); };
vol.$slider.onchange = () => localStorage.setItem('custom-player-volume', vol.$slider.value);
upVol();
const boost = createControlPair('yellow', 'Booster (1000%)');
boost.$slider.min = '1'; boost.$slider.max = '10'; boost.$slider.step = '0.1'; boost.$slider.value = '1';
boost.$slider.oninput = () => { initAudio(); if(gainNode) gainNode.gain.value = boost.$slider.value; boost.$label.textContent = boost.$slider.value + "x"; };
boost.$label.textContent = "1x";
const bass = createControlPair('orange', 'Bass Boost');
bass.$slider.min = '0'; bass.$slider.max = '30'; bass.$slider.step = '1'; bass.$slider.value = '0';
bass.$slider.oninput = () => { initAudio(); if(bassFilter) bassFilter.gain.value = bass.$slider.value; bass.$label.textContent = bass.$slider.value + "dB"; };
bass.$label.textContent = "0dB";
timeDisp.after(bass.$container);
timeDisp.after(boost.$container);
timeDisp.after(vol.$container);
videoPlayer.setVolume((savedVol**2)*100);
}
function setupShortsUI() {
const videoPlayer = document.querySelector('#shorts-player.html5-video-player');
if (!videoPlayer || document.querySelector('.' + shortsSliderClassname)) return;
const savedVol = localStorage.getItem('custom-player-volume') ?? 0.4;
videoPlayer.setVolume((savedVol ** 2) * 100);
const $shortsSlider = document.createElement('input');
$shortsSlider.className = shortsSliderClassname;
$shortsSlider.type = 'range';
$shortsSlider.title = 'Shorts Volume';
$shortsSlider.min = '0'; $shortsSlider.max = '1'; $shortsSlider.step = '0.005';
$shortsSlider.value = savedVol;
$shortsSlider.style.cssText = `width: 40vh; position: fixed; right: -100px; bottom: 40vh; transform: rotateZ(-90deg); accent-color: red; z-index: 9999; cursor: pointer;`;
$shortsSlider.oninput = () => { videoPlayer.setVolume(($shortsSlider.value ** 2) * 100); };
$shortsSlider.onchange = () => { localStorage.setItem('custom-player-volume', $shortsSlider.value); };
document.body.appendChild($shortsSlider);
}
// --- LOGIK-ZENTRALE (INTERVAL + OBSERVER) ---
function runChecks() {
handleAdsAndStyle();
const isShorts = window.location.pathname.startsWith('/shorts');
const isWatch = window.location.pathname.startsWith('/watch');
const $sSlider = document.querySelector('.' + shortsSliderClassname);
if (isWatch) setupUI();
if (isShorts) {
setupShortsUI();
if ($sSlider) $sSlider.style.display = 'block';
} else if ($sSlider) {
$sSlider.style.display = 'none';
}
}
// 1. Fallback: Interval für Ad-Blocking (muss schnell sein)
setInterval(runChecks, SETTINGS.checkInterval);
// 2. Sicherheitsnetz: MutationObserver (reagiert auf UI-Änderungen)
const observer = new MutationObserver(runChecks);
const startObserver = setInterval(() => {
if (document.body) {
observer.observe(document.body, { childList: true, subtree: true });
clearInterval(startObserver);
}
}, 500);
const style = document.createElement('style');
style.textContent = `ytd-ad-slot-renderer, #masthead-ad, .ytp-ad-overlay-container, #player-ads { display: none !important; }`;
document.head.appendChild(style);
})();