DEV Community

Tao Liu
Tao Liu

Posted on

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)