Code easy to read by suggestion from code review

Co-authored-by: Samantaz Fox <coding@samantaz.fr>
This commit is contained in:
bonjinnorenka 2023-09-23 18:13:54 +09:00 committed by GitHub
parent c3ea7fb72c
commit 00ae96a7e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 7 deletions

View file

@ -54,11 +54,7 @@ class invidious_embed {
const instance_stats = await fetch(instance_origin + '/api/v1/stats');
if (instance_stats.ok) {
const instance_stats_json = await instance_stats.json();
if (instance_stats_json.software.name === 'invidious') {
return_status = true;
} else {
return_status = false;
}
return_status = (instance_stats_json.software.name === 'invidious');
} else {
return_status = false;
}
@ -139,7 +135,24 @@ class invidious_embed {
this.volume = 100;
this.loop = false;
this.playlistVideoIds = [];
this.eventobject = { ready: [], ended: [], error: [], ratechange: [], volumechange: [], waiting: [], timeupdate: [], loadedmetadata: [], play: [], seeking: [], seeked: [], playerresize: [], pause: [], statechange: [] };
this.eventobject = {
ready: [],
ended: [],
error: [],
ratechange: [],
volumechange: [],
waiting: [],
timeupdate: [],
loadedmetadata: [],
play: [],
seeking: [],
seeked: [],
playerresize: [],
pause: [],
statechange: []
};
let replace_elemnt;
this.isPlaylistVideoList = false;
if (element === undefined || element === null) {