Skip to content

Commit c72d3c4

Browse files
author
meow
committed
semicolons
1 parent eb7e48b commit c72d3c4

File tree

9 files changed

+73
-73
lines changed

9 files changed

+73
-73
lines changed

assets/js/community.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ String.prototype.supplant = function (o) {
66
var r = o[b];
77
return typeof r === 'string' || typeof r === 'number' ? r : a;
88
});
9-
}
9+
};
1010

1111
function hide_youtube_replies(event) {
1212
var target = event.target;
@@ -93,12 +93,12 @@ function get_youtube_replies(target, load_more) {
9393
body.innerHTML = fallback;
9494
}
9595
}
96-
}
96+
};
9797

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

103103
xhr.send();
104104
}

assets/js/embed.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ function get_playlist(plid, retries) {
5858
}
5959
}
6060
}
61-
}
61+
};
6262

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

6868
xhr.ontimeout = function () {
6969
console.log('Pulling playlist failed... ' + retries + '/5');
7070
get_playlist(plid, retries - 1);
71-
}
71+
};
7272

7373
xhr.send();
7474
}
@@ -97,7 +97,7 @@ window.addEventListener('load', function (e) {
9797
}
9898

9999
if (video_data.video_series.length !== 0) {
100-
url.searchParams.set('playlist', video_data.video_series.join(','))
100+
url.searchParams.set('playlist', video_data.video_series.join(','));
101101
}
102102

103103
location.assign(url.pathname + url.search);

assets/js/handlers.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
});
7777

7878
n2a(document.querySelectorAll('[data-onrange="update_volume_value"]')).forEach(function (e) {
79-
var cb = function () { update_volume_value(e); }
79+
var cb = function () { update_volume_value(e); };
8080
e.oninput = cb;
8181
e.onchange = cb;
8282
});
@@ -108,7 +108,7 @@
108108
row.style.display = '';
109109
}
110110
}
111-
}
111+
};
112112

113113
var csrf_token = target.parentNode.querySelector('input[name="csrf_token"]').value;
114114
xhr.send('csrf_token=' + csrf_token);
@@ -137,7 +137,7 @@
137137
row.style.display = '';
138138
}
139139
}
140-
}
140+
};
141141

142142
var csrf_token = target.parentNode.querySelector('input[name="csrf_token"]').value;
143143
xhr.send('csrf_token=' + csrf_token);

assets/js/notifications.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ function get_subscriptions(callback, retries) {
2222
callback(subscriptions);
2323
}
2424
}
25-
}
25+
};
2626

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

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

3737
xhr.send();
3838
}
@@ -41,7 +41,7 @@ function create_notification_stream(subscriptions) {
4141
notifications = new SSE(
4242
'/api/v1/auth/notifications?fields=videoId,title,author,authorId,publishedText,published,authorThumbnails,liveNow', {
4343
withCredentials: true,
44-
payload: 'topics=' + subscriptions.map(function (subscription) { return subscription.authorId }).join(','),
44+
payload: 'topics=' + subscriptions.map(function (subscription) { return subscription.authorId; }).join(','),
4545
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
4646
});
4747
delivered = [];
@@ -68,7 +68,7 @@ function create_notification_stream(subscriptions) {
6868

6969
system_notification.onclick = function (event) {
7070
window.open('/watch?v=' + event.currentTarget.tag, '_blank');
71-
}
71+
};
7272
}
7373

7474
delivered.push(notification.videoId);
@@ -83,7 +83,7 @@ function create_notification_stream(subscriptions) {
8383
'<i class="icon ion-ios-notifications-outline"></i>';
8484
}
8585
}
86-
}
86+
};
8787

8888
notifications.addEventListener('error', handle_notification_error);
8989
notifications.stream();
@@ -92,7 +92,7 @@ function create_notification_stream(subscriptions) {
9292
function handle_notification_error(event) {
9393
console.log('Something went wrong with notifications, trying to reconnect...');
9494
notifications = { close: function () { } };
95-
setTimeout(function () { get_subscriptions(create_notification_stream) }, 1000);
95+
setTimeout(function () { get_subscriptions(create_notification_stream); }, 1000);
9696
}
9797

9898
window.addEventListener('load', function (e) {

assets/js/player.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var options = {
2828
overrideNative: true
2929
}
3030
}
31-
}
31+
};
3232

