From 280ede3db28847a6ef31ccac0fd9439aded842be Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 1 Jul 2021 15:55:34 -0700 Subject: [PATCH] Improve opendir_image.js. --- Javascript/opendir_image.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Javascript/opendir_image.js b/Javascript/opendir_image.js index 8a81a19..81fbd9a 100644 --- a/Javascript/opendir_image.js +++ b/Javascript/opendir_image.js @@ -20,8 +20,8 @@ var has_started = false; var CSS = ` body { background-color: #fff; } audio, video { display: block; } -audio { width: ${audio_width}px; } -video { height: ${video_height}px; } +audio { width: ${audio_width}px; max-width: 100% } +video { height: ${video_height}px; max-width: 100% } img { display: block; height: ${image_height}px; max-width: 100%; } a { color: #000 !important; } .control_panel { position: relative; background-color: #aaa; min-height: 10px; width: 100%; } @@ -145,7 +145,7 @@ function create_odi_div(url) try { - var basename = decodeURI(get_basename(url)); + var basename = decodeURIComponent(get_basename(url)); } catch (exc) {