Until recently this worked in all browsers to close the current window:
window.open('','_self').close();
That no longer seems to be the case in Chrome, Firefox and Edge. I can fix it in Firefox by opening about:config and setting dom.allow_scripts_to_close_windows to true. Does anyone know of a remedy for the others?