3333
if (player_data.aspect_ratio) {
3434
options.aspectRatio = player_data.aspect_ratio;
@@ -147,43 +147,43 @@ if (isMobile()) {
147147

148148
buttons = ["playToggle", "volumePanel", "captionsButton"];
149149

150-
if (video_data.params.quality !== 'dash') buttons.push("qualitySelector")
150+
if (video_data.params.quality !== 'dash') buttons.push("qualitySelector");
151151

152152
// Create new control bar object for operation buttons
153153
const ControlBar = videojs.getComponent("controlBar");
154154
let operations_bar = new ControlBar(player, {
155155
children: [],
156156
playbackRates: [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0]
157157
});
158-
buttons.slice(1).forEach(child => operations_bar.addChild(child))
158+
buttons.slice(1).forEach(child => operations_bar.addChild(child));
159159

160160
// Remove operation buttons from primary control bar
161161
primary_control_bar = player.getChild("controlBar");
162162
buttons.forEach(child => primary_control_bar.removeChild(child));
163163

164164
operations_bar_element = operations_bar.el();
165-
operations_bar_element.className += " mobile-operations-bar"
166-
player.addChild(operations_bar)
165+
operations_bar_element.className += " mobile-operations-bar";
166+
player.addChild(operations_bar);
167167

168168
// Playback menu doesn't work when it's initialized outside of the primary control bar
169-
playback_element = document.getElementsByClassName("vjs-playback-rate")[0]
170-
operations_bar_element.append(playback_element)
169+
playback_element = document.getElementsByClassName("vjs-playback-rate")[0];
170+
operations_bar_element.append(playback_element);
171171

172172
// The share and http source selector element can't be fetched till the players ready.
173173
player.one("playing", () => {
174-
share_element = document.getElementsByClassName("vjs-share-control")[0]
175-
operations_bar_element.append(share_element)
174+
share_element = document.getElementsByClassName("vjs-share-control")[0];
175+
operations_bar_element.append(share_element);
176176

177177
if (video_data.params.quality === 'dash') {
178-
http_source_selector = document.getElementsByClassName("vjs-http-source-selector vjs-menu-button")[0]
179-
operations_bar_element.append(http_source_selector)
178+
http_source_selector = document.getElementsByClassName("vjs-http-source-selector vjs-menu-button")[0];
179+
operations_bar_element.append(http_source_selector);
180180
}
181-
})
181+
});
182182
}
183183

184184
// Enable VR video support
185185
if (!video_data.params.listen && video_data.vr && video_data.params.vr_mode) {
186-
player.crossOrigin("anonymous")
186+
player.crossOrigin("anonymous");
187187
switch (video_data.projection_type) {
188188
case "EQUIRECTANGULAR":
189189
player.vr({projection: "equirectangular"});
@@ -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.log('Player has caught up to source, resetting playbackRate.');
284284
player.playbackRate(1);
285285
}
286286
});
@@ -767,12 +767,12 @@ if (window.location.pathname.startsWith("/embed/")) {
767767

768768
// Create hyperlink for current instance
769769
redirect_element = document.createElement("a");
770-
redirect_element.setAttribute("href", `//${window.location.host}/watch?v=${window.location.pathname.replace("/embed/","")}`)
771-
redirect_element.appendChild(document.createTextNode("Invidious"))
770+
redirect_element.setAttribute("href", `//${window.location.host}/watch?v=${window.location.pathname.replace("/embed/","")}`);
771+
redirect_element.appendChild(document.createTextNode("Invidious"));
772772

773-
watch_on_invidious_button.el().appendChild(redirect_element)
774-
watch_on_invidious_button.addClass("watch-on-invidious")
773+
watch_on_invidious_button.el().appendChild(redirect_element);
774+
watch_on_invidious_button.addClass("watch-on-invidious");
775775

776-
cb = player.getChild('ControlBar')
777-
cb.addChild(watch_on_invidious_button)
778-
};
776+
cb = player.getChild('ControlBar');
777+
cb.addChild(watch_on_invidious_button);
778+
}

assets/js/playlist_widget.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function add_playlist_video(target) {
2020
option.innerText = '✓' + option.innerText;
2121
}
2222
}
23-
}
23+
};
2424

2525
xhr.send('csrf_token=' + playlist_data.csrf_token);
2626
}
@@ -44,7 +44,7 @@ function add_playlist_item(target) {
4444
tile.style.display = '';
4545
}
4646
}
47-
}
47+
};
4848

4949
xhr.send('csrf_token=' + playlist_data.csrf_token);
5050
}
@@ -68,7 +68,7 @@ function remove_playlist_item(target) {
6868
tile.style.display = '';
6969
}
7070
}
71-
}
71+
};
7272

7373
xhr.send('csrf_token=' + playlist_data.csrf_token);
7474
}

assets/js/subscribe_widget.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ function subscribe(retries = 5) {
3535
subscribe_button.innerHTML = fallback;
3636
}
3737
}
38-
}
38+
};
3939

4040
xhr.onerror = function () {
4141
console.log('Subscribing failed... ' + retries + '/5');
42-
setTimeout(function () { subscribe(retries - 1) }, 1000);
43-
}
42+
setTimeout(function () { subscribe(retries - 1); }, 1000);
43+
};
4444

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

5050
xhr.send('csrf_token=' + subscribe_data.csrf_token);
5151
}
@@ -75,17 +75,17 @@ function unsubscribe(retries = 5) {
7575
subscribe_button.innerHTML = fallback;
7676
}
7777
}
78-
}
78+
};
7979

8080
xhr.onerror = function () {
8181
console.log('Unsubscribing failed... ' + retries + '/5');
82-
setTimeout(function () { unsubscribe(retries - 1) }, 1000);
83-
}
82+
setTimeout(function () { unsubscribe(retries - 1); }, 1000);
83+
};
8484

8585
xhr.ontimeout = function () {
8686
console.log('Unsubscribing failed... ' + retries + '/5');
8787
unsubscribe(retries - 1);
88-
}
88+
};
8989

9090
xhr.send('csrf_token=' + subscribe_data.csrf_token);
9191
}

0 commit comments

Comments
 (0)