js-reverse-automation-hook-close

Override the window.close function to prevent forced page closures.

543|79|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/Fausto-404/js-reverse-automation--skill --skill js-reverse-automation-hook-close
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: js-reverse-automation-hook-close
Source: https://github.com/Fausto-404/js-reverse-automation--skill/tree/main/js-reverse-automation/references/antidebug/hook-close
Command: npx skills add https://github.com/Fausto-404/js-reverse-automation--skill --skill js-reverse-automation-hook-close

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents websites from forcibly closing the current browser tab or window, which can interrupt your analysis or workflow.

Core Features & Use Cases

  • Override window.close: Replaces the native window.close function with a no-operation function, effectively disabling its ability to close the page.
  • Use Case: When analyzing a website that attempts to close the tab upon detecting debugging tools or specific user actions, this skill ensures the tab remains open for continued inspection.

Quick Start

Enable the hook close skill to prevent the current page from being closed.

Frequently Asked Questions about js-reverse-automation-hook-close

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stop a website from forcibly closing the browser tab during reverse engineering?

To stop a website from forcibly closing the browser tab during reverse engineering, you can override the native `window.close` function with a no-operation function. This prevents anti-debugging scripts from terminating your analysis session.

How do I bypass anti-debugging mechanisms that call window.close?

To bypass anti-debugging mechanisms that call `window.close`, you override the native function with a no-operation function. This effectively disables the script's ability to close the page, ensuring the tab remains open for continued inspection.

Can I disable window.close in JavaScript without additional dependencies?

Yes, you can disable `window.close` in JavaScript without additional dependencies. The override is achieved by replacing the native function directly in the browser environment, requiring no external libraries or setup.

Why does the browser tab close automatically when I open developer tools?

The browser tab closes automatically when you open developer tools because the website implements anti-debugging techniques that trigger `window.close`. Overriding this function prevents the unsolicited page closure and keeps the analysis environment accessible.

What are the limitations of overriding window.close to prevent page closure?

The limitation of overriding `window.close` to prevent page closure is that it only targets this specific function. It does not block other anti-debugging techniques or scripts that might freeze the browser or redirect the page instead of closing it.