BlockPup

Blocks unwanted popups with whitelist/blocklist control and interactive dialogs.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

작성자
0xArCHDeViL
일일 설치 수
0
총 설치 수
22
평점
0 1 0
버전
0.8
생성일
2025-08-23
갱신일
2025-08-24
크기
51.8KB
라이선스
MIT
적용 사이트
모든 사이트

BlockPup – Advanced Popup Interceptor and Manager

BlockPup is a powerful userscript designed to put an end to intrusive popup windows while giving you fine-grained control over which sites are allowed or blocked. Instead of silently letting websites hijack your browsing with unwanted tabs, BlockPup intercepts popup requests and prompts you with clear choices—block, allow once, whitelist permanently, or blacklist permanently.

This script is built with flexibility, usability, and persistence in mind. Whether you’re tired of ad-driven popups or simply want to maintain stricter browsing hygiene, BlockPup provides an elegant and customizable solution.


Key Features

  1. Popup Interception

    • Replaces the native window.open() with a controlled interceptor.
    • Detects and intercepts popup attempts from links, scripts, and form submissions targeting new tabs/windows.
  2. Interactive Decision Dialog

    • When a popup is detected, a clean and modern overlay is displayed.
    • Options include:
      • Allow Once: Permit the popup temporarily.
      • Always Allow…: Whitelist a domain or specific pattern for future popups.
      • Always Block…: Blacklist a domain or pattern to block future attempts.
  3. Whitelist and Blocklist Management

    • Maintain persistent domain and pattern-based rules.
    • Default whitelist includes safe local addresses (localhost, 127.0.0.1).
    • Add or remove patterns dynamically through an in-browser management dialog.
    • Fully integrated with Userscript Manager storage APIs (GM_setValue, GM_getValue).
  4. Pattern Matching Engine

    • Supports wildcard-based patterns (*.domain.com/*).
    • Converts patterns into efficient regex for accurate matching.
    • Caching mechanism reduces redundant lookups and improves performance.
  5. User Interface

    • Styled with attention to detail and responsive design.
    • Automatically adapts to light and dark mode based on system preferences.
    • Clean typography and visual hierarchy for effortless interaction.
  6. Menu Integration

    • Adds convenient Userscript Manager menu commands:
      • Manage Whitelist
      • Manage Blocklist

Technical Highlights

  • Popup Hijacking: Overrides window.open and intercepts user-triggered navigation (<a target="_blank"> and <form target="_blank">).
  • Shadow DOM Encapsulation: Ensures dialogs and management UIs don’t conflict with site styles.
  • Persistent Storage: User preferences are stored using Userscript Manager value storage, surviving browser restarts.
  • Dynamic Caching: Rule lookups are cached for five minutes to balance performance and real-time accuracy.
  • Robust Removal and Editing: Users can manage lists interactively, removing or editing rules with minimal effort.

Use Cases

  • Block malicious popups on shady sites.
  • Allow trusted domains (e.g., Google Drive or GitHub auth flows) without manual intervention each time.
  • Maintain a tailored browsing environment with minimal disruption.

Requirements

  • Userscript Manager: Violentmonkey, Tampermonkey, or compatible alternatives.
  • Browser Support: Works on all modern browsers supporting ES6 and shadow DOM.

Author & License

  • Author: 0xArCHDeViL
  • License: Free to use and modify under personal discretion.