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

Commit c7fca2c

Browse files
committed
force subscribe btn visibility
1 parent 5a3882b commit c7fca2c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-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">
3+
<div id="notification-bar" class="alert alert-warning" hidden>
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 = true;
29+
if (isPushSupported && permission === 'default') {
30+
document.getElementById('notification-bar').hidden = false;
3131
}
3232
OneSignal.on('notificationPermissionChange', () => {
3333
document.getElementById('notification-bar').hidden = true;

static/css/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
font-weight: bold !important;
2626
color: inherit !important;
2727
text-decoration: underline;
28+
display: inline-block !important;
2829
}
2930

3031
#slider{

0 commit comments

Comments
 (0)