massive update, probably broken
[dotfiles/.git] / .config / chromium / Default / Extensions / lngfncacljheahfpahadgipefkbagpdl / 1.7.5_0 / js / background.js
diff --git a/.config/chromium/Default/Extensions/lngfncacljheahfpahadgipefkbagpdl/1.7.5_0/js/background.js b/.config/chromium/Default/Extensions/lngfncacljheahfpahadgipefkbagpdl/1.7.5_0/js/background.js
new file mode 100644 (file)
index 0000000..3a15ca3
--- /dev/null
@@ -0,0 +1,19 @@
+chrome.runtime.onInstalled.addListener(function(details) {\r
+       const ver = chrome.runtime.getManifest().version;\r
+       if(details.reason == 'update') {\r
+               chrome.notifications.create(null, {\r
+                       type:'basic',\r
+                       iconUrl:"images/icon.png",\r
+                       title:"Ultrawide Video updated",\r
+                       message:"Update log: Version "+ver+" we're back!!! (updates coming soon)",\r
+               }, function(updateNotificationId) {\r
+                       chrome.notifications.onClicked.addListener(function(notificationId) {\r
+                               if(notificationId === updateNotificationId) {\r
+                                       chrome.tabs.create({url:"https://github.com/wltrsjames/Ultrawide-Video"});\r
+                                       chrome.notifications.clear(updateNotificationId);\r
+                               }\r
+                       });\r
+               });\r
+       }\r
+       chrome.storage.local.set({'extensionMode':0}); \r
+});
\ No newline at end of file