From 935cab53147405769a204850ec6a1df84a16e1f8 Mon Sep 17 00:00:00 2001 From: Kushagra Gour Date: Fri, 1 Sep 2017 09:42:00 +0530 Subject: [PATCH] set onboardmodal event as soon as the modal is seen --- src/script.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/script.js b/src/script.js index 60ca0af..fdaf18c 100644 --- a/src/script.js +++ b/src/script.js @@ -2206,15 +2206,14 @@ customEditorFontInput if (!result.lastSeenVersion) { onboardModal.classList.add('is-modal-visible'); trackEvent('ui', 'onboardModalSeen'); - // set the current version as seen on closing the onboard modal + chrome.storage.sync.set( + { + lastSeenVersion: version + }, + function() {} + ); + // set some initial preferences on closing the onboard modal utils.once(document, 'overlaysClosed', function() { - chrome.storage.sync.set( - { - lastSeenVersion: version - }, - function() {} - ); - chrome.storage.sync.set( { replaceNewTab: onboardShowInTabOptionBtn.classList.contains(