Recently I wanted to operate the company's business system (web page) directly in emacs
So I used elisp
to write a websocket server
, and then I wrote a client
in the business webpage using Grease Monkey Script. After connecting, I call a function in emacs
to send instructions to the client. After receiving the instructions, the client executes the corresponding instructions. DOM operation, but after the operation is completed, the web page will pop up the alert
window, and you must click OK.
Can I use js to control the alert? Let alert
not be displayed or press Enter automatically after displaying?
thank you all
The
alert()
function actually calls thewindow.alert()
function, so it is very simple to stop it from being displayed. Just add a line directly to your scriptThat’s it.
Accident or not? Violent or not?
If the pop-up window pops up by the alert() method of native Javascript, it cannot be closed through JS code. It is recommended to use a custom pop-up window to implement the function, such as using x0popup to replace the pop-up window function. We hope to adopt it!