From 0a4b5ffd79ac9944134390c49f46535f40fae2d9 Mon Sep 17 00:00:00 2001 From: ScottDowne Date: Fri, 24 Jun 2011 10:34:49 -0400 Subject: [PATCH] [t611] dynamic change of subtitle accessibility --- plugins/subtitle/popcorn.subtitle.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/subtitle/popcorn.subtitle.js b/plugins/subtitle/popcorn.subtitle.js index 4ed0f86..db24f5d 100755 --- a/plugins/subtitle/popcorn.subtitle.js +++ b/plugins/subtitle/popcorn.subtitle.js @@ -217,7 +217,18 @@ options.accessibility = accessibility; options.toggleSubtitles = function() { - options.selectedLanguage = options.languageSrc.options[ options.languageSrc.selectedIndex ].value; + + options.selectedLanguage = options.languageSrc.options[ options.languageSrc.selectedIndex ].value; + + if ( options.accessibility.checked || options.selectedLanguage !== ( options.language || "") ) { + + options.display = "inline"; + options.container.style.display = options.display; + } else if ( options.selectedLanguage === ( options.language || "") ) { + + options.display = "none"; + options.container.style.display = options.display; + } }; options.accessibility.addEventListener( "change", options.toggleSubtitles, false ); -- 2.43.0