From e53e67cd3ca6f5e1e1d12ddf7525d4b84b791ab6 Mon Sep 17 00:00:00 2001 From: gzbender Date: Mon, 3 Jun 2019 08:36:26 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D0=BF=D0=B0=D0=BF=20=D0=B2=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=86=D0=B5=20=D0=B2=D0=B8=D0=B4=D0=B5=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/js/modules/content.js | 2 +- web/src/js/utils.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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; }); };