I am trying to close the current open tab after 1 second.
Here is what I tried :
$(function(e){
setTimeout("window.top.close()", 1000)
)};
The code works in Edge but it does not work in Firefox.
I get this warning into the console when I try to close a page in Firefox :
Scripts may not close windows that were not opened by script.
How can I close the page?