Reputation: 123
I know background pages show nothing in Chrome extensions, but I am trying to show a dialog using jQuery ui to replace the alert. I would like to know if its possible to show a dialog on the background page.
Upvotes: 1
Views: 459
Reputation: 13741
If you just need to show icon and some text in the alert maybe you could use HTML5 notifications API (extension needs "notifications" permission). HTML Notifications API - More Info
Another thing you could do is change your browser_action/page_action icon to exclamation point or something like that and rely on user seeing it and clicking on it, then you display your message in the popup window.
If neither of those works for you than you will have to insert your HTML inside the currently opened tab. This could confuse users into thinking that your extension message is actually from the website they were on.
Upvotes: 0
Reputation: 578
not sure where you would show since the background page never shows.. you may want to use content scripts to show it on whatever page you are running on and trigger it to display there from the background page via a
Upvotes: 1