1

From a json object i'm getting three values like title, price and url. By using chrome rich notifications i'm able to display the values here is the example of what i'm showing. But instead of chrome.notification when I'm opening a product in amazon i want to show price's of this product like this. Here is the code i had used for 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/");      
    };
}

What should i do to get output like the one i showed(not like chrome.notification)

Karthik
  • 1,199
  • 2
  • 14
  • 23
  • What trouble did you meet when you use HTML notifications? – Haibara Ai Aug 02 '16 at 10:54
  • I want to show price urls of the product I'm viewing in amazon like that. I've showed in second image. – Karthik Aug 02 '16 at 10:59
  • it's not allowed to use HTML markup in notifications. However, have you ever tried to use content scripts to inject something fixed in bottom-right viewport? – Haibara Ai Aug 02 '16 at 11:14
  • Using content scripts only, i'm fetching the values and displaying the chrome.notification, i have no idea about **injecting script** to a web page. – Karthik Aug 02 '16 at 11:23
  • http://stackoverflow.com/questions/9515704/building-a-chrome-extension-inject-code-in-a-page-using-a-content-script – Haibara Ai Aug 02 '16 at 11:36

0 Answers0