Discussies » Scriptaanvragen

Automatically close the tab by the specified link

§
Geplaatst: 24-07-2021

"watch?v=null"
------
How to make it so that when you click on the link: https://www.youtube.com/watch?v=null
the browser tab automatically closes?

What code is needed for this?
Thanks.

§
Geplaatst: 24-07-2021
Bijgewerkt: 24-07-2021

// ==UserScript==
// @name close links
// @namespace CloseLinks
// @version 0.1
// @description close link
// @author hacker09
// @match https://www.youtube.com/watch?v=null
// @grant window.close
// ==/UserScript==

window.top.close(); //Close the link

Reactie plaatsen

Log in om antwoord te geven.

长期地址
遇到问题?请前往 GitHub 提 Issues。