From 599e863346e2eef1b8307a2ce40bbd0dd8c97f30 Mon Sep 17 00:00:00 2001 From: Kevin Payravi Date: Thu, 27 Apr 2023 01:53:24 -0400 Subject: [PATCH] Hiding review reminder once store link is clicked --- settings.html | 8 ++++---- settings.js | 10 ++++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/settings.html b/settings.html index caf8397..1afbe1c 100644 --- a/settings.html +++ b/settings.html @@ -283,13 +283,13 @@
Enjoying Indie Wiki Buddy? Please leave a review!
- Chrome + Chrome   |   - Firefox + Firefox   |   - Hide this message + Hide this message

- Having issues or ideas for improvement? Please contact me! + Having issues or ideas for improvement? Please contact me!

Global settings

diff --git a/settings.js b/settings.js index eb5fa0c..fc76f7b 100644 --- a/settings.js +++ b/settings.js @@ -456,8 +456,14 @@ document.addEventListener('DOMContentLoaded', function () { if (!item.hideReviewReminder && ((countSettingsOpened - 1) % 5 === 0)) { document.getElementById('notificationBanner').style.display = 'block'; - // Hide review reminder if user clicks 'hide' link: - document.getElementById('hideReviewReminderLink').addEventListener('click', function () { + // Disable future review reminders if user clicks links: + document.getElementById('reviewReminderChromeLink').addEventListener('click', function () { + chrome.storage.local.set({ 'hideReviewReminder': true }); + }); + document.getElementById('reviewReminderFirefoxLink').addEventListener('click', function () { + chrome.storage.local.set({ 'hideReviewReminder': true }); + }); + document.getElementById('reviewReminderHideLink').addEventListener('click', function () { chrome.storage.local.set({ 'hideReviewReminder': true }); document.getElementById('notificationBanner').style.display = 'none'; });