如何从后台页面替换webextensions中的window.confirm函数?

时间:2018-11-08 17:40:03

标签: firefox firefox-addon firefox-webextensions

从后台页面替换webextensions中的window.confirm函数是什么? 在Firefox WebExtensions中确认其not support

在Firefox中带有按钮和requireInteraction also its not support的通知。

我需要一条消息,除非用户确认或拒绝,否则该消息不会消失。

也许有用于此类消息的API?这样的问题窗口将是完美的:
enter image description here

1 个答案:

答案 0 :(得分:0)

您可以使用confirm()tabs.executeScrip()注入页面(取决于是否允许)并处理响应。