diff --git a/public/functions.js b/public/functions.js index fe321b5..dd46d41 100644 --- a/public/functions.js +++ b/public/functions.js @@ -418,6 +418,12 @@ let fakect = ' actv'; vidurl = postjson['secure_media']['reddit_video']['dash_url']; hlsurl = postjson['secure_media']['reddit_video']['hls_url']; fallbackurl = postjson['secure_media']['reddit_video']['fallback_url']; + const wiurl = postjson['secure_media']['reddit_video']['width']+"px"; + const heurl = postjson['secure_media']['reddit_video']['height']+"px"; + if(typeof wiurl != "undefined"){ + const wiurl = "100%"; + const heurl = "240px"; + } //returnpost +=' '; vidposter = postjson["preview"]; if(typeof vidposter == "undefined"){ @@ -427,7 +433,7 @@ let fakect = ' actv'; vidposter = postjson["preview"]["images"]["0"]["source"]["url"]; } - returnpost +=''; + returnpost +=''; } else {returnpost += 'crosspost';} returnpost += ''; diff --git a/public/index.html b/public/index.html index b1fb0bc..4ce57fc 100644 --- a/public/index.html +++ b/public/index.html @@ -92,7 +92,7 @@ doit(); -