Greasy Fork is available in English.

Total Cookie Blocker

Blocks all cookies on all sites by overriding document.cookie API (client-side only).

Από την 05/08/2025. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey 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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Total Cookie Blocker
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Blocks all cookies on all sites by overriding document.cookie API (client-side only).
// @author       Wassim
// @match        *://*/*
// @run-at       document-start
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Override document.cookie to block read and write
    Object.defineProperty(document, 'cookie', {
        get: function() {
            console.log('[Cookie Blocker] Attempted to read cookies');
            return ''; // Return empty to simulate no cookies
        },
        set: function(value) {
            console.log('[Cookie Blocker] Blocked cookie write:', value);
            // Do not actually set the cookie
        },
        configurable: false
    });

    // Delete all accessible cookies
    function deleteAllCookies() {
        const cookies = document.cookie.split("; ");
        for (let c of cookies) {
            const eqPos = c.indexOf("=");
            const name = eqPos > -1 ? c.substr(0, eqPos) : c;
            document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/";
        }
        console.log('[Cookie Blocker] All cookies deleted.');
    }

    // Try deleting cookies on DOM ready
    window.addEventListener('DOMContentLoaded', deleteAllCookies);
})();