aboutsummaryrefslogtreecommitdiff
path: root/src/main/assets/embed.js
diff options
context:
space:
mode:
authorGravatar alx2019-03-16 23:56:27 +0300
committerGravatar alx2019-03-16 23:56:27 +0300
commit06105f76dbfa3b65e63ed06f9c4d5107bd49ed88 (patch)
tree5702c01cec9688039d891f4a711878706101c1c5 /src/main/assets/embed.js
parent3ea4cd1942fa4e763034da11c5fa429407b67829 (diff)
parenta49105285d0d7719d7f222a507af2d5ac5b4bdb1 (diff)
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/main/assets/embed.js')
-rw-r--r--src/main/assets/embed.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/assets/embed.js b/src/main/assets/embed.js
index d4cbab8e..3b8946bf 100644
--- a/src/main/assets/embed.js
+++ b/src/main/assets/embed.js
@@ -72,8 +72,8 @@ function makeIframe(src, w, h, scrolling='no') {
}
function makeResizableToRatio(element, ratio) {
- element.dataset['ratio'] = ratio;
- makeResizable(element, w => w * element.dataset['ratio']);
+ element.setAttribute('data-ratio', ratio);
+ makeResizable(element, w => w * element.getAttribute('data-ratio'));
}
// calcHeight :: Number -> Number -- calculate element height for a given width