From 6e5b76890446f71c6b2c6710c0bf2fad31a98d9b Mon Sep 17 00:00:00 2001 From: Sipachev Igor Date: Wed, 23 Mar 2022 12:56:34 +0700 Subject: [PATCH] =?UTF-8?q?=D0=90=D0=B4=D0=B0=D0=BF=D1=82=D0=B8=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BB=20=D1=87=D1=82=D0=BE=D0=B1=D1=8B=20?= =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=BB=D0=BE=20=D0=B2=D0=BD?= =?UTF-8?q?=D0=B5=20=D0=BF=D0=BB=D0=B0=D0=B3=D0=B8=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- popup/src/classes/Service/NotificationCleaner.ts | 6 +++--- popup/src/components/script.ts | 5 +++++ popup/src/components/template.html | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/popup/src/classes/Service/NotificationCleaner.ts b/popup/src/classes/Service/NotificationCleaner.ts index 7677b33..fd0a2b2 100644 --- a/popup/src/classes/Service/NotificationCleaner.ts +++ b/popup/src/classes/Service/NotificationCleaner.ts @@ -1,19 +1,19 @@ export class NotificationCleaner { enable () { - chrome.storage.sync.set({ 'need-clean-notification': true }, function () { + chrome.storage && chrome.storage.sync.set({ 'need-clean-notification': true }, function () { console.log('need-clean-notification: ' + true) }) } disable () { - chrome.storage.sync.set({ 'need-clean-notification': false }, function () { + chrome.storage && chrome.storage.sync.set({ 'need-clean-notification': false }, function () { console.log('need-clean-notification: ' + false) }) } state (): Promise { return new Promise((resolve, reject) => { - chrome.storage.sync.get(['need-clean-notification'], function (result) { + chrome.storage && chrome.storage.sync.get(['need-clean-notification'], function (result) { console.log('Value currently is ' + result['need-clean-notification']) resolve(result['need-clean-notification'] || false) }) diff --git a/popup/src/components/script.ts b/popup/src/components/script.ts index e8eb89b..51f12e5 100644 --- a/popup/src/components/script.ts +++ b/popup/src/components/script.ts @@ -17,4 +17,9 @@ Vue.use(VueClipboard) }) export default class HelloWorld extends Vue { tab = 'person' + + isPlugin (): boolean { + console.log(chrome) + return !!chrome.tabs + } } diff --git a/popup/src/components/template.html b/popup/src/components/template.html index be5c380..0d0f7a4 100644 --- a/popup/src/components/template.html +++ b/popup/src/components/template.html @@ -7,7 +7,7 @@
Mocks
-
+
Ember
@@ -18,7 +18,7 @@
-
+