我想创建一个 google chrome 扩展,当在 mysql 数据库中添加新记录时通知用户!有人可以帮助我吗? 谢谢。
最佳答案
请引用此页面。
Use the chrome.notifications API to create rich notifications using templates and show these notifications to users in the system tray.
https://developer.chrome.com/docs/extensions/reference/notifications/
chrome.notifications.create(
"name-for-notification",
{
type: "basic",
iconUrl: "image.jpeg",
title: "This is a notification",
message: "hello there!",
},
function () {}
);
您可以像这样创建通知。
编辑:请不要忘记在 manifest.json
文件中添加 "notifications"
权限
关于mysql - 如何创建通知 chrome 扩展?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18797636/