diff --git a/popup.html b/popup.html index 6e223ba..95b9c90 100644 --- a/popup.html +++ b/popup.html @@ -71,6 +71,23 @@ width: fit-content; } + /* NOTIFICATIONS */ + #notificationBanner { + display: none; + background-color: #f8f3d6; + font-size: .9em; + line-height: 1.3em; + padding: 1em; + } + #notificationBanner span { + display: none; + } + #notificationBanner span[style*="display: block"] + span[style*="display: block"]{ + padding-top: .75em; + margin-top: .75em; + border-top: 1px solid #000; + } + /* POWER TOGGLE */ #power { cursor: pointer; @@ -237,6 +254,14 @@ > +
+ + Chromium users: Due to a browser bug, + this extension may stop working after an update. If this happens, try restarting your browser, + turning the extension off and on via your browser's extension settings (chrome://extensions/), + and/or reinstalling the extension. + +
diff --git a/popup.js b/popup.js index 5a05960..26bd7ff 100644 --- a/popup.js +++ b/popup.js @@ -219,6 +219,16 @@ function setBreezeWiki(setting, storeSetting = true) { // Main function that runs on-load document.addEventListener('DOMContentLoaded', function () { + notificationBanner = document.getElementById('notificationBanner'); + + // If running Chromium, show warning about service worker bug + if (navigator.userAgent.match(/Chrom[e|ium]/)) { + notificationBanner.style.display = 'block'; + document.getElementById('notificationBannerBug').style.display = 'block'; + } + + loadBreezeWikiOptions(); + // Listener for settings page in new tab: document.getElementById('openSettings').addEventListener('click', function () { chrome.tabs.create({'url': chrome.runtime.getURL('settings.html')}); diff --git a/settings.html b/settings.html index e380e25..b9877bc 100644 --- a/settings.html +++ b/settings.html @@ -106,6 +106,14 @@ line-height: 1.3em; padding: 1em; } + #notificationBanner span { + display: none; + } + #notificationBanner span[style*="display: block"] + span[style*="display: block"]{ + padding-top: .75em; + margin-top: .75em; + border-top: 1px solid #000; + } /* GLOBAL SETTINGS SECTION */ .options { @@ -289,15 +297,23 @@ >
- Enjoying Indie Wiki Buddy? Please leave a review! -
- Chrome -   |   - Firefox -   |   - Hide this message -

- Having issues or ideas for improvement? Please contact me! + + Chromium users: Due to a browser bug, + this extension may stop working after an update. If this happens, try restarting your browser, + turning the extension off and on via your browser's extension settings (chrome://extensions/), + and/or reinstalling the extension. + + + Enjoying Indie Wiki Buddy? Please leave a review! +
+ Chrome +   |   + Firefox +   |   + Hide this message +

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

Global settings

diff --git a/settings.js b/settings.js index 635ea55..09818d4 100644 --- a/settings.js +++ b/settings.js @@ -507,6 +507,17 @@ function setBreezeWiki(setting, storeSetting = true) { // Main function that runs on-load document.addEventListener('DOMContentLoaded', function () { + + notificationBanner = document.getElementById('notificationBanner'); + + // If running Chromium, show warning about service worker bug + console.log('wooo'); + if (navigator.userAgent.match(/Chrom[e|ium]/)) { + console.log('weee'); + notificationBanner.style.display = 'block'; + document.getElementById('notificationBannerBug').style.display = 'block'; + } + // Count number of times settings have been opened // Purposefully using local storage instead of sync chrome.storage.local.get({ 'countSettingsOpened': 0 }, function (item) { @@ -517,19 +528,20 @@ document.addEventListener('DOMContentLoaded', function () { // and if the banner hasn't been previously dismissed chrome.storage.local.get({ 'hideReviewReminder': false }, function (item) { if (!item.hideReviewReminder && ((countSettingsOpened - 1) % 5 === 0)) { - document.getElementById('notificationBanner').style.display = 'block'; + notificationBanner.style.display = 'block'; + document.getElementById('notificationBannerReview').style.display = ' block'; // 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'; - }); + notificationBanner.style.display = 'none'; + }); } }); });