Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Remove some logs from push_worker.js #2083

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/js/lib/push_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ switch (location.hostname) {

self.addEventListener('push', function(event) {
var obj = event.data.json()
console.log('[SW] push', obj)
//console.log('[SW] push', obj)

var hasActiveWindows = false
var checksPromise = new Promise(function (resolve, reject) {
Expand All @@ -26,7 +26,7 @@ self.addEventListener('push', function(event) {
var muteUntil = result[0]
var lastAliveTime = result[1]
return clients.matchAll({type: 'window'}).then(function(clientList) {
console.log('matched clients', clientList)
//console.log('matched clients', clientList)
hasActiveWindows = clientList.length > 0
if (hasActiveWindows) {
console.log('Supress notification because some instance is alive')
Expand Down Expand Up @@ -82,7 +82,7 @@ self.addEventListener('activate', function(event) {


self.addEventListener('message', function(event) {
console.log('[SW] on message', event.data)
//console.log('[SW] on message', event.data)
var client = event.ports && event.ports[0] || event.source
if (event.data.type == 'ping') {
if (event.data.localNotifications) {
Expand Down