Official Snap.as browser extension for quickly uploading photos.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

25 lines
567 B

  1. chrome.browserAction.onClicked.addListener(function (tab){
  2. chrome.windows.create({
  3. url: "uploader.html",
  4. width: 230,
  5. height: 230,
  6. type: "popup"
  7. }, function(window) {
  8. });
  9. });
  10. chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
  11. var notifID = 'copied';
  12. if (request.success) {
  13. chrome.notifications.create(notifID, {
  14. 'type': 'basic',
  15. 'title': 'Snap.as',
  16. 'message': 'Copied to clipboard!',
  17. 'iconUrl': 'icon128.png',
  18. });
  19. setTimeout(function() {
  20. chrome.notifications.clear(notifID);
  21. }, 2500);
  22. }
  23. });