diff --git a/web/src/js/modules/content.js b/web/src/js/modules/content.js index 3724e6b5..ed44855f 100644 --- a/web/src/js/modules/content.js +++ b/web/src/js/modules/content.js @@ -41,7 +41,7 @@ $(document).ready(function () { } }); player.on('play', function() { - const $p = getVideoPopup($iframe) + const $p = getVideoPopup($iframe); if($p.is(':visible')){ $p.animate({opacity: 0}, 800).then(() => {$p.hide();}); } diff --git a/web/src/js/utils.js b/web/src/js/utils.js index 55f68fe2..d50245f0 100644 --- a/web/src/js/utils.js +++ b/web/src/js/utils.js @@ -8,8 +8,8 @@ export const rupluralize = (value, args, addValue = true) => { }; export const loadScript = (url, onload) => { - return new Promise(function (resolve, reject) { - for (const script of document.getElementsByTagName('script')) { + return new Promise(resolve => { + for (let script of document.getElementsByTagName('script')) { if (script.src == url) { onload && onload(); resolve(); @@ -22,7 +22,7 @@ export const loadScript = (url, onload) => { script.onload = function () { onload && onload.apply(this, arguments); resolve.apply(this, arguments); - } + }; script.src = url; }); };