Skip to content

Commit 3431a1b

Browse files
author
meow
committed
console.warn and info instead of log
1 parent 026ea52 commit 3431a1b

File tree

6 files changed

+28
-28
lines changed

6 files changed

+28
-28
lines changed

assets/js/community.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function get_youtube_replies(target, load_more) {
9696
};
9797

9898
xhr.ontimeout = function () {
99-
console.log('Pulling comments failed.');
99+
console.warn('Pulling comments failed.');
100100
body.innerHTML = fallback;
101101
};
102102

assets/js/embed.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function get_playlist(plid, retries) {
55
if (retries === undefined) retries = 5;
66

77
if (retries <= 0) {
8-
console.log('Failed to pull playlist');
8+
console.warn('Failed to pull playlist');
99
return;
1010
}
1111

@@ -62,12 +62,12 @@ function get_playlist(plid, retries) {
6262
};
6363

6464
xhr.onerror = function () {
65-
console.log('Pulling playlist failed... ' + retries + '/5');
65+
console.warn('Pulling playlist failed... ' + retries + '/5');
6666
setTimeout(function () { get_playlist(plid, retries - 1); }, 1000);
6767
};
6868

6969
xhr.ontimeout = function () {
70-
console.log('Pulling playlist failed... ' + retries + '/5');
70+
console.warn('Pulling playlist failed... ' + retries + '/5');
7171
get_playlist(plid, retries - 1);
7272
};
7373

assets/js/notifications.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ function get_subscriptions(callback, retries) {
2525
};
2626

2727
xhr.onerror = function () {
28-
console.log('Pulling subscriptions failed... ' + retries + '/5');
28+
console.warn('Pulling subscriptions failed... ' + retries + '/5');
2929
setTimeout(function () { get_subscriptions(callback, retries - 1); }, 1000);
3030
};
3131

3232
xhr.ontimeout = function () {
33-
console.log('Pulling subscriptions failed... ' + retries + '/5');
33+
console.warn('Pulling subscriptions failed... ' + retries + '/5');
3434
get_subscriptions(callback, retries - 1);
3535
};
3636

@@ -54,7 +54,7 @@ function create_notification_stream(subscriptions) {
5454
}
5555

5656
var notification = JSON.parse(event.data);
57-
console.log('Got notification:', notification);
57+
console.info('Got notification:', notification);
5858

5959
if (start_time < notification.published && !delivered.includes(notification.videoId)) {
6060
if (Notification.permission === 'granted') {
@@ -90,7 +90,7 @@ function create_notification_stream(subscriptions) {
9090
}
9191

9292
function handle_notification_error(event) {
93-
console.log('Something went wrong with notifications, trying to reconnect...');
93+
console.warn('Something went wrong with notifications, trying to reconnect...');
9494
notifications = { close: function () { } };
9595
setTimeout(function () { get_subscriptions(create_notification_stream); }, 1000);
9696
}

assets/js/player.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ player.on('volumechange', function () {
280280

281281
player.on('waiting', function () {
282282
if (player.playbackRate() > 1 && player.liveTracker.isLive() && player.liveTracker.atLiveEdge()) {
283-
console.log('Player has caught up to source, resetting playbackRate.');
283+
console.info('Player has caught up to source, resetting playbackRate.');
284284
player.playbackRate(1);
285285
}
286286
});
@@ -477,7 +477,7 @@ function set_all_video_times(times) {
477477
try {
478478
storage.setItem(save_player_pos_key, JSON.stringify(times));
479479
} catch (e) {
480-
console.debug('set_all_video_times: ' + e);
480+
console.warn('set_all_video_times: ' + e);
481481
}
482482
} else {
483483
storage.removeItem(save_player_pos_key);
@@ -492,7 +492,7 @@ function get_all_video_times() {
492492
try {
493493
return JSON.parse(raw);
494494
} catch (e) {
495-
console.debug('get_all_video_times: ' + e);
495+
console.warn('get_all_video_times: ' + e);
496496
}
497497
}
498498
}

assets/js/subscribe_widget.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function subscribe(retries) {
1414
if (retries === undefined) retries = 5;
1515

1616
if (retries <= 0) {
17-
console.log('Failed to subscribe.');
17+
console.warn('Failed to subscribe.');
1818
return;
1919
}
2020

@@ -40,12 +40,12 @@ function subscribe(retries) {
4040
};
4141

4242
xhr.onerror = function () {
43-
console.log('Subscribing failed... ' + retries + '/5');
43+
console.warn('Subscribing failed... ' + retries + '/5');
4444
setTimeout(function () { subscribe(retries - 1); }, 1000);
4545
};
4646

4747
xhr.ontimeout = function () {
48-
console.log('Subscribing failed... ' + retries + '/5');
48+
console.warn('Subscribing failed... ' + retries + '/5');
4949
subscribe(retries - 1);
5050
};
5151

@@ -57,7 +57,7 @@ function unsubscribe(retries) {
5757
retries = 5;
5858

5959
if (retries <= 0) {
60-
console.log('Failed to subscribe');
60+
console.warn('Failed to subscribe');
6161
return;
6262
}
6363

@@ -83,12 +83,12 @@ function unsubscribe(retries) {
8383
};
8484

8585
xhr.onerror = function () {
86-
console.log('Unsubscribing failed... ' + retries + '/5');
86+
console.warn('Unsubscribing failed... ' + retries + '/5');
8787
setTimeout(function () { unsubscribe(retries - 1); }, 1000);
8888
};
8989

9090
xhr.ontimeout = function () {
91-
console.log('Unsubscribing failed... ' + retries + '/5');
91+
console.warn('Unsubscribing failed... ' + retries + '/5');
9292
unsubscribe(retries - 1);
9393
};
9494

assets/js/watch.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function get_playlist(plid, retries) {
121121
var playlist = document.getElementById('playlist');
122122

123123
if (retries <= 0) {
124-
console.log('Failed to pull playlist');
124+
console.warn('Failed to pull playlist');
125125
playlist.innerHTML = '';
126126
return;
127127
}
@@ -194,7 +194,7 @@ function get_playlist(plid, retries) {
194194
playlist.innerHTML =
195195
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3><hr>';
196196

197-
console.log('Pulling playlist timed out... ' + retries + '/5');
197+
console.warn('Pulling playlist timed out... ' + retries + '/5');
198198
setTimeout(function () { get_playlist(plid, retries - 1); }, 1000);
199199
};
200200

@@ -203,7 +203,7 @@ function get_playlist(plid, retries) {
203203
playlist.innerHTML =
204204
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3><hr>';
205205

206-
console.log('Pulling playlist timed out... ' + retries + '/5');
206+
console.warn('Pulling playlist timed out... ' + retries + '/5');
207207
get_playlist(plid, retries - 1);
208208
};
209209

@@ -215,7 +215,7 @@ function get_reddit_comments(retries) {
215215
var comments = document.getElementById('comments');
216216

217217
if (retries <= 0) {
218-
console.log('Failed to pull comments');
218+
console.warn('Failed to pull comments');
219219
comments.innerHTML = '';
220220
return;
221221
}
@@ -265,7 +265,7 @@ function get_reddit_comments(retries) {
265265
comments.children[0].children[1].children[0].onclick = swap_comments;
266266
} else {
267267
if (video_data.params.comments[1] === 'youtube') {
268-
console.log('Pulling comments failed... ' + retries + '/5');
268+
console.warn('Pulling comments failed... ' + retries + '/5');
269269
setTimeout(function () { get_youtube_comments(retries - 1); }, 1000);
270270
} else {
271271
comments.innerHTML = fallback;
@@ -275,12 +275,12 @@ function get_reddit_comments(retries) {
275275
};
276276

277277
xhr.onerror = function () {
278-
console.log('Pulling comments failed... ' + retries + '/5');
278+
console.warn('Pulling comments failed... ' + retries + '/5');
279279
setTimeout(function () { get_reddit_comments(retries - 1); }, 1000);
280280
};
281281

282282
xhr.ontimeout = function () {
283-
console.log('Pulling comments failed... ' + retries + '/5');
283+
console.warn('Pulling comments failed... ' + retries + '/5');
284284
get_reddit_comments(retries - 1);
285285
};
286286

@@ -292,7 +292,7 @@ function get_youtube_comments(retries) {
292292
var comments = document.getElementById('comments');
293293

294294
if (retries <= 0) {
295-
console.log('Failed to pull comments');
295+
console.warn('Failed to pull comments');
296296
comments.innerHTML = '';
297297
return;
298298
}
@@ -349,14 +349,14 @@ function get_youtube_comments(retries) {
349349
xhr.onerror = function () {
350350
comments.innerHTML =
351351
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
352-
console.log('Pulling comments failed... ' + retries + '/5');
352+
console.warn('Pulling comments failed... ' + retries + '/5');
353353
setTimeout(function () { get_youtube_comments(retries - 1); }, 1000);
354354
};
355355

356356
xhr.ontimeout = function () {
357357
comments.innerHTML =
358358
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
359-
console.log('Pulling comments failed... ' + retries + '/5');
359+
console.warn('Pulling comments failed... ' + retries + '/5');
360360
get_youtube_comments(retries - 1);
361361
};
362362

@@ -417,7 +417,7 @@ function get_youtube_replies(target, load_more, load_replies) {
417417
};
418418

419419
xhr.ontimeout = function () {
420-
console.log('Pulling comments failed.');
420+
console.warn('Pulling comments failed.');
421421
body.innerHTML = fallback;
422422
};
423423

0 commit comments

Comments
 (0)