Skip to content
This repository was archived by the owner on May 2, 2021. It is now read-only.

Commit 5a3882b

Browse files
committed
update
1 parent 8a52d54 commit 5a3882b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/_includes/header.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Header Start -->
22
<header>
3-
<div id="notification-bar" class="alert alert-warning" hidden>
3+
<div id="notification-bar" class="alert alert-warning">
44
<span class='onesignal-customlink-container'></span>
55
<button type="button" class="close" aria-label="Chiudi"><span aria-hidden="true">&times;</span></button>
66
</div>

src/_js/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ OneSignal.push([
2626
'getNotificationPermission',
2727
(permission) => {
2828
const isPushSupported = OneSignal.isPushNotificationsSupported();
29-
if (isPushSupported && permission === 'default') {
30-
document.getElementById('notification-bar').hidden = false;
29+
if (!isPushSupported || permission !== 'default') {
30+
document.getElementById('notification-bar').hidden = true;
3131
}
3232
OneSignal.on('notificationPermissionChange', () => {
3333
document.getElementById('notification-bar').hidden = true;

0 commit comments

Comments
 (0)