blob: ed3bda7404364478023e5e6c98a24ba169a7d58e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/* eslint-env mozilla/chrome-script */
let dialogObserverTopic = "common-dialog-loaded";
function dialogObserver(subj, topic, data) {
subj.document.querySelector("dialog").acceptDialog();
sendAsyncMessage("promptAccepted");
}
addMessageListener("init", message => {
Services.obs.addObserver(dialogObserver, dialogObserverTopic);
sendAsyncMessage("initDone");
});
addMessageListener("cleanup", message => {
Services.obs.removeObserver(dialogObserver, dialogObserverTopic);
sendAsyncMessage("cleanupDone");
});
|