Added no videoID = redir to dir.html and fixed comment
This commit is contained in:
parent
807825838f
commit
bbda2e4cb2
|
@ -2,11 +2,16 @@ new URL(location.href).searchParams.get('video')
|
|||
const params = new URL(location.href).searchParams;
|
||||
const videoID = params.get('video');
|
||||
|
||||
//redirect to directory if no ${videoID} given
|
||||
const urlContainParams = window.location.search.length === 0;
|
||||
if (urlContainParams) window.location.href = 'dir.html';
|
||||
|
||||
|
||||
console.log("Good Day!");
|
||||
console.log("Attempting to load Content!");
|
||||
console.log(`using video ID:"${videoID}"`);
|
||||
|
||||
//Set Thumbnail of Videoi based on ${videoID}
|
||||
//Set Thumbnail of Video based on ${videoID}
|
||||
document.getElementById("media").setAttribute("poster", `vidSrc/Video/${videoID}/thumb.png`);
|
||||
console.log("Setting Thumbnail");
|
||||
|
||||
|
|
Loading…
Reference in New Issue