Skip to content

Commit 98ef474

Browse files
committed
Misc javascript code fixes
1 parent d01ac3e commit 98ef474

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

styles/all/template/webpush.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* global phpbb */
22

3-
'use strict';
4-
53
function PhpbbWebpush() {
4+
'use strict';
5+
66
/** @type {string} URL to service worker */
77
let serviceWorkerUrl = '';
88

@@ -164,7 +164,9 @@ function PhpbbWebpush() {
164164
allowBtn.addEventListener('click', (event) => {
165165
event.stopPropagation();
166166
popup.style.display = 'none';
167-
subscribeButtonHandler({ preventDefault: () => {} });
167+
subscribeButtonHandler({
168+
preventDefault: () => {}
169+
});
168170
});
169171
}
170172

@@ -397,6 +399,8 @@ function PhpbbWebpush() {
397399
}
398400

399401
function domReady(callBack) {
402+
'use strict';
403+
400404
if (document.readyState === 'loading') {
401405
document.addEventListener('DOMContentLoaded', callBack);
402406
} else {
@@ -407,6 +411,8 @@ function domReady(callBack) {
407411
phpbb.webpush = new PhpbbWebpush();
408412

409413
domReady(() => {
414+
'use strict';
415+
410416
/* global phpbbWebpushOptions */
411417
phpbb.webpush.init(phpbbWebpushOptions);
412418
});

0 commit comments

Comments
 (0)