From d79ffca82d89b597d04a25c86c112a703cb49dfb Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 1 Feb 2015 10:56:46 -0800 Subject: [PATCH] Control volume in new tabs. --- src/General/Config.coffee | 4 ++++ src/General/Main.coffee | 13 ++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 28e1c5e90..0aea5afea 100755 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -264,6 +264,10 @@ Config = true 'Loop videos opened in their own tabs.' ] + 'Volume in New Tab': [ + true + 'Apply <%= meta.name %> mute and volume settings to videos opened in their own tabs.' + ] 'Menu': 'Menu': [ diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 6ed37aec1..981806ec1 100755 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -63,11 +63,14 @@ Main = boardID: g.BOARD.ID filename: pathname[pathname.length - 1] Redirect.navigate URL - else if Conf['Loop in New Tab'] and video = $ 'video' - video.loop = true - video.controls = false - video.play() - ImageCommon.addControls video + else if video = $ 'video' + if Conf['Volume in New Tab'] + Volume.setup video + if Conf['Loop in New Tab'] + video.loop = true + video.controls = false + video.play() + ImageCommon.addControls video return if Conf['Normalize URL'] and g.VIEW is 'thread'