From: Anna Sobiepanek Date: Thu, 1 Jul 2010 20:54:28 +0000 (-0400) Subject: added accessibility option to subtitles that shows all subtitles at all times ireleva... X-Git-Tag: v0.1~49^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=1fb9b67095a334d1d2f48927631eee17ba660763;p=popcorn-js.git added accessibility option to subtitles that shows all subtitles at all times irelevant of the language --- diff --git a/index.html b/index.html index d646b3e..b4a082a 100644 --- a/index.html +++ b/index.html @@ -81,19 +81,27 @@

Choose your language

with help from
Google Translate and - jQuery + jQuery
+ All subtitles (accessibility)
+
diff --git a/popcorn.js b/popcorn.js index 8dd2b2e..44a9f2f 100644 --- a/popcorn.js +++ b/popcorn.js @@ -181,7 +181,7 @@ } this.onIn = function() { var i = document.getElementById("language").selectedIndex; - if( document.getElementById("language").options[i].getAttribute("val") !== ( this.params.language || "en") ) { + if( ( document.getElementById("language").options[i].getAttribute("val") !== ( this.params.language || "en") ) || ( document.getElementById('accessibility').checked ) ) { google.language.translate(this.text, '', document.getElementById("language").options[i].getAttribute("val"), function(result) { SubtitleCommand.subDiv.innerHTML = result.translation; });