|
- chrome.browserAction.onClicked.addListener(function (tab){
- chrome.windows.create({
- url: "uploader.html",
- width: 230,
- height: 230,
- type: "popup"
- }, function(window) {
- });
- });
-
- chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
- var notifID = 'copied';
- if (request.success) {
- chrome.notifications.create(notifID, {
- 'type': 'basic',
- 'title': 'Snap.as',
- 'message': 'Copied to clipboard!',
- 'iconUrl': 'icon128.png',
- });
- setTimeout(function() {
- chrome.notifications.clear(notifID);
- }, 2500);
- }
- });
|