Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

chrome extension background script confirm message title

I have a chrome extension. In its background script I want to present a confirm() dialog box to accept (Ok/Cancel) input from user. Have no problem doing that.

The only problem is that the title of message shows up as "chrome-extension://32_char_extension_id". Not what I want to see. On the other hand in the safari extension (global.html) the title shows up as the "Extension name". Would be nice to have the same functionality in Chrome Extension.

Any idea if there is a way to see extension name in the message box instead of the ID. Anything I"m doing it wrong ?

I understand confirm() is the not the recommended solution for prompt to take user input (as it is a blocking call). But this seems like a quicker solution for what I"m doing. The other alternatives I"m looking into using JQuery message boxes. But if I can resolve this thru simple confirm(), it would be great for now.

like image 428
Feru Avatar asked Mar 13 '26 05:03

Feru


1 Answers

You can't change window.confirm() title, it is for anti-phishing.

You should try other approaches such as Bootstrap Modal

like image 145
Haibara Ai Avatar answered Mar 14 '26 19:03

Haibara Ai



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!