从json对象我得到三个值,如title,price和url。通过使用镀铬丰富的通知,我可以显示值here is the example of what i'm showing。但是当我在亚马逊i want to show price's of this product like this打开产品时,而不是chrome.notification。这是我用于chrome.notifications的代码
function notifyMe(title,price) {
if (!Notification) {
alert('Desktop notifications not available in your browser. Try Chromium.');
return;
}
var notification = new Notification(title, {
icon: "../images/fev.png",
body: price,
});
notification.onclick = function () {
window.open("https://www.google.com/");
};
}
我应该如何获得输出,就像我展示的那样(不像chrome.notification)