aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorMaZderMind2015-12-21 11:26:14 +0100
committerMaZderMind2015-12-21 11:26:14 +0100
commit8111fe3e997f2bf4cd7a3d9b17f3c936c065e301 (patch)
tree36355853aeed88de7b60e653fb69f2ea924464f1 /assets
parente2baebf453aafd48e050540a4f29982934cea813 (diff)
close subtitles-popup, too
Diffstat (limited to '')
-rw-r--r--assets/js/lustige-subtitles.js10
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');
+ }
});