# tekshteint/adblock-blocker-blocker architecture

> Architecture diagram of the GitHub repository tekshteint/adblock-blocker-blocker, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tekshteint/adblock-blocker-blocker
- Repository: https://github.com/tekshteint/adblock-blocker-blocker

## Overview

##### Project type and purpose
- This is a simple browser userscript whose sole purpose is to remove or hide “anti-adblocker” overlays/pop-ups on arbitrary web pages.
- There is no backend server, database, or multi-service orchestration—everything runs client-side via a userscript manager (ViolentMonkey/TamperMonkey).

##### File structure
- Top-level files:
- Adblock-Blocker-Blocker.user.js (the userscript)
- README.MD, LICENSE, .gitignore, .gitattributes
- No “src,” “lib,” or “backend” directories—this is a single-file script that is installed into the browser.

##### README for additional insights
- Installation instructions refer to ViolentMonkey/TamperMonkey as the host environment.
- Usage simply describes “nuking” adblocker overlays by running the script on page load.
- No mention of external APIs or services beyond the user’s normal browsing.

##### Main components
a. Internet / Target Website (any site that enforces anti-adblock pop-ups)
b. Browser (Chrome/Firefox/Edge)
c. Userscript Manager Extension (ViolentMonkey/TamperMonkey)
d. Adblock-Blocker-Blocker.user.js (the injected script)
e. Web Page DOM (document object model where overlays appear)
f. End User (reads and interacts with the cleaned page)

##### Relationships and interactions
- The Browser issues an HTTP(S) request to the Website, which returns HTML/CSS/JS.
- Upon page load, the Userscript Manager injects Adblock-Blocker-Blocker.user.js into the page context.
- The userscript scans the DOM for known anti-adblock element patterns, then removes/hides them.
- The cleaned DOM is rendered to the user.
- Optionally: GitHub Repository as the origin for the script, where the user updates or the manager fetches new versions.

##### Architectural patterns and design principles
- Client-side DOM manipulation pattern: script runs in the “content script” context of a browser extension.
- Single responsibility: the script does one thing—detect and remove anti-adblock UI elements.
- Extensibility: the repo can be extended with new selectors or blocking rules.

##### Technologies, frameworks, or libraries
- Plain JavaScript (no external libraries bundled)
- Userscript headers for cross-browser compatibility
- ViolentMonkey/TamperMonkey injection APIs (e.g., @match, @grant directives)

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "External Resources"
        Internet["Internet / Website"]:::storage
    end

    subgraph "GitHub Repository"
        README["README.MD"]:::storage
        LICENSE["LICENSE"]:::storage
        GITIGNORE[".gitignore"]:::storage
        GITATTR[".gitattributes"]:::storage
        GITHUB_SCRIPT["Adblock-Blocker-Blocker.user.js"]:::storage
    end

    subgraph "Browser Side Components"
        Browser["Browser<br/>(Chrome/Firefox/Edge)"]:::browser
        Extension["Userscript Manager<br/>(ViolentMonkey/TamperMonkey)"]:::browser
        Script["Adblock-Blocker-Blocker.user.js"]:::browser
        DOM["Web Page DOM"]:::browser
        User["End User"]:::user
    end

    Internet -->|"HTTP(S) request"| Browser
    Browser -->|"loads page"| DOM
    Browser -->|"hosts extension"| Extension
    Extension -->|"injects script on page load"| Script
    Script -->|"manipulates DOM"| DOM
    DOM -->|"renders cleaned page"| Browser
    Browser -->|"displays to"| User

    Extension -->|"auto-update fetch"| GITHUB_SCRIPT

    click README "https://github.com/tekshteint/adblock-blocker-blocker/blob/main/README.MD"
    click LICENSE "https://github.com/tekshteint/adblock-blocker-blocker/tree/main/LICENSE"
    click GITIGNORE "https://github.com/tekshteint/adblock-blocker-blocker/blob/main/.gitignore"
    click GITATTR "https://github.com/tekshteint/adblock-blocker-blocker/blob/main/.gitattributes"
    click GITHUB_SCRIPT "https://github.com/tekshteint/adblock-blocker-blocker/blob/main/Adblock-Blocker-Blocker.user.js"

    classDef browser fill:#cce5ff,stroke:#333,stroke-width:1px
    classDef storage fill:#ccffcc,stroke:#333,stroke-width:1px
    classDef user fill:#ffebcc,stroke:#333,stroke-width:1px
```
