Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chrome.runtime.onMessage.addListener(function(response, sender, sendResponse) {
- var options = {
- type: "image",
- title: "Rättegång",
- message: response.test5,
- iconUrl: "/icons/icon64.png",
- buttons: [
- { title: 'Mark' },
- { title: 'Ignore' }
- ]
- };
- var xhr = new XMLHttpRequest();
- xhr.open("GET", "http://impulse.nu/?q=i&ti=" + Math.round((new Date).getTime() / 1e3), true);
- xhr.responseType = "blob";
- xhr.onload = function(){
- var blob = this.response;
- options.imageUrl = window.URL.createObjectURL(blob);
- chrome.notifications.create("notifyId", options, function(notId){});
- };
- xhr.send();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement