diff options
author | MaZderMind | 2015-12-21 11:26:14 +0100 |
---|---|---|
committer | MaZderMind | 2015-12-21 11:26:14 +0100 |
commit | 8111fe3e997f2bf4cd7a3d9b17f3c936c065e301 (patch) | |
tree | 36355853aeed88de7b60e653fb69f2ea924464f1 /assets | |
parent | e2baebf453aafd48e050540a4f29982934cea813 (diff) |
close subtitles-popup, too
Diffstat (limited to '')
-rw-r--r-- | assets/js/lustige-subtitles.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/assets/js/lustige-subtitles.js b/assets/js/lustige-subtitles.js index 40676e5..e8df92b 100644 --- a/assets/js/lustige-subtitles.js +++ b/assets/js/lustige-subtitles.js @@ -31,7 +31,15 @@ MediaElementPlayer.prototype.buildsubtitles = function(player, controls, layers, frontend_url = $('.js-subtitles-settings').data('frontend-url'), room = $('.video-wrap').data('subtitles-room-id'); - window.open(frontend_url+''+room, 'subtitles-'+room, 'width=1000,height=560'); + if(window.subtitles_window) + { + window.subtitles_window.close(); + window.subtitles_window = null; + } + else + { + window.subtitles_window = window.open(frontend_url+''+room, 'subtitles-'+room, 'width=1000,height=560'); + } }); |