mysql - 如何创建通知 chrome 扩展?

标签 mysql google-chrome google-chrome-extension notifications

我想创建一个 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/

相关文章:

mysql - 如何在where子句中写mysql正则表达式?

javascript - 将当前时间转换为 WebKit/Chrome 17 位时间戳

javascript - Gmail.js 错误 : api. dom.email 使用无效元素/id 调用

javascript - 我的扩展程序遇到问题

javascript - 创建 chrome 扩展以将数据发送到本地主机服务器

mysql - 无法将 365 kb sql 文件导入 WampServer 上的 phpmyadmin

mysql - 如何添加第二个 MySQL 增量

mysql - 速度选择与加入

google-chrome - Chrome 搜索引擎具有 "I feel lucky"被重定向通知破坏

javascript - 没有详细信息的 Chrome 未捕获错误?