DEV Community

Tao Liu
Tao Liu

Posted on

1

How to Close Chrome window after X seconds

// ==UserScript==
// @name         Close window after X seconds
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://yoursite.com/*
// @grant        window.close
// ==/UserScript==

(function() {
    'use strict';

    setTimeout (window.close, 5000);

})();
Enter fullscreen mode Exit fullscreen mode

https://stackoverflow.com/questions/19761241/window-close-and-self-close-do-not-close-the-window-in-chrome/34875656#34875656

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay