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,6 +297,13 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div id="notificationBanner">
|
<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>
|
||||||
|
<span id="notificationBannerReview">
|
||||||
Enjoying Indie Wiki Buddy? Please leave a review!
|
Enjoying Indie Wiki Buddy? Please leave a review!
|
||||||
<br />
|
<br />
|
||||||
<a id="reviewReminderChromeLink" target="_blank" href="https://chrome.google.com/webstore/detail/indie-wiki-buddy/fkagelmloambgokoeokbpihmgpkbgbfm">Chrome</a>
|
<a id="reviewReminderChromeLink" target="_blank" href="https://chrome.google.com/webstore/detail/indie-wiki-buddy/fkagelmloambgokoeokbpihmgpkbgbfm">Chrome</a>
|
||||||
|
@ -298,6 +313,7 @@
|
||||||
<a id="reviewReminderHideLink" href="#">Hide this message</a>
|
<a id="reviewReminderHideLink" href="#">Hide this message</a>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
Having issues or ideas for improvement? Please <a target="_blank" href="https://getindie.wiki/#contact">contact me</a>!
|
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>
|
||||||
|
|
16
settings.js
16
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,7 +528,8 @@ 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 () {
|
||||||
|
@ -528,7 +540,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||||
});
|
});
|
||||||
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