Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// ==UserScript==
// @name Close Inactive ZD tabs with CTRL+SHIFT+Z
// @match https://**
// ==/UserScript==
(function() {
'use strict'
document.body.addEventListener('keyup', e => {
if (e.shiftKey && e.ctrlKey && e.key === 'Z') {
const closeButtons = [...document.querySelectorAll('div[role="tab"][data-selected="false"] button[aria-label="Close"]')]
closeButtons.forEach(btn =>

This comment has been minimized.

Copy link

@Chett23 Chett23 commented Apr 8, 2020

@jondcoleman, How would one implement this? is the script embedded into a ZAT platform app or is it implemented via browser extension?


This comment has been minimized.

Copy link
Owner Author

@jondcoleman jondcoleman commented Apr 8, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment