closeTabByJS icon

closeTabByJS

Extension Actions

How to install Open in Chrome Web Store
CRX ID
ipokkmbpcicendfjcnlmonfejdbckomm
Description from extension meta

javascript can close chrome tab through chrome extension

Image from store
closeTabByJS
Description from store

[github link](https://github.com/jdk137/closeTabByJS)

Javacript can not close page in recent version chrome, because it's not safe. But we can close it with this extension installed.

warning: This extension can only work in http(s)://localhost or 127.0.0.1, to show some local demo.

function closeWindow () {
var event = new Event('closeTabMessage');
document.body.dispatchEvent(event);
};

Run this function in javascript, you can close chrome tab now.