Add notice for Chromium users regarding update bug
parent
32bc047419
commit
2f2c67b119
25
popup.html
25
popup.html
|
@ -71,6 +71,23 @@
|
||||||
width: fit-content;
|
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 TOGGLE */
|
||||||
#power {
|
#power {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -237,6 +254,14 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="notificationBanner">
|
||||||
|
<span id="notificationBannerBug">
|
||||||
|
Chromium users: Due to a <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1271154" target="_blank">browser bug</a>,
|
||||||
|
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.
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<script type="text/javascript" src="popup.js"></script>
|
<script type="text/javascript" src="popup.js"></script>
|
||||||
</html>
|
</html>
|
||||||
|
|
10
popup.js
10
popup.js
|
@ -219,6 +219,16 @@ function setBreezeWiki(setting, storeSetting = true) {
|
||||||
|
|
||||||
// Main function that runs on-load
|
// Main function that runs on-load
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
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:
|
// Listener for settings page in new tab:
|
||||||
document.getElementById('openSettings').addEventListener('click', function () {
|
document.getElementById('openSettings').addEventListener('click', function () {
|
||||||
chrome.tabs.create({'url': chrome.runtime.getURL('settings.html')});
|
chrome.tabs.create({'url': chrome.runtime.getURL('settings.html')});
|
||||||
|
|
|
@ -106,6 +106,14 @@
|
||||||
line-height: 1.3em;
|
line-height: 1.3em;
|
||||||
padding: 1em;
|
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 */
|
/* GLOBAL SETTINGS SECTION */
|
||||||
.options {
|
.options {
|
||||||
|
@ -289,15 +297,23 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div id="notificationBanner">
|
<div id="notificationBanner">
|
||||||
Enjoying Indie Wiki Buddy? Please leave a review!
|
<span id="notificationBannerBug">
|
||||||
<br />
|
Chromium users: Due to a <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1271154" target="_blank">browser bug</a>,
|
||||||
<a id="reviewReminderChromeLink" target="_blank" href="https://chrome.google.com/webstore/detail/indie-wiki-buddy/fkagelmloambgokoeokbpihmgpkbgbfm">Chrome</a>
|
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/),
|
||||||
<a id="reviewReminderFirefoxLink" target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/indie-wiki-buddy/">Firefox</a>
|
and/or reinstalling the extension.
|
||||||
|
|
</span>
|
||||||
<a id="reviewReminderHideLink" href="#">Hide this message</a>
|
<span id="notificationBannerReview">
|
||||||
<br /><br />
|
Enjoying Indie Wiki Buddy? Please leave a review!
|
||||||
Having issues or ideas for improvement? Please <a target="_blank" href="https://getindie.wiki/#contact">contact me</a>!
|
<br />
|
||||||
|
<a id="reviewReminderChromeLink" target="_blank" href="https://chrome.google.com/webstore/detail/indie-wiki-buddy/fkagelmloambgokoeokbpihmgpkbgbfm">Chrome</a>
|
||||||
|
|
|
||||||
|
<a id="reviewReminderFirefoxLink" target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/indie-wiki-buddy/">Firefox</a>
|
||||||
|
|
|
||||||
|
<a id="reviewReminderHideLink" href="#">Hide this message</a>
|
||||||
|
<br /><br />
|
||||||
|
Having issues or ideas for improvement? Please <a target="_blank" href="https://getindie.wiki/#contact">contact me</a>!
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<h2>Global settings</h2>
|
<h2>Global settings</h2>
|
||||||
|
|
20
settings.js
20
settings.js
|
@ -507,6 +507,17 @@ function setBreezeWiki(setting, storeSetting = true) {
|
||||||
|
|
||||||
// Main function that runs on-load
|
// Main function that runs on-load
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
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
|
// Count number of times settings have been opened
|
||||||
// Purposefully using local storage instead of sync
|
// Purposefully using local storage instead of sync
|
||||||
chrome.storage.local.get({ 'countSettingsOpened': 0 }, function (item) {
|
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
|
// and if the banner hasn't been previously dismissed
|
||||||
chrome.storage.local.get({ 'hideReviewReminder': false }, function (item) {
|
chrome.storage.local.get({ 'hideReviewReminder': false }, function (item) {
|
||||||
if (!item.hideReviewReminder && ((countSettingsOpened - 1) % 5 === 0)) {
|
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:
|
// Disable future review reminders if user clicks links:
|
||||||
document.getElementById('reviewReminderChromeLink').addEventListener('click', function () {
|
document.getElementById('reviewReminderChromeLink').addEventListener('click', function () {
|
||||||
chrome.storage.local.set({ 'hideReviewReminder': true });
|
chrome.storage.local.set({ 'hideReviewReminder': true });
|
||||||
});
|
});
|
||||||
document.getElementById('reviewReminderFirefoxLink').addEventListener('click', function () {
|
document.getElementById('reviewReminderFirefoxLink').addEventListener('click', function () {
|
||||||
chrome.storage.local.set({ 'hideReviewReminder': true });
|
chrome.storage.local.set({ 'hideReviewReminder': true });
|
||||||
});
|
});
|
||||||
document.getElementById('reviewReminderHideLink').addEventListener('click', function () {
|
document.getElementById('reviewReminderHideLink').addEventListener('click', function () {
|
||||||
chrome.storage.local.set({ 'hideReviewReminder': true });
|
chrome.storage.local.set({ 'hideReviewReminder': true });
|
||||||
document.getElementById('notificationBanner').style.display = 'none';
|
notificationBanner.style.display = 'none';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue