Skip to content

Commit 8dc59e5

Browse files
committed
finish fix to building URL with encoded params
1 parent 4fa4e26 commit 8dc59e5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

website/static/js/main.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ function getLinkAndIframe() {
121121
params.start_at_slide = parseInt(e_startatslide.value, 10);
122122
}
123123

124-
if (e_width.value > 0) {
125-
params.width = e_width.value;
124+
if (e_width.value.trim().match(/^\d+%?$/)) {
125+
params.width = e_width.value.trim();
126126
}
127-
if (e_height.value > 0) {
128-
params.height = e_height.value;
127+
if (e_height.value.trim().match(/^\d+%?$/)) {
128+
params.height = e_height.value.trim();
129129
}
130130

131131
let source_url = urlBase + "embed/index.html";
@@ -143,7 +143,7 @@ function getLinkAndIframe() {
143143
iframe += " webkitallowfullscreen mozallowfullscreen allowfullscreen frameborder='0'></iframe>";
144144

145145
theobj.iframe = iframe;
146-
theobj.link = vars;
146+
theobj.link = source_url;
147147
theobj.copybox = iframe;
148148
return theobj;
149149
};

0 commit comments

Comments
 (0)