Pornhub Ultra Ad Blocker

Tüm reklamları engeller (banner, pop-up, video pre-roll, Trafficky) ve header'ı korur

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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.

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

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         Pornhub Ultra Ad Blocker
// @namespace    http://tampermonkey.net/
// @version      2.0
// @description  Tüm reklamları engeller (banner, pop-up, video pre-roll, Trafficky) ve header'ı korur
// @author       Volkan
// @match        https://www.pornhub.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Reklamları silme fonksiyonu
    function removeAds() {
        // Standart banner, iframe ve container reklamlar
        document.querySelectorAll(
            '#ph-main-ad, .ad-container, .ads, iframe[src*="ads"], .adBanner'
        ).forEach(el => {
            if (!el.closest('header')) el.remove();
        });

        // Overlay ve pop-up reklamlar
        document.querySelectorAll('.overlayAd, .popupAd, .popUp').forEach(el => el.remove());

        // Trafficky ve karmaşık rastgele reklam containerları
        document.querySelectorAll(
            '.tj-inban-container, .bddfnhclec1756647663941, .dfgfgbccfe'
        ).forEach(el => {
            if (!el.closest('header')) el.remove();
        });

        // Rastgele ID’li Trafficky benzeri reklamlar
        document.querySelectorAll('div[id^="b"]').forEach(el => {
            if (el.querySelector('.tj-inban-icon, iframe[src*="traffic"]')) {
                if (!el.closest('header')) el.remove();
            }
        });
    }

    // Sayfa yüklemesinde çalıştır
    removeAds();

    // Dinamik reklam eklemelerini izle
    const observer = new MutationObserver(() => removeAds());
    observer.observe(document.body, { childList: true, subtree: true });

    // Video pre-roll reklamları atlamak
    const skipAdsInterval = setInterval(() => {
        const skipBtn = document.querySelector('.videoAdUiSkipButton');
        if(skipBtn) skipBtn.click();
    }, 1000);

    // WebSocket üzerinden gelen gizli reklam verilerini engelle
    const originalWebSocket = window.WebSocket;
    window.WebSocket = function(url, protocols) {
        const socket = new originalWebSocket(url, protocols);
        const originalSend = socket.send;
        socket.send = function(data) {
            if (data && data.includes && data.includes('ad')) {
                console.log('Reklam verisi engellendi:', data);
                return;
            }
            originalSend.apply(socket, arguments);
        };
        return socket;
    };
})();