From b73aaddb59e5786e49475ac141e996d895411395 Mon Sep 17 00:00:00 2001 From: sy-b <94835959+sy-b@users.noreply.github.com> Date: Sat, 16 Apr 2022 19:57:36 +0530 Subject: [PATCH] Show changelog only on installation fixes #534 --- Extensions/combined/ryd.background.js | 9 ++++++--- 1 file 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) => {