diff options
author | sy-b <94835959+sy-b@users.noreply.github.com> | 2022-04-16 17:27:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-16 17:27:36 +0300 |
commit | b73aaddb59e5786e49475ac141e996d895411395 (patch) | |
tree | be58f414116599b3e53b40ac2a7d538d8254b15d | |
parent | 2e6ed5298b7851b7ea84dcfa298167689f516496 (diff) |
Show changelog only on installation
fixes #534
-rw-r--r-- | Extensions/combined/ryd.background.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Extensions/combined/ryd.background.js b/Extensions/combined/ryd.background.js index 18eb0fa..4139bbe 100644 --- a/Extensions/combined/ryd.background.js +++ b/Extensions/combined/ryd.background.js @@ -74,9 +74,12 @@ api.runtime.onMessage.addListener((request, sender, sendResponse) => { } }); -api.runtime.onInstalled.addListener(() => { - api.tabs.create({url: api.runtime.getURL("/changelog/3/changelog_3.0.html")}); -}) +api.storage.sync.get(['newInstallation'], (result) => { + if (result.newInstallation !== false) { + api.tabs.create({url: api.runtime.getURL("/changelog/3/changelog_3.0.html")}); + } +}); +api.storage.sync.set({'newInstallation': false}); async function sendVote(videoId, vote) { api.storage.sync.get(null, async (storageResult) => { |