gPass/chrome_addon/background.js

18 lines
451 B
JavaScript
Raw Normal View History

2015-01-27 21:10:55 +01:00
chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse) {
if (request.type == "notification")
{
options = {
type: "basic",
title : "gPass",
message : request.options.message,
2015-01-29 21:19:29 +01:00
iconUrl:chrome.extension.getURL("gpass_icon_64.png")
2015-01-27 21:10:55 +01:00
};
chrome.notifications.create("gPass", options, function(){});
window.setTimeout(function() {chrome.notifications.clear("gPass", function(){})}, 2000);
}
});