DENEME

YouTube reklamlarını otomatik olarak atlar ve ana sayfadaki reklamları gizler.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         DENEME
// @namespace    http://tampermonkey.net/
// @version      2.2
// @description  YouTube reklamlarını otomatik olarak atlar ve ana sayfadaki reklamları gizler.
// @author       Asosyal
// @match        https://www.youtube.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=mediaagent.rf.gd
// @grant        none
// @license      MIT
// ==/UserScript==

// YouTube Reklam Atlatma ve Ana Sayfa Reklam Gizleme Sistemi

setInterval(function(){
    // YouTube reklamlarını atlatma
    let adOverlay = document.querySelector(".ytp-ad-overlay-close-button");
    if (adOverlay) {
        adOverlay.click();
        console.log("Reklam Afişi Gizlendi!");
    }

    let skipButton = document.querySelector(".ytp-ad-skip-button-container");
    if (skipButton) {
        skipButton.click();
        console.log("Reklam Atlandı!");
    }

    // Ana sayfadaki reklamları gizleme
    let homePageAds = document.querySelectorAll(".style-scope ytd-video-masthead-ad-v3-renderer"); // "your-homepage-ad-class" kısmını gerçek reklam etiketleriyle değiştirin
    if (homePageAds) {
        homePageAds.forEach(function(ad) {
            ad.style.display = "none";
            console.log("Ana Sayfa Reklamı Kaldırıldı!");
        });
    }
}, 1000);