replace var with let

Co-authored-by: AHOHNMYC <24810600+AHOHNMYC@users.noreply.github.com>
This commit is contained in:
bonjinnorenka 2023-08-30 00:22:55 +09:00 committed by GitHub
parent 4bb9a618be
commit 37cd696a46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ class invidious_embed{
} }
} }
removeEventListner(eventname,func){ removeEventListner(eventname,func){
var internal_eventname; let internal_eventname;
if(eventname in invidious_embed.eventname_table){ if(eventname in invidious_embed.eventname_table){
internal_eventname = invidious_embed.eventname_table[eventname]; internal_eventname = invidious_embed.eventname_table[eventname];
} }
@ -63,7 +63,7 @@ class invidious_embed{
search_params.append('enablejsapi','1'); search_params.append('enablejsapi','1');
if(typeof options.playerVars==='object'){ if(typeof options.playerVars==='object'){
this.option_playerVars = options.playerVars; this.option_playerVars = options.playerVars;
for(var x in options.playerVars){ for (let x in options.playerVars){
if(typeof x==='string'&&typeof options.playerVars[x]==='string'){ if(typeof x==='string'&&typeof options.playerVars[x]==='string'){
search_params.append(x,options.playerVars[x]); search_params.append(x,options.playerVars[x]);
} }