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

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() {
const $p = getVideoPopup($iframe)
const $p = getVideoPopup($iframe);
if($p.is(':visible')){
$p.animate({opacity: 0}, 800).then(() => {$p.hide();});
}

@ -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;
});
};

Loading…
Cancel
Save