попап в конце видео

remotes/origin/feature/end-video-popup-28-05-19
gzbender 7 years ago
parent eef6d4d85c
commit e53e67cd3c
  1. 2
      web/src/js/modules/content.js
  2. 6
      web/src/js/utils.js

@ -41,7 +41,7 @@ $(document).ready(function () {
} }
}); });
player.on('play', function() { player.on('play', function() {
const $p = getVideoPopup($iframe) const $p = getVideoPopup($iframe);
if($p.is(':visible')){ if($p.is(':visible')){
$p.animate({opacity: 0}, 800).then(() => {$p.hide();}); $p.animate({opacity: 0}, 800).then(() => {$p.hide();});
} }

@ -8,8 +8,8 @@ export const rupluralize = (value, args, addValue = true) => {
}; };
export const loadScript = (url, onload) => { export const loadScript = (url, onload) => {
return new Promise(function (resolve, reject) { return new Promise(resolve => {
for (const script of document.getElementsByTagName('script')) { for (let script of document.getElementsByTagName('script')) {
if (script.src == url) { if (script.src == url) {
onload && onload(); onload && onload();
resolve(); resolve();
@ -22,7 +22,7 @@ export const loadScript = (url, onload) => {
script.onload = function () { script.onload = function () {
onload && onload.apply(this, arguments); onload && onload.apply(this, arguments);
resolve.apply(this, arguments); resolve.apply(this, arguments);
} };
script.src = url; script.src = url;
}); });
}; };

Loading…
Cancel
Save