Index: chrome/third_party/chromevox/chromeVoxChromeBackgroundScript.js |
diff --git a/chrome/third_party/chromevox/chromeVoxChromeBackgroundScript.js b/chrome/third_party/chromevox/chromeVoxChromeBackgroundScript.js |
index 7672ddc7f7ddb73f57c817411850f6942a69ba49..84ca2705bc41c54c92c98dfc5586412f20f822fc 100644 |
--- a/chrome/third_party/chromevox/chromeVoxChromeBackgroundScript.js |
+++ b/chrome/third_party/chromevox/chromeVoxChromeBackgroundScript.js |
@@ -1,4 +1,4 @@ |
-var goog=goog||{};goog.global=this;goog.exportPath_=function(a,b,c){a=a.split(".");c=c||goog.global;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c=c[d]?c[d]:c[d]={}:c[d]=b};goog.define=function(a,b){var c=b;goog.exportPath_(a,c)};goog.DEBUG=!1;goog.LOCALE="en";goog.TRUSTED_SITE=!0;goog.STRICT_MODE_COMPATIBLE=!1;goog.provide=function(a){goog.exportPath_(a)}; |
+var goog=goog||{};goog.global=this;goog.isDef=function(a){return void 0!==a};goog.exportPath_=function(a,b,c){a=a.split(".");c=c||goog.global;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&goog.isDef(b)?c[d]=b:c=c[d]?c[d]:c[d]={}};goog.define=function(a,b){var c=b;goog.exportPath_(a,c)};goog.DEBUG=!1;goog.LOCALE="en";goog.TRUSTED_SITE=!0;goog.STRICT_MODE_COMPATIBLE=!1;goog.provide=function(a){goog.exportPath_(a)}; |
goog.setTestOnly=function(a){if(!goog.DEBUG)throw a=a||"",Error("Importing test-only code into non-debug environment"+a?": "+a:".");};goog.forwardDeclare=function(){};goog.getObjectByName=function(a,b){for(var c=a.split("."),d=b||goog.global,e;e=c.shift();)if(goog.isDefAndNotNull(d[e]))d=d[e];else return null;return d};goog.globalize=function(a,b){var c=b||goog.global,d;for(d in a)c[d]=a[d]}; |
goog.addDependency=function(a,b,c){if(goog.DEPENDENCIES_ENABLED){var d;a=a.replace(/\\/g,"/");for(var e=goog.dependencies_,f=0;d=b[f];f++)e.nameToPath[d]=a,a in e.pathToNames||(e.pathToNames[a]={}),e.pathToNames[a][d]=!0;for(d=0;b=c[d];d++)a in e.requires||(e.requires[a]={}),e.requires[a][b]=!0}};goog.useStrictRequires=!1;goog.ENABLE_DEBUG_LOADER=!0;goog.require=function(){};goog.basePath="";goog.nullFunction=function(){};goog.identityFunction=function(a){return a}; |
goog.abstractMethod=function(){throw Error("unimplemented abstract method");};goog.addSingletonGetter=function(a){a.getInstance=function(){if(a.instance_)return a.instance_;goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=a);return a.instance_=new a}};goog.instantiatedSingletons_=[];goog.DEPENDENCIES_ENABLED=!1; |
@@ -7,14 +7,14 @@ c.length:d;if("base.js"==c.substr(d-7,7)){goog.basePath=c.substr(0,d-7);break}}} |
a+'">\x3c/script>');return!0}return!1},goog.writeScripts_=function(){function a(e){if(!(e in d.written)){if(!(e in d.visited)&&(d.visited[e]=!0,e in d.requires))for(var g in d.requires[e])if(!goog.isProvided_(g))if(g in d.nameToPath)a(d.nameToPath[g]);else throw Error("Undefined nameToPath for "+g);e in c||(c[e]=!0,b.push(e))}}var b=[],c={},d=goog.dependencies_,e;for(e in goog.included_)d.written[e]||a(e);for(e=0;e<b.length;e++)if(b[e])goog.importScript_(goog.basePath+b[e]);else throw Error("Undefined script input"); |
},goog.getPathFromDeps_=function(a){return a in goog.dependencies_.nameToPath?goog.dependencies_.nameToPath[a]:null},goog.findBasePath_(),goog.global.CLOSURE_NO_DEPS||goog.importScript_(goog.basePath+"deps.js")); |
goog.typeOf=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null"; |
-else if("function"==b&&"undefined"==typeof a.call)return"object";return b};goog.isDef=function(a){return void 0!==a};goog.isNull=function(a){return null===a};goog.isDefAndNotNull=function(a){return null!=a};goog.isArray=function(a){return"array"==goog.typeOf(a)};goog.isArrayLike=function(a){var b=goog.typeOf(a);return"array"==b||"object"==b&&"number"==typeof a.length};goog.isDateLike=function(a){return goog.isObject(a)&&"function"==typeof a.getFullYear};goog.isString=function(a){return"string"==typeof a}; |
+else if("function"==b&&"undefined"==typeof a.call)return"object";return b};goog.isNull=function(a){return null===a};goog.isDefAndNotNull=function(a){return null!=a};goog.isArray=function(a){return"array"==goog.typeOf(a)};goog.isArrayLike=function(a){var b=goog.typeOf(a);return"array"==b||"object"==b&&"number"==typeof a.length};goog.isDateLike=function(a){return goog.isObject(a)&&"function"==typeof a.getFullYear};goog.isString=function(a){return"string"==typeof a}; |
goog.isBoolean=function(a){return"boolean"==typeof a};goog.isNumber=function(a){return"number"==typeof a};goog.isFunction=function(a){return"function"==goog.typeOf(a)};goog.isObject=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b};goog.getUid=function(a){return a[goog.UID_PROPERTY_]||(a[goog.UID_PROPERTY_]=++goog.uidCounter_)};goog.hasUid=function(a){return!!a[goog.UID_PROPERTY_]};goog.removeUid=function(a){"removeAttribute"in a&&a.removeAttribute(goog.UID_PROPERTY_);try{delete a[goog.UID_PROPERTY_]}catch(b){}}; |
goog.UID_PROPERTY_="closure_uid_"+(1E9*Math.random()>>>0);goog.uidCounter_=0;goog.getHashCode=goog.getUid;goog.removeHashCode=goog.removeUid;goog.cloneObject=function(a){var b=goog.typeOf(a);if("object"==b||"array"==b){if(a.clone)return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=goog.cloneObject(a[c]);return b}return a};goog.bindNative_=function(a,b,c){return a.call.apply(a.bind,arguments)}; |
goog.bindJs_=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}};goog.bind=function(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?goog.bind=goog.bindNative_:goog.bind=goog.bindJs_;return goog.bind.apply(null,arguments)}; |
goog.partial=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}};goog.mixin=function(a,b){for(var c in b)a[c]=b[c]};goog.now=goog.TRUSTED_SITE&&Date.now||function(){return+new Date}; |
goog.globalEval=function(a){if(goog.global.execScript)goog.global.execScript(a,"JavaScript");else if(goog.global.eval)if(null==goog.evalWorksForGlobals_&&(goog.global.eval("var _et_ = 1;"),"undefined"!=typeof goog.global._et_?(delete goog.global._et_,goog.evalWorksForGlobals_=!0):goog.evalWorksForGlobals_=!1),goog.evalWorksForGlobals_)goog.global.eval(a);else{var b=goog.global.document,c=b.createElement("script");c.type="text/javascript";c.defer=!1;c.appendChild(b.createTextNode(a));b.body.appendChild(c); |
b.body.removeChild(c)}else throw Error("goog.globalEval not available");};goog.evalWorksForGlobals_=null;goog.getCssName=function(a,b){var c=function(a){return goog.cssNameMapping_[a]||a},d=function(a){a=a.split("-");for(var b=[],d=0;d<a.length;d++)b.push(c(a[d]));return b.join("-")},d=goog.cssNameMapping_?"BY_WHOLE"==goog.cssNameMappingStyle_?c:d:function(a){return a};return b?a+"-"+d(b):d(a)};goog.setCssNameMapping=function(a,b){goog.cssNameMapping_=a;goog.cssNameMappingStyle_=b}; |
-goog.getMsg=function(a,b){var c=b||{},d;for(d in c){var e=(""+c[d]).replace(/\$/g,"$$$$");a=a.replace(RegExp("\\{\\$"+d+"\\}","gi"),e)}return a};goog.getMsgWithFallback=function(a){return a};goog.exportSymbol=function(a,b,c){goog.exportPath_(a,b,c)};goog.exportProperty=function(a,b,c){a[b]=c}; |
+goog.getMsg=function(a,b){var c=b||{},d;for(d in c){var e=(""+c[d]).replace(/\$/g,"$$$$");a=a.replace(new RegExp("\\{\\$"+d+"\\}","gi"),e)}return a};goog.getMsgWithFallback=function(a){return a};goog.exportSymbol=function(a,b,c){goog.exportPath_(a,b,c)};goog.exportProperty=function(a,b,c){a[b]=c}; |
goog.inherits=function(a,b){function c(){}c.prototype=b.prototype;a.superClass_=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.base=function(a,c,f){var g=Array.prototype.slice.call(arguments,2);return b.prototype[c].apply(a,g)}}; |
goog.base=function(a,b,c){var d=arguments.callee.caller;if(goog.STRICT_MODE_COMPATIBLE||goog.DEBUG&&!d)throw Error("arguments.caller not defined. goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if(d.superClass_)return d.superClass_.constructor.apply(a,Array.prototype.slice.call(arguments,1));for(var e=Array.prototype.slice.call(arguments,2),f=!1,g=a.constructor;g;g=g.superClass_&&g.superClass_.constructor)if(g.prototype[b]===d)f=!0;else if(f)return g.prototype[b].apply(a, |
e);if(a[b]===d)return a.constructor.prototype[b].apply(a,e);throw Error("goog.base called from a method of one name to a method of a different name");};goog.scope=function(a){a.call(goog.global)};goog.MODIFY_FUNCTION_PROTOTYPES=!0; |
@@ -37,13 +37,13 @@ goog.string.stripQuotes=function(a,b){for(var c=b.length,d=0;d<c;d++){var e=1==c |
goog.string.truncateMiddle=function(a,b,c,d){c&&(a=goog.string.unescapeEntities(a));if(d&&a.length>b){d>b&&(d=b);var e=a.length-d;b-=d;a=a.substring(0,b)+"..."+a.substring(e)}else a.length>b&&(e=Math.floor(b/2),d=a.length-e,e+=b%2,a=a.substring(0,e)+"..."+a.substring(d));c&&(a=goog.string.htmlEscape(a));return a};goog.string.specialEscapeChars_={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\"};goog.string.jsEscapeCache_={"'":"\\'"}; |
goog.string.quote=function(a){a=String(a);if(a.quote)return a.quote();for(var b=['"'],c=0;c<a.length;c++){var d=a.charAt(c),e=d.charCodeAt(0);b[c+1]=goog.string.specialEscapeChars_[d]||(31<e&&127>e?d:goog.string.escapeChar(d))}b.push('"');return b.join("")};goog.string.escapeString=function(a){for(var b=[],c=0;c<a.length;c++)b[c]=goog.string.escapeChar(a.charAt(c));return b.join("")}; |
goog.string.escapeChar=function(a){if(a in goog.string.jsEscapeCache_)return goog.string.jsEscapeCache_[a];if(a in goog.string.specialEscapeChars_)return goog.string.jsEscapeCache_[a]=goog.string.specialEscapeChars_[a];var b=a,c=a.charCodeAt(0);if(31<c&&127>c)b=a;else{if(256>c){if(b="\\x",16>c||256<c)b+="0"}else b="\\u",4096>c&&(b+="0");b+=c.toString(16).toUpperCase()}return goog.string.jsEscapeCache_[a]=b};goog.string.toMap=function(a){for(var b={},c=0;c<a.length;c++)b[a.charAt(c)]=!0;return b}; |
-goog.string.contains=function(a,b){return-1!=a.indexOf(b)};goog.string.caseInsensitiveContains=function(a,b){return goog.string.contains(a.toLowerCase(),b.toLowerCase())};goog.string.countOf=function(a,b){return a&&b?a.split(b).length-1:0};goog.string.removeAt=function(a,b,c){var d=a;0<=b&&b<a.length&&0<c&&(d=a.substr(0,b)+a.substr(b+c,a.length-b-c));return d};goog.string.remove=function(a,b){var c=RegExp(goog.string.regExpEscape(b),"");return a.replace(c,"")}; |
-goog.string.removeAll=function(a,b){var c=RegExp(goog.string.regExpEscape(b),"g");return a.replace(c,"")};goog.string.regExpEscape=function(a){return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};goog.string.repeat=function(a,b){return Array(b+1).join(a)};goog.string.padNumber=function(a,b,c){a=goog.isDef(c)?a.toFixed(c):String(a);c=a.indexOf(".");-1==c&&(c=a.length);return goog.string.repeat("0",Math.max(0,b-c))+a}; |
+goog.string.contains=function(a,b){return-1!=a.indexOf(b)};goog.string.caseInsensitiveContains=function(a,b){return goog.string.contains(a.toLowerCase(),b.toLowerCase())};goog.string.countOf=function(a,b){return a&&b?a.split(b).length-1:0};goog.string.removeAt=function(a,b,c){var d=a;0<=b&&b<a.length&&0<c&&(d=a.substr(0,b)+a.substr(b+c,a.length-b-c));return d};goog.string.remove=function(a,b){var c=new RegExp(goog.string.regExpEscape(b),"");return a.replace(c,"")}; |
+goog.string.removeAll=function(a,b){var c=new RegExp(goog.string.regExpEscape(b),"g");return a.replace(c,"")};goog.string.regExpEscape=function(a){return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};goog.string.repeat=function(a,b){return Array(b+1).join(a)};goog.string.padNumber=function(a,b,c){a=goog.isDef(c)?a.toFixed(c):String(a);c=a.indexOf(".");-1==c&&(c=a.length);return goog.string.repeat("0",Math.max(0,b-c))+a}; |
goog.string.makeSafe=function(a){return null==a?"":String(a)};goog.string.buildString=function(a){return Array.prototype.join.call(arguments,"")};goog.string.getRandomString=function(){var a=2147483648;return Math.floor(Math.random()*a).toString(36)+Math.abs(Math.floor(Math.random()*a)^goog.now()).toString(36)}; |
goog.string.compareVersions=function(a,b){for(var c=0,d=goog.string.trim(String(a)).split("."),e=goog.string.trim(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var h=d[g]||"",k=e[g]||"",l=/(\d*)(\D*)/g,n=/(\d*)(\D*)/g;do{var p=l.exec(h)||["","",""],q=n.exec(k)||["","",""];if(0==p[0].length&&0==q[0].length)break;var c=0==p[1].length?0:parseInt(p[1],10),m=0==q[1].length?0:parseInt(q[1],10),c=goog.string.compareElements_(c,m)||goog.string.compareElements_(0==p[2].length,0==q[2].length)|| |
goog.string.compareElements_(p[2],q[2])}while(0==c)}return c};goog.string.compareElements_=function(a,b){return a<b?-1:a>b?1:0};goog.string.HASHCODE_MAX_=4294967296;goog.string.hashCode=function(a){for(var b=0,c=0;c<a.length;++c)b=31*b+a.charCodeAt(c),b%=goog.string.HASHCODE_MAX_;return b};goog.string.uniqueStringCounter_=2147483648*Math.random()|0;goog.string.createUniqueString=function(){return"goog_"+goog.string.uniqueStringCounter_++}; |
goog.string.toNumber=function(a){var b=Number(a);return 0==b&&goog.string.isEmpty(a)?NaN:b};goog.string.isLowerCamelCase=function(a){return/^[a-z]+([A-Z][a-z]*)*$/.test(a)};goog.string.isUpperCamelCase=function(a){return/^([A-Z][a-z]*)+$/.test(a)};goog.string.toCamelCase=function(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};goog.string.toSelectorCase=function(a){return String(a).replace(/([A-Z])/g,"-$1").toLowerCase()}; |
-goog.string.toTitleCase=function(a,b){var c=goog.isString(b)?goog.string.regExpEscape(b):"\\s",c=c?"|["+c+"]+":"",c=RegExp("(^"+c+")([a-z])","g");return a.replace(c,function(a,b,c){return b+c.toUpperCase()})};goog.string.parseInt=function(a){isFinite(a)&&(a=String(a));return goog.isString(a)?/^\s*-?0x/i.test(a)?parseInt(a,16):parseInt(a,10):NaN};goog.string.splitLimit=function(a,b,c){a=a.split(b);for(var d=[];0<c&&a.length;)d.push(a.shift()),c--;a.length&&d.push(a.join(b));return d};goog.asserts={};goog.asserts.ENABLE_ASSERTS=goog.DEBUG;goog.asserts.AssertionError=function(a,b){b.unshift(a);goog.debug.Error.call(this,goog.string.subs.apply(null,b));b.shift()};goog.inherits(goog.asserts.AssertionError,goog.debug.Error);goog.asserts.AssertionError.prototype.name="AssertionError";goog.asserts.doAssertFailure_=function(a,b,c,d){var e="Assertion failed";if(c)var e=e+(": "+c),f=d;else a&&(e+=": "+a,f=b);throw new goog.asserts.AssertionError(""+e,f||[]);}; |
+goog.string.toTitleCase=function(a,b){var c=goog.isString(b)?goog.string.regExpEscape(b):"\\s",c=c?"|["+c+"]+":"",c=new RegExp("(^"+c+")([a-z])","g");return a.replace(c,function(a,b,c){return b+c.toUpperCase()})};goog.string.parseInt=function(a){isFinite(a)&&(a=String(a));return goog.isString(a)?/^\s*-?0x/i.test(a)?parseInt(a,16):parseInt(a,10):NaN};goog.string.splitLimit=function(a,b,c){a=a.split(b);for(var d=[];0<c&&a.length;)d.push(a.shift()),c--;a.length&&d.push(a.join(b));return d};goog.asserts={};goog.asserts.ENABLE_ASSERTS=goog.DEBUG;goog.asserts.AssertionError=function(a,b){b.unshift(a);goog.debug.Error.call(this,goog.string.subs.apply(null,b));b.shift()};goog.inherits(goog.asserts.AssertionError,goog.debug.Error);goog.asserts.AssertionError.prototype.name="AssertionError";goog.asserts.doAssertFailure_=function(a,b,c,d){var e="Assertion failed";if(c)var e=e+(": "+c),f=d;else a&&(e+=": "+a,f=b);throw new goog.asserts.AssertionError(""+e,f||[]);}; |
goog.asserts.assert=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&!a&&goog.asserts.doAssertFailure_("",null,b,Array.prototype.slice.call(arguments,2));return a};goog.asserts.fail=function(a,b){if(goog.asserts.ENABLE_ASSERTS)throw new goog.asserts.AssertionError("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));}; |
goog.asserts.assertNumber=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&!goog.isNumber(a)&&goog.asserts.doAssertFailure_("Expected number but got %s: %s.",[goog.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};goog.asserts.assertString=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&!goog.isString(a)&&goog.asserts.doAssertFailure_("Expected string but got %s: %s.",[goog.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a}; |
goog.asserts.assertFunction=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&!goog.isFunction(a)&&goog.asserts.doAssertFailure_("Expected function but got %s: %s.",[goog.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};goog.asserts.assertObject=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&!goog.isObject(a)&&goog.asserts.doAssertFailure_("Expected object but got %s: %s.",[goog.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a}; |
@@ -77,7 +77,7 @@ goog.math.standardAngleInRadians=function(a){return goog.math.modulo(a,2*Math.PI |
goog.math.angleDifference=function(a,b){var c=goog.math.standardAngle(b)-goog.math.standardAngle(a);180<c?c-=360:-180>=c&&(c=360+c);return c};goog.math.sign=function(a){return 0==a?0:0>a?-1:1}; |
goog.math.longestCommonSubsequence=function(a,b,c,d){c=c||function(a,b){return a==b};d=d||function(b){return a[b]};for(var e=a.length,f=b.length,g=[],h=0;h<e+1;h++)g[h]=[],g[h][0]=0;for(var k=0;k<f+1;k++)g[0][k]=0;for(h=1;h<=e;h++)for(k=1;k<=f;k++)c(a[h-1],b[k-1])?g[h][k]=g[h-1][k-1]+1:g[h][k]=Math.max(g[h-1][k],g[h][k-1]);for(var l=[],h=e,k=f;0<h&&0<k;)c(a[h-1],b[k-1])?(l.unshift(d(h-1,k-1)),h--,k--):g[h-1][k]>g[h][k-1]?h--:k--;return l}; |
goog.math.sum=function(a){return goog.array.reduce(arguments,function(a,c){return a+c},0)};goog.math.average=function(a){return goog.math.sum.apply(null,arguments)/arguments.length};goog.math.sampleVariance=function(a){var b=arguments.length;if(2>b)return 0;var c=goog.math.average.apply(null,arguments);return b=goog.math.sum.apply(null,goog.array.map(arguments,function(a){return Math.pow(a-c,2)}))/(b-1)}; |
-goog.math.standardDeviation=function(a){return Math.sqrt(goog.math.sampleVariance.apply(null,arguments))};goog.math.isInt=function(a){return isFinite(a)&&0==a%1};goog.math.isFiniteNumber=function(a){return isFinite(a)&&!isNaN(a)};goog.math.log10Floor=function(a){if(0<a){var b=Math.round(Math.log(a)*Math.LOG10E);return b-(Math.pow(10,b)>a)}return 0==a?-Infinity:NaN};goog.math.safeFloor=function(a,b){goog.asserts.assert(!goog.isDef(b)||0<b);return Math.floor(a+(b||2E-15))}; |
+goog.math.standardDeviation=function(a){return Math.sqrt(goog.math.sampleVariance.apply(null,arguments))};goog.math.isInt=function(a){return isFinite(a)&&0==a%1};goog.math.isFiniteNumber=function(a){return isFinite(a)&&!isNaN(a)};goog.math.log10Floor=function(a){if(0<a){var b=Math.round(Math.log(a)*Math.LOG10E);return b-(parseFloat("1e"+b)>a)}return 0==a?-Infinity:NaN};goog.math.safeFloor=function(a,b){goog.asserts.assert(!goog.isDef(b)||0<b);return Math.floor(a+(b||2E-15))}; |
goog.math.safeCeil=function(a,b){goog.asserts.assert(!goog.isDef(b)||0<b);return Math.ceil(a-(b||2E-15))};goog.i18n={}; |
goog.i18n.CompactNumberFormatSymbols_af={COMPACT_DECIMAL_SHORT_PATTERN:{1E3:{other:"0"},1E4:{other:"0"},1E5:{other:"0"},1E6:{other:"0\u00a0m"},1E7:{other:"00\u00a0m"},1E8:{other:"000\u00a0m"},1E9:{other:"0\u00a0mjd"},1E10:{other:"00\u00a0mjd"},1E11:{other:"000\u00a0mjd"},1E12:{other:"0\u00a0bn"},1E13:{other:"00\u00a0bn"},1E14:{other:"000\u00a0bn"}},COMPACT_DECIMAL_LONG_PATTERN:{1E3:{other:"0 duisend"},1E4:{other:"00 duisend"},1E5:{other:"000 duisend"},1E6:{other:"0 miljoen"},1E7:{other:"00 miljoen"},1E8:{other:"000 miljoen"}, |
1E9:{other:"0 miljard"},1E10:{other:"00 miljard"},1E11:{other:"000 miljard"},1E12:{other:"0 biljoen"},1E13:{other:"00 biljoen"},1E14:{other:"000 biljoen"}}};goog.i18n.CompactNumberFormatSymbols_af_ZA=goog.i18n.CompactNumberFormatSymbols_af; |
@@ -609,8 +609,8 @@ goog.i18n.MessageFormat.prototype.parsePluralBlock_=function(a){var b="",c=0,d=g |
else goog.asserts.fail("Expected block type.");d[f.replace(/\s*(?:=)?(\w+)\s*/,"$1")]=g;e++}goog.asserts.assertArray(d[goog.i18n.MessageFormat.OTHER_],"Missing other key in plural statement.");return d}; |
goog.i18n.MessageFormat.prototype.parseOrdinalBlock_=function(a){var b="",c=goog.i18n.MessageFormat.ORDINAL_BLOCK_RE_;a=a.replace(c,function(a,c){b=c;return""});c={};c.argumentIndex=b;c.argumentOffset=0;a=this.extractParts_(a);for(var d=0;d<a.length;){var e=a[d].value;goog.asserts.assertString(e,"Missing ordinal key element.");d++;goog.asserts.assert(d<a.length,"Missing or invalid ordinal value element.");if(goog.i18n.MessageFormat.Element_.BLOCK==a[d].type)var f=this.parseBlock_(a[d].value);else goog.asserts.fail("Expected block type."); |
c[e.replace(/\s*(?:=)?(\w+)\s*/,"$1")]=f;d++}goog.asserts.assertArray(c[goog.i18n.MessageFormat.OTHER_],"Missing other key in selectordinal statement.");return c};goog.i18n.MessageFormat.prototype.buildPlaceholder_=function(a){goog.asserts.assert(0<a.length,"Literal array is empty.");a=(a.length-1).toString(10);return goog.i18n.MessageFormat.LITERAL_PLACEHOLDER_+a+"_"};cvox.TtsCapturingEventListener=function(){};cvox.TtsCapturingEventListener.prototype.onTtsStart=function(){};cvox.TtsCapturingEventListener.prototype.onTtsEnd=function(){};cvox.TtsInterface=function(){};cvox.TtsInterface.prototype.speak=function(){};cvox.TtsInterface.prototype.isSpeaking=function(){};cvox.TtsInterface.prototype.stop=function(){};cvox.TtsInterface.prototype.addCapturingEventListener=function(){};cvox.TtsInterface.prototype.increaseOrDecreaseProperty=function(){}; |
-cvox.TtsInterface.prototype.getDefaultProperty=function(){};cvox.AbstractTts=function(){this.ttsProperties={};this.propertyDefault={rate:0.5,pitch:0.5,volume:0.5};this.propertyMin={rate:0,pitch:0,volume:0};this.propertyMax={rate:1,pitch:1,volume:1};this.propertyStep={rate:0.1,pitch:0.1,volume:0.1};if(void 0==cvox.AbstractTts.pronunciationDictionaryRegexp_){var a=[],b;for(b in cvox.AbstractTts.PRONUNCIATION_DICTIONARY)a.push(b);a="\\b("+a.join("|")+")\\b";cvox.AbstractTts.pronunciationDictionaryRegexp_=RegExp(a,"ig")}if(void 0==cvox.AbstractTts.substitutionDictionaryRegexp_){var a= |
-[],c;for(c in cvox.AbstractTts.SUBSTITUTION_DICTIONARY)a.push(c);a="("+a.join("|")+")";cvox.AbstractTts.substitutionDictionaryRegexp_=RegExp(a,"ig")}};cvox.AbstractTts.prototype.speak=function(){return this};cvox.AbstractTts.prototype.isSpeaking=function(){return!1};cvox.AbstractTts.prototype.stop=function(){};cvox.AbstractTts.prototype.addCapturingEventListener=function(){}; |
+cvox.TtsInterface.prototype.getDefaultProperty=function(){};cvox.AbstractTts=function(){this.ttsProperties={};this.propertyDefault={rate:0.5,pitch:0.5,volume:0.5};this.propertyMin={rate:0,pitch:0,volume:0};this.propertyMax={rate:1,pitch:1,volume:1};this.propertyStep={rate:0.1,pitch:0.1,volume:0.1};if(void 0==cvox.AbstractTts.pronunciationDictionaryRegexp_){var a=[],b;for(b in cvox.AbstractTts.PRONUNCIATION_DICTIONARY)a.push(b);a="\\b("+a.join("|")+")\\b";cvox.AbstractTts.pronunciationDictionaryRegexp_=new RegExp(a,"ig")}if(void 0==cvox.AbstractTts.substitutionDictionaryRegexp_){var a= |
+[],c;for(c in cvox.AbstractTts.SUBSTITUTION_DICTIONARY)a.push(c);a="("+a.join("|")+")";cvox.AbstractTts.substitutionDictionaryRegexp_=new RegExp(a,"ig")}};cvox.AbstractTts.prototype.speak=function(){return this};cvox.AbstractTts.prototype.isSpeaking=function(){return!1};cvox.AbstractTts.prototype.stop=function(){};cvox.AbstractTts.prototype.addCapturingEventListener=function(){}; |
cvox.AbstractTts.prototype.increaseOrDecreaseProperty=function(a,b){var c=this.propertyMin[a],d=this.propertyMax[a],e=this.propertyStep[a],f=this.ttsProperties[a],f=b?f+e:f-e;this.ttsProperties[a]=Math.max(Math.min(f,d),c)}; |
cvox.AbstractTts.prototype.mergeProperties=function(a){var b={},c;if(this.ttsProperties)for(c in this.ttsProperties)b[c]=this.ttsProperties[c];if(a){c=cvox.AbstractTts;"number"==typeof a[c.VOLUME]&&(b[c.VOLUME]=a[c.VOLUME]);"number"==typeof a[c.PITCH]&&(b[c.PITCH]=a[c.PITCH]);"number"==typeof a[c.RATE]&&(b[c.RATE]=a[c.RATE]);"string"==typeof a[c.LANG]&&(b[c.LANG]=a[c.LANG]);var d=this,e=function(c,e){if("number"==typeof a[e]&&"number"==typeof b[c]){b[c]+=a[e];var h=d.propertyMin[c],k=d.propertyMax[c]; |
b[c]>k?b[c]=k:b[c]<h&&(b[c]=h)}};e(c.VOLUME,c.RELATIVE_VOLUME);e(c.PITCH,c.RELATIVE_PITCH);e(c.RATE,c.RELATIVE_RATE)}return b}; |
@@ -710,7 +710,8 @@ for(var b="button,input,select,textarea",c=a.parentElement;c&&"LABEL"!=c.tagName |
a.tagName&&!cvox.DomUtil.isLayoutTable(a)||cvox.DomUtil.isMath(a)||cvox.DomPredicates.headingPredicate([a]))return!0;b=cvox.DomUtil.getValue(a)+" "+cvox.DomUtil.getName(a);a=cvox.DomUtil.getState(a,!0);return b.match(/^\s+$/)&&""===a?!1:!0};cvox.DomUtil.getAncestors=function(a){for(var b=[];a;)b.push(a),a=a.parentNode;for(b.reverse();b.length&&!b[0].tagName&&!b[0].nodeValue;)b.shift();return b}; |
cvox.DomUtil.compareAncestors=function(a,b){for(var c=0;a[c]&&b[c]&&a[c]==b[c];)c++;a[c]||b[c]||(c=-1);return c};cvox.DomUtil.getUniqueAncestors=function(a,b,c){a=cvox.DomUtil.getAncestors(a);b=cvox.DomUtil.getAncestors(b);a=cvox.DomUtil.compareAncestors(a,b);a=b.slice(a);return 0==a.length&&c?b:a}; |
cvox.DomUtil.getRoleMsg=function(a,b){var c;c=cvox.AriaUtil.getRoleNameMsg(a);c||("INPUT"==a.tagName?c=cvox.DomUtil.INPUT_TYPE_TO_INFORMATION_TABLE_MSG[a.type]:"A"==a.tagName&&cvox.DomUtil.isInternalLink(a)?c="internal_link":"A"==a.tagName&&a.getAttribute("name")?c="":a.isContentEditable?c="input_type_text":cvox.DomUtil.isMath(a)?c="math_expr":"TABLE"==a.tagName&&cvox.DomUtil.isLayoutTable(a)?c="":b==cvox.VERBOSITY_BRIEF?c=cvox.DomUtil.TAG_TO_INFORMATION_TABLE_BRIEF_MSG[a.tagName]:(c=cvox.DomUtil.TAG_TO_INFORMATION_TABLE_VERBOSE_MSG[a.tagName], |
-cvox.DomUtil.hasLongDesc(a)&&(c="image_with_long_desc"),!c&&a.onclick&&(c="clickable")));return c};cvox.DomUtil.getRole=function(a,b){var c=cvox.DomUtil.getRoleMsg(a,b)||"",d=c&&" "!=c?cvox.ChromeVox.msgs.getMsg(c):"";return d?d:c};cvox.DomUtil.getListLength=function(a){var b=0;for(a=a.firstChild;a;a=a.nextSibling)if("LI"==a.tagName||a.getAttribute&&"listitem"==a.getAttribute("role")){if(a.hasAttribute("aria-setsize")){var c=parseInt(a.getAttribute("aria-setsize"),10);if(!isNaN(c))return c}b++}return b}; |
+cvox.DomUtil.hasLongDesc(a)&&(c="image_with_long_desc"),!c&&a.onclick&&(c="clickable")));return c};cvox.DomUtil.getRole=function(a,b){var c=cvox.DomUtil.getRoleMsg(a,b)||"",d=c&&" "!=c?cvox.ChromeVox.msgs.getMsg(c):"";return d?d:c}; |
+cvox.DomUtil.getListLength=function(a){var b=0;for(a=a.firstChild;a;a=a.nextSibling)if(cvox.DomUtil.isVisible(a)&&("LI"==a.tagName||a.getAttribute&&"listitem"==a.getAttribute("role"))){if(a.hasAttribute("aria-setsize")){var c=parseInt(a.getAttribute("aria-setsize"),10);if(!isNaN(c))return c}b++}return b}; |
cvox.DomUtil.getStateMsgs=function(a,b){var c=cvox.AriaUtil.getActiveDescendant(a);if(c)return cvox.DomUtil.getStateMsgs(c,b);var c=[],d=a.getAttribute?a.getAttribute("role"):"";(c=cvox.AriaUtil.getStateMsgs(a,b))||(c=[]);"INPUT"==a.tagName?a.hasAttribute("aria-checked")||(d={"checkbox-true":"checkbox_checked_state","checkbox-false":"checkbox_unchecked_state","radio-true":"radio_selected_state","radio-false":"radio_unselected_state"},(d=d[a.type+"-"+!!a.checked])&&c.push([d])):"SELECT"==a.tagName? |
a.selectedOptions&&1>=a.selectedOptions.length?c.push(["list_position",cvox.ChromeVox.msgs.getNumber(a.selectedIndex+1),cvox.ChromeVox.msgs.getNumber(a.options.length)]):c.push(["selected_options_state",cvox.ChromeVox.msgs.getNumber(a.selectedOptions.length)]):"UL"!=a.tagName&&"OL"!=a.tagName&&"list"!=d||c.push(["list_with_items",cvox.ChromeVox.msgs.getNumber(cvox.DomUtil.getListLength(a))]);cvox.DomUtil.isDisabled(a)&&c.push(["aria_disabled_true"]);cvox.DomPredicates.linkPredicate([a])&&cvox.ChromeVox.visitedUrls[a.href]&& |
c.push(["visited_url"]);a.accessKey&&c.push(["access_key",a.accessKey]);return c};cvox.DomUtil.getState=function(a,b){return cvox.NodeStateUtil.expand(cvox.DomUtil.getStateMsgs(a,b))};cvox.DomUtil.isFocusable=function(a){return a&&"number"==typeof a.tabIndex&&("A"!=a.tagName||a.hasAttribute("href")||a.hasAttribute("tabindex"))?0<=a.tabIndex||a.hasAttribute&&a.hasAttribute("tabindex")&&"-1"==a.getAttribute("tabindex")?!0:!1:!1}; |
@@ -740,7 +741,7 @@ cvox.DomUtil.hasLongDesc=function(a){return a&&a.longDesc?!0:!1};cvox.DomUtil.ge |
cvox.DomUtil.doesInputSupportSelection=function(a){return goog.isDef(a)&&"INPUT"==a.tagName&&"email"!=a.type&&"number"!=a.type};cvox.DomUtil.getHint=function(a){var b="";if(a.hasAttribute&&a.hasAttribute("aria-describedby")){a=a.getAttribute("aria-describedby").split(" ");for(var c,d=0;c=a[d];d++)(c=document.getElementById(c))&&(b+=" "+cvox.DomUtil.getName(c,!0,!0,!0))}return b};cvox.SelectionUtil=function(){};cvox.SelectionUtil.cleanUpParagraphForward=function(a){for(;3==a.focusNode.nodeType;){var b=a.focusNode,c=a.focusOffset;a.modify("extend","forward","sentence");if(b==a.focusNode&&c==a.focusOffset)return!1}return!0};cvox.SelectionUtil.cleanUpParagraphBack=function(a){for(var b,c;3==a.focusNode.nodeType&&(b=a.focusNode,c=a.focusOffset,a.modify("extend","backward","sentence"),b!=a.focusNode||c!=a.focusOffset););return!0}; |
cvox.SelectionUtil.cleanUpSentence=function(a){for(var b=!0;b;)if(3==a.focusNode.nodeType){var c=a.focusNode,d=a.focusOffset;if(0<a.rangeCount&&0<a.getRangeAt(0).endOffset)if("."==c.substringData(a.getRangeAt(0).endOffset-1,1))break;else if(" "==c.substringData(a.getRangeAt(0).endOffset-1,1))break;else{if(a.modify("extend","forward","sentence"),c==a.focusNode&&d==a.focusOffset)return!1}else break}else break;return!0}; |
cvox.SelectionUtil.findSelPosition=function(a){if(0==a.rangeCount)return[0,0];var b=a.getRangeAt(0).getBoundingClientRect();if(!b)return[0,0];a=window.pageYOffset+b.top;b=window.pageXOffset+b.left;return[a,b]};cvox.SelectionUtil.findTopLeftPosition=function(a){var b=0,c=0;if(a.offsetParent)for(b=a.offsetLeft,c=a.offsetTop,a=a.offsetParent;null!==a;)b+=a.offsetLeft,c+=a.offsetTop,a=a.offsetParent;return[c,b]}; |
-cvox.SelectionUtil.isSelectionValid=function(a){var b=RegExp(/^\s+$/);return!(b.test(a.toString())||""==a.toString())};cvox.SelectionUtil.isRangeValid=function(a){a=a.cloneContents().textContent;var b=RegExp(/^\s+$/);return!(b.test(a)||""==a)};cvox.SelectionUtil.findPos_=function(a){var b=0,c=0;if(a.offsetParent){do b+=a.offsetLeft,c+=a.offsetTop;while(a=a.offsetParent)}return[b,c]}; |
+cvox.SelectionUtil.isSelectionValid=function(a){var b=new RegExp(/^\s+$/);return!(b.test(a.toString())||""==a.toString())};cvox.SelectionUtil.isRangeValid=function(a){a=a.cloneContents().textContent;var b=new RegExp(/^\s+$/);return!(b.test(a)||""==a)};cvox.SelectionUtil.findPos_=function(a){var b=0,c=0;if(a.offsetParent){do b+=a.offsetLeft,c+=a.offsetTop;while(a=a.offsetParent)}return[b,c]}; |
cvox.SelectionUtil.scrollElementsToView=function(a){for(;a&&!a.getBoundingClientRect;)a=a.parentElement;if(a){for(var b=a,c=b.parentElement;b!=document.body&&c;)b.scrollTop=b.offsetTop,b.scrollLeft=b.offsetLeft,b=c,c=b.parentElement;a=cvox.SelectionUtil.findPos_(a);window.scrollTo(a[0]-window.innerWidth/2,a[1]-window.innerHeight/2)}}; |
cvox.SelectionUtil.scrollToSelection=function(a){if(0!=a.rangeCount){cvox.SelectionUtil.scrollElementsToView(a.focusNode);var b=cvox.SelectionUtil.findSelPosition(a);a=b[0];var b=b[1],c=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,e=window.innerWidth||document.documentElement.innerWidth||document.body.clientWidth;b<e&&(b=0);c+d<a?(a-=d,window.scroll(b,a+100)):a<c&&window.scroll(b, |
a-100)}};cvox.SelectionUtil.isAllWs=function(a){return!/[^\t\n\r ]/.test(a.data)};cvox.SelectionUtil.isIgnorable=function(a){return 8==a.nodeType||3==a.nodeType&&cvox.SelectionUtil.isAllWs(a)};cvox.SelectionUtil.nodeBefore=function(a){for(;a=a.previousSibling;)if(!cvox.SelectionUtil.isIgnorable(a))return a;return null};cvox.SelectionUtil.nodeAfter=function(a){for(;a=a.nextSibling;)if(!cvox.SelectionUtil.isIgnorable(a))return a;return null}; |
@@ -774,7 +775,7 @@ cvox.CursorSelection.prototype.setReversed=function(a){if(a==this.isReversed_)re |
cvox.CursorSelection.prototype.clone=function(){return new cvox.CursorSelection(this.start,this.end,this.isReversed_)};cvox.CursorSelection.prototype.select=function(){var a=window.getSelection();a.removeAllRanges();this.normalize();a.addRange(this.getRange())};cvox.CursorSelection.fromNode=function(a){if(!a)return null;var b=cvox.TraverseUtil.getNodeText(a);return new cvox.CursorSelection(new cvox.Cursor(a,0,b),new cvox.Cursor(a,0,b))};cvox.CursorSelection.fromBody=function(){return cvox.CursorSelection.fromNode(document.body)}; |
cvox.CursorSelection.prototype.getText=function(){return this.start.equals(this.end)?cvox.TraverseUtil.getNodeText(this.start.node):cvox.SelectionUtil.getRangeText(this.getRange())};cvox.CursorSelection.prototype.getRange=function(){var a=document.createRange();this.isReversed_?(a.setStart(this.end.node,this.end.index),a.setEnd(this.start.node,this.start.index)):(a.setStart(this.start.node,this.start.index),a.setEnd(this.end.node,this.end.index));return a}; |
cvox.CursorSelection.prototype.equals=function(a){return this.start.equals(a.start)&&this.end.equals(a.end)};cvox.CursorSelection.prototype.absEquals=function(a){return this.start.equals(a.start)&&this.end.equals(a.end)||this.end.equals(a.start)&&this.start.equals(a.end)};cvox.CursorSelection.prototype.directedBefore=function(a){var b=this.start.node.compareDocumentPosition(a.start.node)==cvox.CursorSelection.BEFORE;return this.start.node==a.start.node||(this.isReversed()?!b:b)}; |
-cvox.CursorSelection.prototype.normalize=function(){if(0==this.absEnd().index&&this.absEnd().node){var a=this.absEnd().node,b=document.createRange();b.selectNodeContents(a);this.absEnd().index=b.endOffset}return this};cvox.CursorSelection.prototype.collapse=function(){if(this.start.equals(this.end))return this;this.end.copyFrom(this.start);if(0==this.start.text.length)return this;this.isReversed()?0<this.end.index&&this.end.index--:this.end.index<this.end.text.length&&this.end.index++;return this};cvox.PlatformUtil={};cvox.PlatformFilter={NONE:0,WINDOWS:1,MAC:2,LINUX:4,WML:7,CHROMEOS:8,ANDROID:16};cvox.PlatformUtil.matchesPlatform=function(a){var b=navigator.userAgent;return void 0==a?!0:-1!=b.indexOf("Android")?0!=(a&cvox.PlatformFilter.ANDROID):-1!=b.indexOf("Win")?0!=(a&cvox.PlatformFilter.WINDOWS):-1!=b.indexOf("Mac")?0!=(a&cvox.PlatformFilter.MAC):-1!=b.indexOf("Linux")?0!=(a&cvox.PlatformFilter.LINUX):-1!=b.indexOf("CrOS")?0!=(a&cvox.PlatformFilter.CHROMEOS):!1};goog.object={};goog.object.forEach=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)};goog.object.filter=function(a,b,c){var d={},e;for(e in a)b.call(c,a[e],e,a)&&(d[e]=a[e]);return d};goog.object.map=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d};goog.object.some=function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return!0;return!1};goog.object.every=function(a,b,c){for(var d in a)if(!b.call(c,a[d],d,a))return!1;return!0}; |
+cvox.CursorSelection.prototype.normalize=function(){if(0==this.absEnd().index&&this.absEnd().node){var a=this.absEnd().node,b=document.createRange();b.selectNodeContents(a);this.absEnd().index=b.endOffset}return this};cvox.CursorSelection.prototype.collapse=function(){if(this.start.equals(this.end))return this;this.end.copyFrom(this.start);if(0==this.start.text.length)return this;this.isReversed()?0<this.end.index&&this.end.index--:this.end.index<this.end.text.length&&this.end.index++;return this};goog.object={};goog.object.forEach=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)};goog.object.filter=function(a,b,c){var d={},e;for(e in a)b.call(c,a[e],e,a)&&(d[e]=a[e]);return d};goog.object.map=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d};goog.object.some=function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return!0;return!1};goog.object.every=function(a,b,c){for(var d in a)if(!b.call(c,a[d],d,a))return!1;return!0}; |
goog.object.getCount=function(a){var b=0,c;for(c in a)b++;return b};goog.object.getAnyKey=function(a){for(var b in a)return b};goog.object.getAnyValue=function(a){for(var b in a)return a[b]};goog.object.contains=function(a,b){return goog.object.containsValue(a,b)};goog.object.getValues=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b};goog.object.getKeys=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}; |
goog.object.getValueByKeys=function(a,b){for(var c=goog.isArrayLike(b),d=c?b:arguments,c=c?0:1;c<d.length&&(a=a[d[c]],goog.isDef(a));c++);return a};goog.object.containsKey=function(a,b){return b in a};goog.object.containsValue=function(a,b){for(var c in a)if(a[c]==b)return!0;return!1};goog.object.findKey=function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};goog.object.findValue=function(a,b,c){return(b=goog.object.findKey(a,b,c))&&a[b]}; |
goog.object.isEmpty=function(a){for(var b in a)return!1;return!0};goog.object.clear=function(a){for(var b in a)delete a[b]};goog.object.remove=function(a,b){var c;(c=b in a)&&delete a[b];return c};goog.object.add=function(a,b,c){if(b in a)throw Error('The object already contains the key "'+b+'"');goog.object.set(a,b,c)};goog.object.get=function(a,b,c){return b in a?a[b]:c};goog.object.set=function(a,b,c){a[b]=c};goog.object.setIfUndefined=function(a,b,c){return b in a?a[b]:a[b]=c}; |
@@ -791,7 +792,7 @@ cvox.Spannable.prototype.toJson=function(){var a={};a.string=this.string_;a.span |
cvox.Spannable.fromJson=function(a){if("string"!==typeof a.string)throw"Invalid spannable json object: string field not a string";if(!(a.spans instanceof Array))throw"Invalid spannable json object: no spans array";for(var b=new cvox.Spannable(a.string),c=0,d;d=a.spans[c];++c){if("string"!==typeof d.type)throw"Invalid span in spannable json object: type not a string";if("number"!==typeof d.start||"number"!==typeof d.end)throw"Invalid span in spannable json object: start or end not a number";var e= |
cvox.Spannable.serializableSpansByName_[d.type],e=e.fromJson(d.value);b.setSpan(e,d.start,d.end)}return b};cvox.Spannable.registerSerializableSpan=function(a,b,c,d){a={name:b,ctor:a,fromJson:c,toJson:d};cvox.Spannable.serializableSpansByName_[b]=a};cvox.Spannable.registerStatelessSerializableSpan=function(a,b){var c={name:b,ctor:a,toJson:void 0,fromJson:function(){return new a}};cvox.Spannable.serializableSpansByName_[b]=c};cvox.Spannable.serializableSpansByName_={};cvox.NavBraille=function(a){this.text=a.text instanceof cvox.Spannable?a.text:new cvox.Spannable(a.text);this.startIndex=goog.isDef(a.startIndex)?a.startIndex:-1;this.endIndex=goog.isDef(a.endIndex)?a.endIndex:this.startIndex};cvox.NavBraille.fromText=function(a){return new cvox.NavBraille({text:a})}; |
cvox.NavBraille.fromJson=function(a){if("number"!==typeof a.startIndex||"number"!==typeof a.endIndex)throw"Invalid start or end index in serialized NavBraille: "+a;return new cvox.NavBraille({text:cvox.Spannable.fromJson(a.spannable),startIndex:a.startIndex,endIndex:a.endIndex})};cvox.NavBraille.prototype.isEmpty=function(){return 0==this.text.getLength()}; |
-cvox.NavBraille.prototype.toString=function(){return'NavBraille(text="'+this.text.toString()+'" startIndex="'+this.startIndex+'" endIndex="'+this.endIndex+'")'};cvox.NavBraille.prototype.toJson=function(){return{spannable:this.text.toJson(),startIndex:this.startIndex,endIndex:this.endIndex}};cvox.NavBraille.prototype.write=function(){cvox.PlatformUtil.matchesPlatform(cvox.PlatformFilter.CHROMEOS|cvox.PlatformFilter.ANDROID)&&cvox.ChromeVox.braille.write(this)};cvox.BrailleKeyCommand={PAN_LEFT:"pan_left",PAN_RIGHT:"pan_right",LINE_UP:"line_up",LINE_DOWN:"line_down",TOP:"top",BOTTOM:"bottom",ROUTING:"routing",SECONDARY_ROUTING:"secondary_routing",DOTS:"dots",STANDARD_KEY:"standard_key"};cvox.BrailleKeyEvent={};cvox.BrailleInterface=function(){};cvox.BrailleInterface.prototype.write=function(){};cvox.BrailleInterface.prototype.setCommandListener=function(){};cvox.AbstractBraille=function(){};cvox.AbstractHost=function(){};cvox.AbstractHost.State={ACTIVE:0,INACTIVE:1,KILLED:2};cvox.AbstractHost.prototype.init=function(){};cvox.AbstractHost.prototype.sendToBackgroundPage=function(){};cvox.AbstractHost.prototype.getApiSrc=function(){return""};cvox.AbstractHost.prototype.getFileSrc=function(){return""};cvox.AbstractHost.prototype.hasTtsCallback=function(){return!0};cvox.AbstractHost.prototype.mustRedispatchClickEvent=function(){return!1}; |
+cvox.NavBraille.prototype.toString=function(){return'NavBraille(text="'+this.text.toString()+'" startIndex="'+this.startIndex+'" endIndex="'+this.endIndex+'")'};cvox.NavBraille.prototype.toJson=function(){return{spannable:this.text.toJson(),startIndex:this.startIndex,endIndex:this.endIndex}};cvox.NavBraille.prototype.write=function(){cvox.ChromeVox.braille.write(this)};cvox.BrailleKeyCommand={PAN_LEFT:"pan_left",PAN_RIGHT:"pan_right",LINE_UP:"line_up",LINE_DOWN:"line_down",TOP:"top",BOTTOM:"bottom",ROUTING:"routing",SECONDARY_ROUTING:"secondary_routing",DOTS:"dots",STANDARD_KEY:"standard_key"};cvox.BrailleKeyEvent={};cvox.BrailleInterface=function(){};cvox.BrailleInterface.prototype.write=function(){};cvox.BrailleInterface.prototype.setCommandListener=function(){};cvox.AbstractBraille=function(){};cvox.AbstractHost=function(){};cvox.AbstractHost.State={ACTIVE:0,INACTIVE:1,KILLED:2};cvox.AbstractHost.prototype.init=function(){};cvox.AbstractHost.prototype.sendToBackgroundPage=function(){};cvox.AbstractHost.prototype.getApiSrc=function(){return""};cvox.AbstractHost.prototype.getFileSrc=function(){return""};cvox.AbstractHost.prototype.hasTtsCallback=function(){return!0};cvox.AbstractHost.prototype.mustRedispatchClickEvent=function(){return!1}; |
cvox.AbstractHost.prototype.activateOrDeactivateChromeVox=function(a){this.onStateChanged_(a?cvox.AbstractHost.State.ACTIVE:cvox.AbstractHost.State.INACTIVE)}; |
cvox.AbstractHost.prototype.onStateChanged_=function(a){var b=a==cvox.AbstractHost.State.ACTIVE;if(b!=cvox.ChromeVox.isActive)switch(cvox.ChromeVoxEventWatcher.cleanup(window),a){case cvox.AbstractHost.State.ACTIVE:cvox.ChromeVox.isActive=!0;cvox.ChromeVox.navigationManager.showOrHideIndicator(!0);cvox.ChromeVoxEventWatcher.init(window);document.activeElement?(a=document.hasFocus()&&!document.webkitHidden,cvox.ApiImplementation.syncToNode(document.activeElement,a)):cvox.ChromeVox.navigationManager.updateIndicator(); |
break;case cvox.AbstractHost.State.INACTIVE:cvox.ChromeVox.isActive=!1;cvox.ChromeVox.navigationManager.showOrHideIndicator(!1);cvox.ChromeVoxEventWatcher.init(window);break;case cvox.AbstractHost.State.KILLED:cvox.ChromeVox.isActive=!1,cvox.ChromeVox.navigationManager.showOrHideIndicator(!1)}};cvox.MathJaxInterface=function(){};cvox.MathJaxInterface.prototype.getAllJax=function(){};cvox.AbstractMathJax=function(){};cvox.HostFactory=function(){};cvox.HostFactory.getHost=function(){return new cvox.HostFactory.hostConstructor};cvox.HostFactory.getTts=function(){return new cvox.HostFactory.ttsConstructor};cvox.HostFactory.getBraille=function(){return new cvox.HostFactory.brailleConstructor};cvox.HostFactory.getMsgs=function(){return new cvox.HostFactory.msgsConstructor};cvox.HostFactory.getEarcons=function(){return new cvox.HostFactory.earconsConstructor};cvox.HostFactory.getMathJax=function(){return new cvox.HostFactory.mathJaxConstructor};cvox.ChromeMsgs=function(){};goog.inherits(cvox.ChromeMsgs,cvox.AbstractMsgs);cvox.ChromeMsgs.NAMESPACE_="chromevox_";cvox.ChromeMsgs.prototype.getMsg=function(a,b){var c=chrome.i18n.getMessage(cvox.ChromeMsgs.NAMESPACE_+a,b);if(void 0==c||""==c)throw Error("Invalid ChromeVox message id: "+a);return c}; |
@@ -846,7 +847,7 @@ cvox.ChromeVoxEditableContentEditable=function(a,b){cvox.ChromeVoxEditableElemen |
cvox.ChromeVoxEditableContentEditable.prototype.update=function(a){this.extractorIsCurrent_=!1;a=new cvox.TextChangeEvent(this.getExtractor().getText(),this.getExtractor().getStartIndex(),this.getExtractor().getEndIndex(),a);this.changed(a)};cvox.ChromeVoxEditableContentEditable.prototype.getLineIndex=function(a){return this.getExtractor().getLineIndex(a)};cvox.ChromeVoxEditableContentEditable.prototype.getLineStart=function(a){return this.getExtractor().getLineStart(a)}; |
cvox.ChromeVoxEditableContentEditable.prototype.getLineEnd=function(a){return this.getExtractor().getLineEnd(a)};cvox.ChromeVoxEditableContentEditable.prototype.getExtractor=function(){var a=cvox.ChromeVoxEditableContentEditable.extractor_;a||(a=cvox.ChromeVoxEditableContentEditable.extractor_=new cvox.ContentEditableExtractor);this.extractorIsCurrent_||(a.update(this.node),this.extractorIsCurrent_=!0);return a}; |
cvox.ChromeVoxEditableContentEditable.prototype.changed=function(a){a.triggeredByUser&&(this.shouldDescribeChange(a)?cvox.ChromeVoxEditableContentEditable.superClass_.changed.call(this,a):this.speak(cvox.ChromeVox.msgs.getMsg("text_box_blank"),!0))}; |
-cvox.ChromeVoxEditableContentEditable.prototype.shouldDescribeChange=function(a){var b=window.getSelection(),c=new cvox.Cursor(b.baseNode,b.baseOffset,"");return 1!=Math.abs(this.start-a.start)&&this.start==this.end&&a.start==a.end&&b.baseNode==b.extentNode&&b.baseOffset==b.extentOffset&&b.baseNode.nodeType==Node.ELEMENT_NODE&&b.baseNode.querySelector("BR")&&cvox.TraverseUtil.forwardsChar(c,[],[])?!1:!0};cvox.LibLouis=function(a,b){this.nmfPath_=a;this.tablesDir_=goog.isDef(b)?b:null;this.embedElement_=null;this.instanceState_=cvox.LibLouis.InstanceState.NOT_LOADED;this.pendingTranslators_=[];this.pendingRpcCallbacks_={};this.nextMessageId_=1};cvox.LibLouis.InstanceState={NOT_LOADED:0,LOADING:1,LOADED:2,ERROR:-1}; |
+cvox.ChromeVoxEditableContentEditable.prototype.shouldDescribeChange=function(a){var b=window.getSelection(),c=new cvox.Cursor(b.baseNode,b.baseOffset,"");return 1!=Math.abs(this.start-a.start)&&this.start==this.end&&a.start==a.end&&b.baseNode==b.extentNode&&b.baseOffset==b.extentOffset&&b.baseNode.nodeType==Node.ELEMENT_NODE&&b.baseNode.querySelector("BR")&&cvox.TraverseUtil.forwardsChar(c,[],[])?!1:!0};cvox.PlatformUtil={};cvox.PlatformFilter={NONE:0,WINDOWS:1,MAC:2,LINUX:4,WML:7,CHROMEOS:8,ANDROID:16};cvox.PlatformUtil.matchesPlatform=function(a){var b=navigator.userAgent;return void 0==a?!0:-1!=b.indexOf("Android")?0!=(a&cvox.PlatformFilter.ANDROID):-1!=b.indexOf("Win")?0!=(a&cvox.PlatformFilter.WINDOWS):-1!=b.indexOf("Mac")?0!=(a&cvox.PlatformFilter.MAC):-1!=b.indexOf("Linux")?0!=(a&cvox.PlatformFilter.LINUX):-1!=b.indexOf("CrOS")?0!=(a&cvox.PlatformFilter.CHROMEOS):!1};cvox.LibLouis=function(a,b){this.nmfPath_=a;this.tablesDir_=goog.isDef(b)?b:null;this.embedElement_=null;this.instanceState_=cvox.LibLouis.InstanceState.NOT_LOADED;this.pendingTranslators_=[];this.pendingRpcCallbacks_={};this.nextMessageId_=1};cvox.LibLouis.InstanceState={NOT_LOADED:0,LOADING:1,LOADED:2,ERROR:-1}; |
cvox.LibLouis.prototype.attachToElement=function(a){if(this.isAttached())throw Error("instance already attached");var b=document.createElement("embed");b.src=this.nmfPath_;b.type="application/x-nacl";b.width=0;b.height=0;goog.isNull(this.tablesDir_)||b.setAttribute("tablesdir",this.tablesDir_);b.addEventListener("load",goog.bind(this.onInstanceLoad_,this),!1);b.addEventListener("error",goog.bind(this.onInstanceError_,this),!1);b.addEventListener("message",goog.bind(this.onInstanceMessage_,this),!1); |
a.appendChild(b);this.embedElement_=b;this.instanceState_=cvox.LibLouis.InstanceState.LOADING};cvox.LibLouis.prototype.detach=function(){if(!this.isAttached())throw Error("cannot detach unattached instance");this.embedElement_.parentNode.removeChild(this.embedElement_);this.embedElement_=null;this.instanceState_=cvox.LibLouis.InstanceState.NOT_LOADED};cvox.LibLouis.prototype.isAttached=function(){return null!==this.embedElement_}; |
cvox.LibLouis.prototype.getTranslator=function(a,b){switch(this.instanceState_){case cvox.LibLouis.InstanceState.NOT_LOADED:case cvox.LibLouis.InstanceState.LOADING:this.pendingTranslators_.push({tableName:a,callback:b});break;case cvox.LibLouis.InstanceState.ERROR:b(null);break;case cvox.LibLouis.InstanceState.LOADED:this.rpc_("CheckTable",{table_name:a},goog.bind(function(c){c.success?(c=new cvox.LibLouis.Translator(this,a),b(c)):b(null)},this))}}; |
@@ -854,7 +855,7 @@ cvox.LibLouis.prototype.rpc_=function(a,b,c){if(this.instanceState_!==cvox.LibLo |
cvox.LibLouis.prototype.onInstanceLoad_=function(){window.console.info("loaded liblouis Native Client instance");this.instanceState_=cvox.LibLouis.InstanceState.LOADED;this.pendingTranslators_.forEach(goog.bind(function(a){this.getTranslator(a.tableName,a.callback)},this));this.pendingTranslators_.length=0}; |
cvox.LibLouis.prototype.onInstanceError_=function(){window.console.error("failed to load liblouis Native Client instance");this.instanceState_=cvox.LibLouis.InstanceState.ERROR;this.pendingTranslators_.forEach(goog.bind(function(a){this.getTranslator(a.tableName,a.callback)},this));this.pendingTranslators_.length=0}; |
cvox.LibLouis.prototype.onInstanceMessage_=function(a){goog.DEBUG&&window.console.debug("RPC <- "+a.data);a=JSON.parse(a.data);var b=a.in_reply_to;if(goog.isDef(b)){goog.isDef(a.error)&&window.console.error("liblouis Native Client error",a.error);var c=this.pendingRpcCallbacks_[b];goog.isDef(c)&&(delete this.pendingRpcCallbacks_[b],c(a))}else window.console.warn("liblouis Native Client module sent message with no ID",a)};cvox.LibLouis.Translator=function(a,b){this.instance_=a;this.tableName_=b}; |
-cvox.LibLouis.Translator.prototype.translate=function(a,b){var c={table_name:this.tableName_,text:a};this.instance_.rpc_("Translate",c,function(a){var c=null,f=null,g=null;a.success&&goog.isString(a.cells)&&(c=cvox.LibLouis.Translator.decodeHexString_(a.cells),goog.isDef(a.text_to_braille)&&(f=a.text_to_braille),goog.isDef(a.braille_to_text)&&(g=a.braille_to_text));b(c,f,g)})}; |
+cvox.LibLouis.Translator.prototype.translate=function(a,b){var c={table_name:this.tableName_,text:a};this.instance_.rpc_("Translate",c,function(d){var e=null,f=null,g=null;d.success&&goog.isString(d.cells)?(e=cvox.LibLouis.Translator.decodeHexString_(d.cells),goog.isDef(d.text_to_braille)&&(f=d.text_to_braille),goog.isDef(d.braille_to_text)&&(g=d.braille_to_text)):0<a.length&&console.error("Braille translation error for "+JSON.stringify(c));b(e,f,g)})}; |
cvox.LibLouis.Translator.decodeHexString_=function(a){if(!/^([0-9a-f]{2})*$/i.test(a))throw Error("invalid hexadecimal string");for(var b=new Uint8Array(a.length/2),c=0,d=0;d<a.length;d+=2)b[c++]=parseInt(a.substring(d,d+2),16);return b.buffer};cvox.LibLouis.Translator.encodeHexString_=function(a){a=new Uint8Array(a);for(var b="",c=0;c<a.length;c++)var d=a[c],b=b+((16>d?"0":"")+d.toString(16));return b};cvox.ChromeVoxJSON||(cvox.ChromeVoxJSON={}); |
window.JSON&&"[object JSON]"==window.JSON.toString()?cvox.ChromeVoxJSON=window.JSON:function(){function a(a){return 10>a?"0"+a:a}function b(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=h[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(a,d){var e,h,m,s,u=f,t,r=d[a];r&&"object"===typeof r&&"function"===typeof r.toJSON&&(r=r.toJSON(a));"function"===typeof k&&(r=k.call(d,a,r));switch(typeof r){case "string":return b(r); |
case "number":return isFinite(r)?String(r):"null";case "boolean":case "null":return String(r);case "object":if(!r)return"null";f+=g;t=[];if("[object Array]"===Object.prototype.toString.apply(r)){s=r.length;for(e=0;e<s;e+=1)t[e]=c(e,r)||"null";m=0===t.length?"[]":f?"[\n"+f+t.join(",\n"+f)+"\n"+u+"]":"["+t.join(",")+"]";f=u;return m}if(k&&"object"===typeof k)for(s=k.length,e=0;e<s;e+=1)h=k[e],"string"===typeof h&&(m=c(h,r))&&t.push(b(h)+(f?": ":":")+m);else for(h in r)Object.hasOwnProperty.call(r,h)&& |
@@ -865,7 +866,7 @@ if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").rep |
cvox.ExtensionBridge.PONG_MSG="cvox.ExtensionBridge.Pong";cvox.ExtensionBridge.send=function(a){var b=cvox.ExtensionBridge;switch(b.context){case b.BACKGROUND:b.sendBackgroundToContentScript(a);break;case b.CONTENT_SCRIPT:b.sendContentScriptToBackground(a)}};cvox.ExtensionBridge.addMessageListener=function(a){cvox.ExtensionBridge.messageListeners.push(a)};cvox.ExtensionBridge.addDisconnectListener=function(a){cvox.ExtensionBridge.disconnectListeners.push(a)}; |
cvox.ExtensionBridge.removeMessageListeners=function(){cvox.ExtensionBridge.messageListeners.length=0};cvox.ExtensionBridge.uniqueId=function(){return cvox.ExtensionBridge.id_}; |
cvox.ExtensionBridge.initBackground=function(){var a=cvox.ExtensionBridge;a.portCache_=[];a.nextPongId_=1;a.id_=0;var b=function(b){b.name==a.PORT_NAME&&(a.portCache_.push(b),b.onMessage.addListener(function(d){if(d[cvox.ExtensionBridge.PING_MSG])d={},d[cvox.ExtensionBridge.PONG_MSG]=a.nextPongId_++,b.postMessage(d);else for(var e=0;e<a.messageListeners.length;e++)a.messageListeners[e](d,b)}),b.onDisconnect.addListener(function(){for(var d=0;d<a.portCache_.length;d++)if(a.portCache_[d]==b){a.portCache_.splice(d, |
-1);break}}))};chrome.extension.onConnect.addListener(b);chrome.extension.onConnectExternal.addListener(b)}; |
+1);break}}))};chrome.extension.onConnect.addListener(b)}; |
cvox.ExtensionBridge.initContentScript=function(){var a=cvox.ExtensionBridge;a.connected=!1;a.pingAttempts=0;a.queuedMessages=[];a.id_=-1;var b=function(b,d,e){if(!b||!b.srcFile){if(b[cvox.ExtensionBridge.PONG_MSG])a.gotPongFromBackgroundPage(b[cvox.ExtensionBridge.PONG_MSG]);else for(d=0;d<a.messageListeners.length;d++)a.messageListeners[d](b,cvox.ExtensionBridge.backgroundPort);e({})}};chrome.extension.onMessage.addListener(b);a.setupBackgroundPort();a.tryToPingBackgroundPage()}; |
cvox.ExtensionBridge.setupBackgroundPort=function(){var a=cvox.ExtensionBridge;a.backgroundPort=chrome.extension.connect({name:a.PORT_NAME});a.backgroundPort.onMessage.addListener(function(b){if(b[cvox.ExtensionBridge.PONG_MSG])a.gotPongFromBackgroundPage(b[cvox.ExtensionBridge.PONG_MSG]);else for(var c=0;c<a.messageListeners.length;c++)a.messageListeners[c](b,a.backgroundPort)});a.backgroundPort.onDisconnect.addListener(function(){if(a.connected)for(var b=0;b<a.disconnectListeners.length;b++)a.disconnectListeners[b](); |
else a.backgroundPort=null})};cvox.ExtensionBridge.tryToPingBackgroundPage=function(){var a=cvox.ExtensionBridge;if(!a.connected)if(a.pingAttempts++,5<a.pingAttempts)for(var b=0;b<a.disconnectListeners.length;b++)a.disconnectListeners[b]();else b={},b[cvox.ExtensionBridge.PING_MSG]=1,a.backgroundPort||a.setupBackgroundPort(),a.backgroundPort.postMessage(b),window.setTimeout(cvox.ExtensionBridge.tryToPingBackgroundPage,500)}; |
@@ -875,16 +876,17 @@ cvox.BrailleCaptionsBackground.setContent=function(a,b){for(var c=cvox.BrailleCa |
cvox.BrailleCaptionsBackground.setActive=function(a){var b=cvox.BrailleCaptionsBackground,c=b.isEnabled();window.prefs.setPref(b.PREF_KEY,String(a));c!=a&&(b.stateCallback_&&b.stateCallback_(),a=a?cvox.ChromeVox.msgs.getMsg("braille_captions_enabled"):cvox.ChromeVox.msgs.getMsg("braille_captions_disabled"),cvox.ChromeVox.tts.speak(a),cvox.ChromeVox.braille.write(cvox.NavBraille.fromText(a)))}; |
cvox.BrailleCaptionsBackground.getVirtualDisplayState=function(){var a=cvox.BrailleCaptionsBackground;return a.isEnabled()?{available:!0,textCellCount:40}:{available:!1}};cvox.ExpandingBrailleTranslator=function(a,b){this.defaultTranslator_=a;this.uncontractedTranslator_=b||null}; |
cvox.ExpandingBrailleTranslator.prototype.translate=function(a,b){function c(a,b,c){g.push({translator:a,start:b,end:c})}function d(a,b,c,d){a.cells=b;a.textToBraille=c;a.brailleToText=d;0>=--n&&e()}function e(){function a(b,c,d){b.push.apply(b,c.map(function(a){return d+a}))}for(var c=g.reduce(function(a,b){return a+b.cells.byteLength},0),c=new Uint8Array(c),d=0,e=[],f=[],h=0,k;k=g[h];++h)c.set(new Uint8Array(k.cells),d),a(e,k.textToBraille,d),a(f,k.brailleToText,k.start),d+=k.cells.byteLength;b(c.buffer, |
-e,f)}var f=this.findExpandRanges_(a);if(0==f.length)this.defaultTranslator_.translate(a.toString(),b);else{for(var g=[],h=0,k=0;k<f.length;++k){var l=f[k];h<l.start&&c(this.defaultTranslator_,h,l.start);c(this.uncontractedTranslator_,l.start,l.end);h=l.end}h<a.getLength()&&c(this.defaultTranslator_,h,a.getLength());for(var n=g.length,k=0;f=g[k];++k)f.translator.translate(a.toString().substring(f.start,f.end),goog.partial(d,f))}}; |
-cvox.ExpandingBrailleTranslator.rangeForPosition_=function(a,b){var c=a.substring(0,b+1).search(/(\s+|\S+)$/),d=b;b<a.length&&(d+=/^(\s+|\S+)/.exec(a.substring(b))[0].length);return{start:c,end:d}}; |
-cvox.ExpandingBrailleTranslator.prototype.findExpandRanges_=function(a){var b=a.getSpanInstanceOf(cvox.BrailleUtil.ValueSelectionSpan);if(!this.uncontractedTranslator_||!b)return[];var c=[],d=a.getSpanStart(b),e=a.getSpanEnd(b),b=[d];e>d+1&&b.push(e-1);d=null;for(e=0;e<b.length;++e){var f=cvox.ExpandingBrailleTranslator.rangeForPosition_(a.toString(),b[e]);d&&d.end>=f.start?d.end=f.end:(c.push(f),d=f)}return c};cvox.BrailleDisplayManager=function(){this.translator_=null;this.content_=new cvox.NavBraille({});this.translatedContent_=new ArrayBuffer(0);this.panPosition_=0;this.commandListener_=function(){};this.realDisplayState_=this.displayState_={available:!1,textCellCount:void 0};this.textToBraille_=[];this.brailleToText_=[];if(goog.isDef(chrome.brailleDisplayPrivate)){var a=goog.bind(this.refreshDisplayState_,this);chrome.brailleDisplayPrivate.getDisplayState(a);chrome.brailleDisplayPrivate.onDisplayStateChanged.addListener(a); |
-chrome.brailleDisplayPrivate.onKeyEvent.addListener(goog.bind(this.onKeyEvent_,this));cvox.BrailleCaptionsBackground.init(goog.bind(this.onCaptionsStateChanged_,this))}};cvox.BrailleDisplayManager.CURSOR_DOTS_=192;cvox.BrailleDisplayManager.prototype.setContent=function(a){this.translateContent_(a)};cvox.BrailleDisplayManager.prototype.setCommandListener=function(a){this.commandListener_=a}; |
+e,f)}var f=this.findExpandRanges_(a);if(0==f.length)this.defaultTranslator_.translate(a.toString(),cvox.ExpandingBrailleTranslator.nullParamsToEmptyAdapter_(a.getLength(),b));else{for(var g=[],h=0,k=0;k<f.length;++k){var l=f[k];h<l.start&&c(this.defaultTranslator_,h,l.start);c(this.uncontractedTranslator_,l.start,l.end);h=l.end}h<a.getLength()&&c(this.defaultTranslator_,h,a.getLength());for(var n=g.length,k=0;f=g[k];++k)f.translator.translate(a.toString().substring(f.start,f.end),cvox.ExpandingBrailleTranslator.nullParamsToEmptyAdapter_(f.end- |
+f.start,goog.partial(d,f)))}};cvox.ExpandingBrailleTranslator.rangeForPosition_=function(a,b){if(0>b||b>=a.length)throw Error("Position out of range looking for braille expansion range");var c=a.substring(0,b+1).search(/(\s+|\S+)$/),d=b+/^(\s+|\S+)/.exec(a.substring(b))[0].length;return{start:c,end:d}}; |
+cvox.ExpandingBrailleTranslator.prototype.findExpandRanges_=function(a){var b=[];if(this.uncontractedTranslator_){var c=a.getSpanInstanceOf(cvox.BrailleUtil.ValueSelectionSpan);if(c){var d=a.getSpanStart(c),e=a.getSpanEnd(c);if(d<a.getLength())for(c=[d],e>d+1&&c.push(e-1),d=null,e=0;e<c.length;++e){var f=cvox.ExpandingBrailleTranslator.rangeForPosition_(a.toString(),c[e]);d&&d.end>=f.start?d.end=f.end:(b.push(f),d=f)}}}return b}; |
+cvox.ExpandingBrailleTranslator.nullParamsToEmptyAdapter_=function(a,b){return function(c,d,e){b(c||new ArrayBuffer(0),d||goog.array.repeat(0,a),e||[])}};cvox.BrailleDisplayManager=function(){this.translator_=null;this.content_=new cvox.NavBraille({});this.translatedContent_=new ArrayBuffer(0);this.panPosition_=0;this.commandListener_=function(){};this.realDisplayState_=this.displayState_={available:!1,textCellCount:void 0};this.textToBraille_=[];this.brailleToText_=[];cvox.BrailleCaptionsBackground.init(goog.bind(this.onCaptionsStateChanged_,this));if(goog.isDef(chrome.brailleDisplayPrivate)){var a=goog.bind(this.refreshDisplayState_,this);chrome.brailleDisplayPrivate.getDisplayState(a); |
+chrome.brailleDisplayPrivate.onDisplayStateChanged.addListener(a);chrome.brailleDisplayPrivate.onKeyEvent.addListener(goog.bind(this.onKeyEvent_,this))}else this.onCaptionsStateChanged_()};cvox.BrailleDisplayManager.CURSOR_DOTS_=192;cvox.BrailleDisplayManager.prototype.setContent=function(a){this.translateContent_(a)};cvox.BrailleDisplayManager.prototype.setCommandListener=function(a){this.commandListener_=a}; |
cvox.BrailleDisplayManager.prototype.setTranslator=function(a,b){var c=null!=this.translator_;this.translator_=a?new cvox.ExpandingBrailleTranslator(a,b):null;this.translateContent_(this.content_);c&&!this.translator_&&this.refresh_()};cvox.BrailleDisplayManager.prototype.refreshDisplayState_=function(a){this.realDisplayState_=a;this.displayState_=a.available?a:cvox.BrailleCaptionsBackground.getVirtualDisplayState();this.panPosition_=0;this.refresh_()}; |
cvox.BrailleDisplayManager.prototype.onCaptionsStateChanged_=function(){this.refreshDisplayState_(this.realDisplayState_)}; |
cvox.BrailleDisplayManager.prototype.refresh_=function(){if(this.displayState_.available){var a=this.translatedContent_.slice(this.panPosition_,this.panPosition_+this.displayState_.textCellCount);this.realDisplayState_.available&&chrome.brailleDisplayPrivate.writeDots(a);if(cvox.BrailleCaptionsBackground.isEnabled()){var b=this.brailleToTextPosition_(this.panPosition_),c=this.brailleToTextPosition_(this.panPosition_+a.byteLength);cvox.BrailleCaptionsBackground.setContent(this.content_.text.toString().substring(b, |
c),a)}}}; |
-cvox.BrailleDisplayManager.prototype.translateContent_=function(a){this.translator_?this.translator_.translate(a.text,goog.bind(function(b,c,d){this.content_=a;b=b||new ArrayBuffer(0);c=c||[];d=d||[];var e=this.content_.startIndex,f=this.content_.endIndex;this.panPosition_=0;if(0<=e){if(e>=c.length){var e=new ArrayBuffer(b.byteLength+1),g=new Uint8Array(e);g.set(new Uint8Array(b));b=e;e=b.byteLength-1}else e=c[e];f=f>=c.length?b.byteLength:c[f];this.writeCursor_(b,e,f);this.displayState_.available&&(f= |
-this.displayState_.textCellCount,this.panPosition_=Math.floor(e/f)*f)}this.translatedContent_=b;this.brailleToText_=d;this.textToBraille_=c;this.refresh_()},this)):(this.content_=a,this.translatedContent_=new ArrayBuffer(0),this.textToBraille_.length=0,this.brailleToText_.length=0)}; |
+cvox.BrailleDisplayManager.prototype.translateContent_=function(a){this.translator_?this.translator_.translate(a.text,goog.bind(function(b,c,d){this.content_=a;var e=this.content_.startIndex,f=this.content_.endIndex;this.panPosition_=0;if(0<=e){if(e>=c.length){var e=new ArrayBuffer(b.byteLength+1),g=new Uint8Array(e);g.set(new Uint8Array(b));b=e;e=b.byteLength-1}else e=c[e];f=f>=c.length?b.byteLength:c[f];this.writeCursor_(b,e,f);this.displayState_.available&&(f=this.displayState_.textCellCount,this.panPosition_= |
+Math.floor(e/f)*f)}this.translatedContent_=b;this.brailleToText_=d;this.textToBraille_=c;this.refresh_()},this)):(this.content_=a,this.translatedContent_=new ArrayBuffer(0),this.textToBraille_.length=0,this.brailleToText_.length=0)}; |
cvox.BrailleDisplayManager.prototype.onKeyEvent_=function(a){switch(a.command){case cvox.BrailleKeyCommand.ROUTING:a.displayPosition=this.brailleToTextPosition_(a.displayPosition+this.panPosition_);case cvox.BrailleKeyCommand.LINE_UP:case cvox.BrailleKeyCommand.LINE_DOWN:case cvox.BrailleKeyCommand.TOP:case cvox.BrailleKeyCommand.BOTTOM:this.commandListener_(a,this.content_);break;case cvox.BrailleKeyCommand.PAN_LEFT:this.panLeft_();break;case cvox.BrailleKeyCommand.PAN_RIGHT:this.panRight_()}}; |
cvox.BrailleDisplayManager.prototype.panLeft_=function(){0>=this.panPosition_?this.commandListener_({command:cvox.BrailleKeyCommand.PAN_LEFT},this.content_):(this.panPosition_=Math.max(0,this.panPosition_-this.displayState_.textCellCount),this.refresh_())}; |
cvox.BrailleDisplayManager.prototype.panRight_=function(){var a=this.panPosition_+this.displayState_.textCellCount;a>=this.translatedContent_.byteLength?this.commandListener_({command:cvox.BrailleKeyCommand.PAN_RIGHT},this.content_):(this.panPosition_=a,this.refresh_())}; |
@@ -894,7 +896,7 @@ cvox.BrailleBackground.prototype.setCommandListener=function(){}; |
cvox.BrailleBackground.prototype.refreshTranslator=function(){if(this.liblouis_){var a=this.tables_,b=cvox.BrailleTable.forId(a,localStorage.brailleTable);if(!b){var c=chrome.i18n.getMessage("@@ui_locale").split(/[_-]/),d=c[0],e=c[1],c=a.filter(function(a){return a.locale.split(/[_-]/)[0]==d});0<c.length&&(b=c[0],e&&(c=c.filter(function(a){return a.locale.split(/[_-]/)[1]==e}),0<c.length&&(b=c[0])))}b||(b=cvox.BrailleTable.forId(a,"en-US-comp8"));localStorage.brailleTable=b.id;"6"==b.dots?(localStorage.brailleTableType= |
"brailleTable6",localStorage.brailleTable6=b.id):(localStorage.brailleTableType="brailleTable8",localStorage.brailleTable8=b.id);localStorage.brailleTable6||(localStorage.brailleTable6="en-US-g1");localStorage.brailleTable8||(localStorage.brailleTable8="en-US-comp8");var c=cvox.BrailleTable.forId(a,localStorage.brailleTable8),f=cvox.BrailleTable.getUncontracted(a,c?c:b);this.liblouis_.getTranslator(b.fileName,goog.bind(function(a){f.id===b.id?this.displayManager_.setTranslator(a):this.liblouis_.getTranslator(f.fileName, |
goog.bind(function(b){this.displayManager_.setTranslator(a,b)},this))},this))}};cvox.BrailleBackground.prototype.onBrailleMessage=function(a){"write"==a.action&&(this.lastContentId_=a.contentId,this.lastContent_=cvox.NavBraille.fromJson(a.params),this.displayManager_.setContent(this.lastContent_))}; |
-cvox.BrailleBackground.prototype.initialize_=function(a){cvox.ChromeVox.isChromeOS&&(5<a?console.error("Timeout waiting for document.body; not initializing braille."):document.body?(this.liblouis_=new cvox.LibLouis(chrome.extension.getURL("chromevox/background/braille/liblouis_nacl.nmf"),chrome.extension.getURL("chromevox/background/braille/tables")),this.liblouis_.attachToElement(document.body),this.refreshTranslator()):window.setTimeout(goog.bind(this.initialize_,this,++a),500))}; |
+cvox.BrailleBackground.prototype.initialize_=function(a){5<a?console.error("Timeout waiting for document.body; not initializing braille."):document.body?(this.liblouis_=new cvox.LibLouis(chrome.extension.getURL("chromevox/background/braille/liblouis_nacl.nmf"),chrome.extension.getURL("chromevox/background/braille/tables")),this.liblouis_.attachToElement(document.body),this.refreshTranslator()):window.setTimeout(goog.bind(this.initialize_,this,++a),500)}; |
cvox.BrailleBackground.prototype.sendCommand_=function(a,b){var c={message:"BRAILLE",args:a};b===this.lastContent_&&(c.contentId=this.lastContentId_);cvox.ExtensionBridge.send(c)};cvox.EarconsBackground=function(){cvox.AbstractEarcons.call(this);this.audioMap={};"false"===localStorage.earcons&&(this.enabled=!1)};goog.inherits(cvox.EarconsBackground,cvox.AbstractEarcons);cvox.EarconsBackground.prototype.getName=function(){return"ChromeVox earcons"};cvox.EarconsBackground.prototype.getBaseUrl=function(){return cvox.EarconsBackground.BASE_URL}; |
cvox.EarconsBackground.prototype.playEarcon=function(a){cvox.EarconsBackground.superClass_.playEarcon.call(this,a);if(this.enabled){window.console&&window.console.log("Earcon "+this.getEarconName(a));this.currentAudio=this.audioMap[a];this.currentAudio||(this.currentAudio=new Audio(this.getBaseUrl()+this.getEarconFilename(a)),this.audioMap[a]=this.currentAudio);try{this.currentAudio.currentTime=0}catch(b){}this.currentAudio.paused&&(this.currentAudio.volume=0.7,this.currentAudio.play())}}; |
cvox.EarconsBackground.BASE_URL="earcons/";cvox.MathUtil={};cvox.MathUtil.isMathmlNodeOfClass_=function(a,b){return-1!=b.indexOf(a.tagName.toUpperCase())};cvox.MathUtil.isMathjaxNodeOfClass_=function(a,b){if("SPAN"==a.tagName){var c=a.className.split(" ");return c.some(function(a){return-1!=b.indexOf(a.toUpperCase())})}return!1};cvox.MathUtil.isMathNodeOfClass_=function(a,b){return a.nodeType==Node.ELEMENT_NODE&&(cvox.MathUtil.isMathmlNodeOfClass_(a,b)||cvox.MathUtil.isMathjaxNodeOfClass_(a,b))};cvox.MathUtil.TOKEN_LIST="MI MN MO MTEXT MSPACE MS".split(" "); |
@@ -1032,7 +1034,7 @@ cvox.SpeechRule.Action.prototype.toString=function(){var a=this.components.map(f |
cvox.SpeechRule.splitString_=function(a,b){for(var c=[],d="";""!=a;){var e=a.search(b);if(-1==e){if(0!=(a.match(/"/g)||[]).length%2)throw new cvox.SpeechRule.OutputError("Invalid string in expression: "+a);c.push(d+a);a=d=""}else if(0==(a.substring(0,e).match(/"/g)||[]).length%2)c.push(d+a.substring(0,e)),d="",a=a.substring(e+1);else{var f=a.substring(e).search('"');if(-1==f)throw new cvox.SpeechRule.OutputError("Invalid string in expression: "+a);d+=a.substring(0,e+f+1);a=a.substring(e+f+1)}}d&& |
c.push(d);return c};cvox.SpeechRule.DynamicCstrAttrib={STYLE:"style"};cvox.SpeechRule.OutputError=function(a){this.name="RuleError";this.message=a||""};goog.inherits(cvox.SpeechRule.OutputError,Error);cvox.SpeechRuleFunctions=function(){};cvox.SpeechRuleFunctions.Store_=function(a,b){this.prefix_=a;this.store_=b};cvox.SpeechRuleFunctions.Store_.prototype.add=function(a,b){this.checkCustomFunctionSyntax_(a)&&(this.store_[a]=b)};cvox.SpeechRuleFunctions.Store_.prototype.lookup=function(a){return this.store_[a]};cvox.SpeechRuleFunctions.CustomQueries=function(){var a={};cvox.SpeechRuleFunctions.Store_.call(this,"CQF",a)};goog.inherits(cvox.SpeechRuleFunctions.CustomQueries,cvox.SpeechRuleFunctions.Store_); |
cvox.SpeechRuleFunctions.CustomStrings=function(){var a={};cvox.SpeechRuleFunctions.Store_.call(this,"CSF",a)};goog.inherits(cvox.SpeechRuleFunctions.CustomStrings,cvox.SpeechRuleFunctions.Store_);cvox.SpeechRuleFunctions.ContextFunctions=function(){var a={};cvox.SpeechRuleFunctions.Store_.call(this,"CTXF",a)};goog.inherits(cvox.SpeechRuleFunctions.ContextFunctions,cvox.SpeechRuleFunctions.Store_); |
-cvox.SpeechRuleFunctions.Store_.prototype.checkCustomFunctionSyntax_=function(a){var b=RegExp("^"+this.prefix_);return a.match(b)?!0:(console.log("FunctionError: Invalid function name. Expected prefix"+this.prefix_),!1)};cvox.BaseRuleStore=function(){this.customQueries=new cvox.SpeechRuleFunctions.CustomQueries;this.customStrings=new cvox.SpeechRuleFunctions.CustomStrings;this.contextFunctions=new cvox.SpeechRuleFunctions.ContextFunctions;this.speechRules_=[];this.dynamicCstrAttribs=[cvox.SpeechRule.DynamicCstrAttrib.STYLE];this.defaultTtsProps=[]}; |
+cvox.SpeechRuleFunctions.Store_.prototype.checkCustomFunctionSyntax_=function(a){var b=new RegExp("^"+this.prefix_);return a.match(b)?!0:(console.log("FunctionError: Invalid function name. Expected prefix"+this.prefix_),!1)};cvox.BaseRuleStore=function(){this.customQueries=new cvox.SpeechRuleFunctions.CustomQueries;this.customStrings=new cvox.SpeechRuleFunctions.CustomStrings;this.contextFunctions=new cvox.SpeechRuleFunctions.ContextFunctions;this.speechRules_=[];this.dynamicCstrAttribs=[cvox.SpeechRule.DynamicCstrAttrib.STYLE];this.defaultTtsProps=[]}; |
cvox.BaseRuleStore.prototype.lookupRule=function(a,b){if(!a||a.nodeType!=Node.ELEMENT_NODE&&a.nodeType!=Node.TEXT_NODE)return null;var c=this.speechRules_.filter(goog.bind(function(c){return this.testDynamicConstraints(b,c)&&this.testPrecondition_(a,c)},this));return 0<c.length?this.pickMostConstraint_(b,c):null}; |
cvox.BaseRuleStore.prototype.defineRule=function(a,b,c,d,e){try{var f=cvox.SpeechRule.Action.fromString(c),g=Array.prototype.slice.call(arguments,4),h=new cvox.SpeechRule.Precondition(d,g),g={};g[cvox.SpeechRule.DynamicCstrAttrib.STYLE]=b;var k=new cvox.SpeechRule(a,g,h,f)}catch(l){if("RuleError"==l.name)return console.log("Rule Error ",d,"("+b+"):",l.message),null;throw l;}this.addRule(k);return k};cvox.BaseRuleStore.prototype.addRule=function(a){this.speechRules_.unshift(a)}; |
cvox.BaseRuleStore.prototype.deleteRule=function(a){a=this.speechRules_.indexOf(a);-1!=a&&this.speechRules_.splice(a,1)};cvox.BaseRuleStore.prototype.findRule=function(a){for(var b=0,c;c=this.speechRules_[b];b++)if(a(c))return c;return null};cvox.BaseRuleStore.prototype.findAllRules=function(a){return this.speechRules_.filter(a)};cvox.BaseRuleStore.prototype.evaluateDefault=function(a){return[new cvox.NavDescription({text:a.textContent})]}; |
@@ -1132,20 +1134,20 @@ announce:!0,msgId:"next_group",skipInput:!0,category:"navigation"},jumpToTop:{fo |
forceClickOnCurrentItem:{announce:!0,disallowContinuation:!0,allowEvents:!0,msgId:"force_click_on_current_item",category:"navigation"},forceDoubleClickOnCurrentItem:{announce:!0,allowEvents:!0,disallowContinuation:!0},readLinkURL:{announce:!1,msgId:"read_link_url",category:"information"},readCurrentTitle:{announce:!1,msgId:"read_current_title",category:"information"},readCurrentURL:{announce:!1,msgId:"read_current_url",category:"information"},fullyDescribe:{announce:!1,msgId:"fully_describe",category:"information"}, |
speakTimeAndDate:{announce:!1,msgId:"speak_time_and_date",category:"information"},toggleSelection:{announce:!0,msgId:"toggle_selection",category:"information"},toggleSearchWidget:{announce:!1,disallowContinuation:!0,msgId:"toggle_search_widget",category:"information"},toggleKeyboardHelp:{announce:!1,disallowContinuation:!0,msgId:"show_power_key",category:"help_commands"},help:{announce:!1,msgId:"help",disallowOOBE:!0,disallowContinuation:!0,category:"help_commands"},contextMenu:{announce:!1,disallowContinuation:!0}, |
showOptionsPage:{announce:!1,disallowContinuation:!0,msgId:"show_options_page",disallowOOBE:!0,category:"help_commands"},showKbExplorerPage:{announce:!1,disallowContinuation:!0,msgId:"show_kb_explorer_page",disallowOOBE:!0,category:"help_commands"},showFormsList:{announce:!1,disallowContinuation:!0,nodeList:"formField",msgId:"show_forms_list",category:"overview"},showHeadingsList:{announce:!1,nodeList:"heading",disallowContinuation:!0,msgId:"show_headings_list",category:"overview"},showLandmarksList:{announce:!1, |
-nodeList:"landmark",disallowContinuation:!0,msgId:"show_landmarks_list",category:"overview"},showLinksList:{announce:!1,nodeList:"link",disallowContinuation:!0,msgId:"show_links_list",category:"overview"},showTablesList:{announce:!1,nodeList:"table",disallowContinuation:!0,msgId:"show_tables_list",category:"overview"},startHistoryRecording:{announce:!1},stopHistoryRecording:{announce:!1},enableConsoleTts:{announce:!1},toggleBrailleCaptions:{announce:!1},autorunner:{announce:!1},nextArticle:{forward:!0, |
-findNext:"article"},nextButton:{forward:!0,findNext:"button",msgId:"next_button",category:"jump_commands"},nextCheckbox:{forward:!0,findNext:"checkbox",msgId:"next_checkbox",category:"jump_commands"},nextComboBox:{forward:!0,findNext:"combobox",msgId:"next_combo_box",category:"jump_commands"},nextControl:{forward:!0,findNext:"control"},nextEditText:{forward:!0,findNext:"editText",msgId:"next_edit_text",category:"jump_commands"},nextFormField:{forward:!0,findNext:"formField",msgId:"next_form_field", |
-category:"jump_commands"},nextGraphic:{forward:!0,findNext:"graphic",msgId:"next_graphic",category:"jump_commands"},nextHeading:{forward:!0,findNext:"heading",msgId:"next_heading",category:"jump_commands"},nextHeading1:{forward:!0,findNext:"heading1",msgId:"next_heading1",category:"jump_commands"},nextHeading2:{forward:!0,findNext:"heading2",msgId:"next_heading2",category:"jump_commands"},nextHeading3:{forward:!0,findNext:"heading3",msgId:"next_heading3",category:"jump_commands"},nextHeading4:{forward:!0, |
-findNext:"heading4",msgId:"next_heading4",category:"jump_commands"},nextHeading5:{forward:!0,findNext:"heading5",msgId:"next_heading5",category:"jump_commands"},nextHeading6:{forward:!0,findNext:"heading6",msgId:"next_heading6",category:"jump_commands"},nextLandmark:{forward:!0,findNext:"landmark",msgId:"next_landmark",category:"jump_commands"},nextLink:{forward:!0,findNext:"link",msgId:"next_link",category:"jump_commands"},nextList:{forward:!0,findNext:"list",msgId:"next_list",category:"jump_commands"}, |
-nextListItem:{forward:!0,findNext:"listItem",msgId:"next_list_item",category:"jump_commands"},nextMath:{forward:!0,findNext:"math",msgId:"next_math",category:"jump_commands"},nextMedia:{forward:!0,findNext:"media",msgId:"next_media",category:"jump_commands"},nextRadio:{forward:!0,findNext:"radio",msgId:"next_radio",category:"jump_commands"},nextSection:{forward:!0,findNext:"section"},nextSlider:{forward:!0,findNext:"slider"},nextTable:{forward:!0,findNext:"table",msgId:"next_table",category:"jump_commands"}, |
-nextVisitedLink:{forward:!0,findNext:"visitedLink",msgId:"next_visited_link",category:"jump_commands"},previousArticle:{backward:!0,findNext:"article"},previousButton:{backward:!0,findNext:"button",msgId:"previous_button",category:"jump_commands"},previousCheckbox:{backward:!0,findNext:"checkbox",msgId:"previous_checkbox",category:"jump_commands"},previousComboBox:{backward:!0,findNext:"combobox",msgId:"previous_combo_box",category:"jump_commands"},previousControl:{backward:!0,findNext:"control"}, |
-previousEditText:{backward:!0,findNext:"editText",msgId:"previous_edit_text",category:"jump_commands"},previousFormField:{backward:!0,findNext:"formField",msgId:"previous_form_field",category:"jump_commands"},previousGraphic:{backward:!0,findNext:"graphic",msgId:"previous_graphic",category:"jump_commands"},previousHeading:{backward:!0,findNext:"heading",msgId:"previous_heading",category:"jump_commands"},previousHeading1:{backward:!0,findNext:"heading1",msgId:"previous_heading1",category:"jump_commands"}, |
-previousHeading2:{backward:!0,findNext:"heading2",msgId:"previous_heading2",category:"jump_commands"},previousHeading3:{backward:!0,findNext:"heading3",msgId:"previous_heading3",category:"jump_commands"},previousHeading4:{backward:!0,findNext:"heading4",msgId:"previous_heading4",category:"jump_commands"},previousHeading5:{backward:!0,findNext:"heading5",msgId:"previous_heading5",category:"jump_commands"},previousHeading6:{backward:!0,findNext:"heading6",msgId:"previous_heading6",category:"jump_commands"}, |
-previousLandmark:{backward:!0,findNext:"landmark",msgId:"previous_landmark",category:"jump_commands"},previousLink:{backward:!0,findNext:"link",msgId:"previous_link",category:"jump_commands"},previousList:{backward:!0,findNext:"list",msgId:"previous_list",category:"jump_commands"},previousListItem:{backward:!0,findNext:"listItem",msgId:"previous_list_item",category:"jump_commands"},previousMath:{backward:!0,findNext:"math",msgId:"previous_math",category:"jump_commands"},previousMedia:{backward:!0, |
-findNext:"media",msgId:"previous_media",category:"jump_commands"},previousRadio:{backward:!0,findNext:"radio",msgId:"previous_radio",category:"jump_commands"},previousSection:{backward:!0,findNext:"section"},previousSlider:{backward:!0,findNext:"slider"},previousTable:{backward:!0,findNext:"table",msgId:"previous_table",category:"jump_commands"},previousVisitedLink:{backward:!0,findNext:"visitedLink",msgId:"previous_visited_link",category:"jump_commands"},announceHeaders:{announce:!1,msgId:"announce_headers", |
-category:"tables"},speakTableLocation:{announce:!1,msgId:"speak_table_location",category:"tables"},goToFirstCell:{announce:!0,msgId:"skip_to_beginning",category:"tables"},goToLastCell:{announce:!0,msgId:"skip_to_end",category:"tables"},goToRowFirstCell:{announce:!0,msgId:"skip_to_row_beginning",category:"tables"},goToRowLastCell:{announce:!0,msgId:"skip_to_row_end",category:"tables"},goToColFirstCell:{announce:!0,msgId:"skip_to_col_beginning",category:"tables"},goToColLastCell:{announce:!0,msgId:"skip_to_col_end", |
-category:"tables"},previousRow:{backward:!0,announce:!0,skipInput:!0},previousCol:{backward:!0,announce:!0,skipInput:!0},nextRow:{forward:!0,announce:!0,skipInput:!0},nextCol:{forward:!0,announce:!0,skipInput:!0},enterShifter:{announce:!0,msgId:"enter_content",category:"navigation"},exitShifter:{announce:!0,msgId:"exit_content",category:"navigation"},exitShifterContent:{announce:!0},openLongDesc:{announce:!1,msgId:"open_long_desc",category:"information"},pauseAllMedia:{announce:!1,msgId:"pause_all_media", |
-category:"information"},toggleSemantics:{announce:!1,msgId:"toggle_semantics",category:"information"},routing:{announce:!1,allowEvents:!0,msgId:"braille_routing",category:"braille"},pan_left:{backward:!0,announce:!0,msgId:"braille_pan_left",category:"braille"},pan_right:{forward:!0,announce:!0,msgId:"braille_pan_right",category:"braille"},line_up:{backward:!0,announce:!0,msgId:"braille_line_up",category:"braille"},line_down:{forward:!0,announce:!0,msgId:"braille_line_down",category:"braille"},top:{forward:!0, |
-announce:!0,msgId:"braille_top",category:"braille"},bottom:{backward:!0,announce:!0,msgId:"braille_bottom",category:"braille"},debug:{announce:!1},nop:{announce:!1}}; |
+nodeList:"landmark",disallowContinuation:!0,msgId:"show_landmarks_list",category:"overview"},showLinksList:{announce:!1,nodeList:"link",disallowContinuation:!0,msgId:"show_links_list",category:"overview"},showTablesList:{announce:!1,nodeList:"table",disallowContinuation:!0,msgId:"show_tables_list",category:"overview"},nextArticle:{forward:!0,findNext:"article"},nextButton:{forward:!0,findNext:"button",msgId:"next_button",category:"jump_commands"},nextCheckbox:{forward:!0,findNext:"checkbox",msgId:"next_checkbox", |
+category:"jump_commands"},nextComboBox:{forward:!0,findNext:"combobox",msgId:"next_combo_box",category:"jump_commands"},nextControl:{forward:!0,findNext:"control"},nextEditText:{forward:!0,findNext:"editText",msgId:"next_edit_text",category:"jump_commands"},nextFormField:{forward:!0,findNext:"formField",msgId:"next_form_field",category:"jump_commands"},nextGraphic:{forward:!0,findNext:"graphic",msgId:"next_graphic",category:"jump_commands"},nextHeading:{forward:!0,findNext:"heading",msgId:"next_heading", |
+category:"jump_commands"},nextHeading1:{forward:!0,findNext:"heading1",msgId:"next_heading1",category:"jump_commands"},nextHeading2:{forward:!0,findNext:"heading2",msgId:"next_heading2",category:"jump_commands"},nextHeading3:{forward:!0,findNext:"heading3",msgId:"next_heading3",category:"jump_commands"},nextHeading4:{forward:!0,findNext:"heading4",msgId:"next_heading4",category:"jump_commands"},nextHeading5:{forward:!0,findNext:"heading5",msgId:"next_heading5",category:"jump_commands"},nextHeading6:{forward:!0, |
+findNext:"heading6",msgId:"next_heading6",category:"jump_commands"},nextLandmark:{forward:!0,findNext:"landmark",msgId:"next_landmark",category:"jump_commands"},nextLink:{forward:!0,findNext:"link",msgId:"next_link",category:"jump_commands"},nextList:{forward:!0,findNext:"list",msgId:"next_list",category:"jump_commands"},nextListItem:{forward:!0,findNext:"listItem",msgId:"next_list_item",category:"jump_commands"},nextMath:{forward:!0,findNext:"math",msgId:"next_math",category:"jump_commands"},nextMedia:{forward:!0, |
+findNext:"media",msgId:"next_media",category:"jump_commands"},nextRadio:{forward:!0,findNext:"radio",msgId:"next_radio",category:"jump_commands"},nextSection:{forward:!0,findNext:"section"},nextSlider:{forward:!0,findNext:"slider"},nextTable:{forward:!0,findNext:"table",msgId:"next_table",category:"jump_commands"},nextVisitedLink:{forward:!0,findNext:"visitedLink",msgId:"next_visited_link",category:"jump_commands"},previousArticle:{backward:!0,findNext:"article"},previousButton:{backward:!0,findNext:"button", |
+msgId:"previous_button",category:"jump_commands"},previousCheckbox:{backward:!0,findNext:"checkbox",msgId:"previous_checkbox",category:"jump_commands"},previousComboBox:{backward:!0,findNext:"combobox",msgId:"previous_combo_box",category:"jump_commands"},previousControl:{backward:!0,findNext:"control"},previousEditText:{backward:!0,findNext:"editText",msgId:"previous_edit_text",category:"jump_commands"},previousFormField:{backward:!0,findNext:"formField",msgId:"previous_form_field",category:"jump_commands"}, |
+previousGraphic:{backward:!0,findNext:"graphic",msgId:"previous_graphic",category:"jump_commands"},previousHeading:{backward:!0,findNext:"heading",msgId:"previous_heading",category:"jump_commands"},previousHeading1:{backward:!0,findNext:"heading1",msgId:"previous_heading1",category:"jump_commands"},previousHeading2:{backward:!0,findNext:"heading2",msgId:"previous_heading2",category:"jump_commands"},previousHeading3:{backward:!0,findNext:"heading3",msgId:"previous_heading3",category:"jump_commands"}, |
+previousHeading4:{backward:!0,findNext:"heading4",msgId:"previous_heading4",category:"jump_commands"},previousHeading5:{backward:!0,findNext:"heading5",msgId:"previous_heading5",category:"jump_commands"},previousHeading6:{backward:!0,findNext:"heading6",msgId:"previous_heading6",category:"jump_commands"},previousLandmark:{backward:!0,findNext:"landmark",msgId:"previous_landmark",category:"jump_commands"},previousLink:{backward:!0,findNext:"link",msgId:"previous_link",category:"jump_commands"},previousList:{backward:!0, |
+findNext:"list",msgId:"previous_list",category:"jump_commands"},previousListItem:{backward:!0,findNext:"listItem",msgId:"previous_list_item",category:"jump_commands"},previousMath:{backward:!0,findNext:"math",msgId:"previous_math",category:"jump_commands"},previousMedia:{backward:!0,findNext:"media",msgId:"previous_media",category:"jump_commands"},previousRadio:{backward:!0,findNext:"radio",msgId:"previous_radio",category:"jump_commands"},previousSection:{backward:!0,findNext:"section"},previousSlider:{backward:!0, |
+findNext:"slider"},previousTable:{backward:!0,findNext:"table",msgId:"previous_table",category:"jump_commands"},previousVisitedLink:{backward:!0,findNext:"visitedLink",msgId:"previous_visited_link",category:"jump_commands"},announceHeaders:{announce:!1,msgId:"announce_headers",category:"tables"},speakTableLocation:{announce:!1,msgId:"speak_table_location",category:"tables"},goToFirstCell:{announce:!0,msgId:"skip_to_beginning",category:"tables"},goToLastCell:{announce:!0,msgId:"skip_to_end",category:"tables"}, |
+goToRowFirstCell:{announce:!0,msgId:"skip_to_row_beginning",category:"tables"},goToRowLastCell:{announce:!0,msgId:"skip_to_row_end",category:"tables"},goToColFirstCell:{announce:!0,msgId:"skip_to_col_beginning",category:"tables"},goToColLastCell:{announce:!0,msgId:"skip_to_col_end",category:"tables"},previousRow:{backward:!0,announce:!0,skipInput:!0},previousCol:{backward:!0,announce:!0,skipInput:!0},nextRow:{forward:!0,announce:!0,skipInput:!0},nextCol:{forward:!0,announce:!0,skipInput:!0},enterShifter:{announce:!0, |
+msgId:"enter_content",category:"navigation"},exitShifter:{announce:!0,msgId:"exit_content",category:"navigation"},exitShifterContent:{announce:!0},openLongDesc:{announce:!1,msgId:"open_long_desc",category:"information"},pauseAllMedia:{announce:!1,msgId:"pause_all_media",category:"information"},toggleSemantics:{announce:!1,msgId:"toggle_semantics",category:"information"},routing:{announce:!1,allowEvents:!0,msgId:"braille_routing",category:"braille"},pan_left:{backward:!0,announce:!0,msgId:"braille_pan_left", |
+category:"braille"},pan_right:{forward:!0,announce:!0,msgId:"braille_pan_right",category:"braille"},line_up:{backward:!0,announce:!0,msgId:"braille_line_up",category:"braille"},line_down:{forward:!0,announce:!0,msgId:"braille_line_down",category:"braille"},top:{forward:!0,announce:!0,msgId:"braille_top",category:"braille"},bottom:{backward:!0,announce:!0,msgId:"braille_bottom",category:"braille"},enableConsoleTts:{announce:!1,msgId:"enable_tts_log",category:"developer"},toggleBrailleCaptions:{announce:!1, |
+msgId:"braille_captions",category:"developer"},startHistoryRecording:{announce:!1},stopHistoryRecording:{announce:!1},autorunner:{announce:!1},debug:{announce:!1},nop:{announce:!1}}; |
cvox.CommandStore.NODE_INFO_MAP={checkbox:{predicate:"checkboxPredicate",forwardError:"no_next_checkbox",backwardError:"no_previous_checkbox",typeMsg:"aria_role_checkbox"},radio:{predicate:"radioPredicate",forwardError:"no_next_radio_button",backwardError:"no_previous_radio_button",typeMsg:"aria_role_radio"},slider:{predicate:"sliderPredicate",forwardError:"no_next_slider",backwardError:"no_previous_slider",typeMsg:"aria_role_slider"},graphic:{predicate:"graphicPredicate",forwardError:"no_next_graphic", |
backwardError:"no_previous_graphic",typeMsg:"UNUSED"},article:{predicate:"articlePredicate",forwardError:"no_next_ARTICLE",backwardError:"no_previous_ARTICLE",typeMsg:"TAG_ARTICLE"},button:{predicate:"buttonPredicate",forwardError:"no_next_button",backwardError:"no_previous_button",typeMsg:"aria_role_button"},combobox:{predicate:"comboBoxPredicate",forwardError:"no_next_combo_box",backwardError:"no_previous_combo_box",typeMsg:"aria_role_combobox"},editText:{predicate:"editTextPredicate",forwardError:"no_next_edit_text", |
backwardError:"no_previous_edit_text",typeMsg:"input_type_text"},heading:{predicate:"headingPredicate",forwardError:"no_next_heading",backwardError:"no_previous_heading",typeMsg:"aria_role_heading"},heading1:{predicate:"heading1Predicate",forwardError:"no_next_heading_1",backwardError:"no_previous_heading_1"},heading2:{predicate:"heading2Predicate",forwardError:"no_next_heading_2",backwardError:"no_previous_heading_2"},heading3:{predicate:"heading3Predicate",forwardError:"no_next_heading_3",backwardError:"no_previous_heading_3"}, |
@@ -1434,7 +1436,7 @@ cvox.NavigationManager.prototype.syncAll=function(a){this.sync();this.setFocus(a |
cvox.NavigationManager.prototype.togglePageSel=function(){this.pageSel_=this.pageSel_?null:new cvox.PageSelection(this.curSel_.setReversed(!1));return!!this.pageSel_}; |
cvox.NavigationManager.prototype.getDescription=function(){if(this.getCurrentNode().hasAttribute&&this.getCurrentNode().hasAttribute("cvoxnodedesc")){for(var a=cvox.ChromeVoxJSON.parse(this.getCurrentNode().getAttribute("cvoxnodedesc")),b=[],c=0;c<a.length;++c){var d=a[c];b.push(new cvox.NavDescription({context:d.context,text:d.text,userValue:d.userValue,annotation:d.annotation}))}return b}var e=this.pageSel_?this.pageSel_.getDescription(this.shifter_,this.prevSel_,this.curSel_):this.shifter_.getDescription(this.prevSel_, |
this.curSel_),a=[];this.skipped_&&(a.push(cvox.AbstractEarcons.PARAGRAPH_BREAK),this.skipped_=!1);this.recovered_&&(a.push(cvox.AbstractEarcons.FONT_CHANGE),this.recovered_=!1);this.pageEnd_&&(a.push(cvox.AbstractEarcons.WRAP),this.pageEnd_=!1);this.enteredShifter_&&(a.push(cvox.AbstractEarcons.OBJECT_ENTER),this.enteredShifter_=!1);this.exitedShifter_&&(a.push(cvox.AbstractEarcons.OBJECT_EXIT),this.exitedShifter_=!1);0<a.length&&0<e.length&&a.forEach(function(a){e[0].pushEarcon(a)});return e}; |
-cvox.NavigationManager.prototype.getBraille=function(){return cvox.PlatformUtil.matchesPlatform(cvox.PlatformFilter.ANDROID|cvox.PlatformFilter.CHROMEOS)?this.shifter_.getBraille(this.prevSel_,this.curSel_):new cvox.NavBraille({})}; |
+cvox.NavigationManager.prototype.getBraille=function(){return this.shifter_.getBraille(this.prevSel_,this.curSel_)}; |
cvox.NavigationManager.prototype.performAction=function(a){switch(a){case "enterShifter":case "enterShifterSilently":for(var b=this.shifterTypes_.length-1,c;c=this.shifterTypes_[b];b--)if((c=c.create(this.curSel_))&&c.getName()!=this.shifter_.getName()){this.shifterStack_.push(this.shifter_);this.shifter_=c;this.sync();this.enteredShifter_="enterShifterSilently"!=a;break}else if(c&&this.shifter_.getName()==c.getName())break;break;case "exitShifter":if(0==this.shifterStack_.length)return!1;this.shifter_= |
this.shifterStack_.pop();this.sync();this.exitedShifter_=!0;break;case "exitShifterContent":if(0==this.shifterStack_.length)return!1;this.updateSel(this.shifter_.performAction(a,this.curSel_));this.shifter_=this.shifterStack_.pop()||this.shifter_;this.sync();this.exitedShifter_=!0;break;default:return this.shifter_.hasAction(a)?this.updateSel(this.shifter_.performAction(a,this.curSel_)):!1}return!0};cvox.NavigationManager.prototype.getGranularityMsg=function(){return this.shifter_.getGranularityMsg()}; |
cvox.NavigationManager.prototype.makeMoreGranular=function(a){this.shifter_.makeMoreGranular();this.sync();this.persistGranularity_(a)};cvox.NavigationManager.prototype.makeLessGranular=function(a){this.shifter_.makeLessGranular();this.sync();this.persistGranularity_(a)};cvox.NavigationManager.prototype.setGranularity=function(a,b,c){!b&&0<this.shifterStack_.length||(this.shifter_=this.shifterStack_.shift()||this.shifter_,this.shifter_.setGranularity(a),this.persistGranularity_(c))}; |
@@ -1473,8 +1475,8 @@ c[d].text.toLowerCase(),f=e.indexOf(a);-1!=f&&e.length>a.length&&(c[d].text=cvox |
cvox.SearchWidget.prototype.next_=function(a,b){cvox.ChromeVox.navigationManager.setReversed(!!b);var c=!1;this.getPredicate()?(c=cvox.ChromeVox.navigationManager.findNext(this.getPredicate()),cvox.ChromeVox.navigationManager.setReversed(!!b),c||(cvox.ChromeVox.navigationManager.syncToBeginning(),cvox.ChromeVox.earcons.playEarcon(cvox.AbstractEarcons.WRAP),c=!0)):c=cvox.ChromeVox.navigationManager.navigate(!0);c=c?this.getNextResult_(a):null;this.outputSearchResult_(c,a);this.onNavigate();return c}; |
cvox.SearchWidget.prototype.outputSearchResult_=function(a,b){cvox.ChromeVox.tts.stop();a?(this.hasMatch_=!0,cvox.ChromeVoxEventSuspender.withSuspendedEvents(goog.bind(cvox.ChromeVox.navigationManager.syncAll,cvox.ChromeVox.navigationManager))(!0),cvox.ChromeVox.navigationManager.speakDescriptionArray(a,cvox.AbstractTts.QUEUE_MODE_FLUSH,null,cvox.AbstractTts.PERSONALITY_ANNOUNCEMENT),cvox.ChromeVox.tts.speak(cvox.ChromeVox.msgs.getMsg("search_help_item"),cvox.AbstractTts.QUEUE_MODE_QUEUE,cvox.AbstractTts.PERSONALITY_ANNOTATION), |
this.outputSearchResultToBraille_(b)):(cvox.ChromeVox.earcons.playEarcon(cvox.AbstractEarcons.WRAP),this.hasMatch_=!1)}; |
-cvox.SearchWidget.prototype.outputSearchResultToBraille_=function(a){if(cvox.ChromeVox.braille){var b=this.textFromCurrentDescription_(),c=this.caseSensitive_?b:b.toLowerCase();a=this.caseSensitive_?a:a.toLowerCase();c=c.indexOf(a);if(-1==c)console.log("Search string not in result when preparing for Braille.");else{var d=b.length,b=cvox.ChromeVox.msgs.getMsg("mark_as_search_result_brl",[b]),e=b.length,c=c+(e-d);cvox.ChromeVox.braille.write(new cvox.NavBraille({text:b,startIndex:c+a.length,endIndex:c+ |
-a.length}))}}};cvox.SearchWidget.prototype.textFromCurrentDescription_=function(){for(var a=cvox.ChromeVox.navigationManager.getDescription(),b="",c=0;c<a.length;c++)b+=a[c].text+" ";return b};cvox.SearchWidget.prototype.handleSearchChanged_=function(a){a=a.target.value+a.data;cvox.SearchWidget.prototype.beginSearch_(a)};cvox.OverlayWidget=function(a){cvox.SearchWidget.call(this);this.snippet_=a};goog.inherits(cvox.OverlayWidget,cvox.SearchWidget); |
+cvox.SearchWidget.prototype.outputSearchResultToBraille_=function(a){var b=this.textFromCurrentDescription_(),c=this.caseSensitive_?b:b.toLowerCase();a=this.caseSensitive_?a:a.toLowerCase();c=c.indexOf(a);if(-1==c)console.log("Search string not in result when preparing for Braille.");else{var d=b.length,b=cvox.ChromeVox.msgs.getMsg("mark_as_search_result_brl",[b]),e=b.length,c=c+(e-d);cvox.ChromeVox.braille.write(new cvox.NavBraille({text:b,startIndex:c+a.length,endIndex:c+a.length}))}}; |
+cvox.SearchWidget.prototype.textFromCurrentDescription_=function(){for(var a=cvox.ChromeVox.navigationManager.getDescription(),b="",c=0;c<a.length;c++)b+=a[c].text+" ";return b};cvox.SearchWidget.prototype.handleSearchChanged_=function(a){a=a.target.value+a.data;cvox.SearchWidget.prototype.beginSearch_(a)};cvox.OverlayWidget=function(a){cvox.SearchWidget.call(this);this.snippet_=a};goog.inherits(cvox.OverlayWidget,cvox.SearchWidget); |
cvox.OverlayWidget.prototype.show=function(){cvox.OverlayWidget.superClass_.show.call(this);var a=document.createElement("DIV");a.innerHTML=this.snippet_;var b=cvox.DomUtil.elementToPoint(cvox.ChromeVox.navigationManager.getCurrentNode());a.style.position="absolute";a.style.left=b.x;a.style.top=b.y;document.body.appendChild(a);cvox.ChromeVox.navigationManager.updateSelToArbitraryNode(a);this.host_=a};cvox.OverlayWidget.prototype.hide=function(){this.host_.remove();cvox.OverlayWidget.superClass_.hide.call(this)}; |
cvox.OverlayWidget.prototype.onKeyDown=function(a){cvox.OverlayWidget.superClass_.onKeyDown.call(this,a);if(13==a.keyCode||27==a.keyCode)return!0;a=cvox.ChromeVox.navigationManager.isReversed();cvox.DomUtil.isDescendantOfNode(cvox.ChromeVox.navigationManager.getCurrentNode(),this.host_)||(a?cvox.ChromeVox.navigationManager.syncToBeginning():cvox.ChromeVox.navigationManager.updateSelToArbitraryNode(this.host_),this.onNavigate(),cvox.ChromeVox.navigationManager.speakDescriptionArray(cvox.ChromeVox.navigationManager.getDescription(), |
0,null))};cvox.KeyboardHelpWidget=function(){cvox.OverlayWidget.call(this,"");this.container_=document.createElement("div");var a=cvox.ChromeVoxKbHandler.handlerKeyMap;a.bindings().forEach(goog.bind(function(a){var c=a.command;a=a.sequence;var d=c;try{var e=cvox.CommandStore.messageForCommand(c);if(!e)return;d=cvox.ChromeVox.msgs.getMsg(e)}catch(f){}e=document.createElement("p");e.id=c;e.setAttribute("role","menuitem");e.textContent=d+" - "+cvox.KeyUtil.keySequenceToString(a,!0);this.container_.appendChild(e)}, |
@@ -1552,8 +1554,8 @@ cvox.ChromeVoxEventWatcher.cleanup=function(a){for(var b=0;b<cvox.ChromeVoxEvent |
cvox.ChromeVoxEventWatcher.currentMediaHandler.shutdown();cvox.ChromeVoxEventWatcher.mutationObserver_&&cvox.ChromeVoxEventWatcher.mutationObserver_.disconnect();cvox.ChromeVoxEventWatcher.mutationObserver_=null};cvox.ChromeVoxEventWatcher.addEventListener_=function(a,b,c,d){cvox.ChromeVoxEventWatcher.listeners_.push({type:b,listener:c,useCapture:d});a.addEventListener(b,c,d)};cvox.ChromeVoxEventWatcher.getLastFocusedNode=function(){return cvox.ChromeVoxEventWatcher.lastFocusedNode}; |
cvox.ChromeVoxEventWatcher.setLastFocusedNode_=function(a){cvox.ChromeVoxEventWatcher.lastFocusedNode=a;cvox.ChromeVoxEventWatcher.lastFocusedNodeValue=a?cvox.DomUtil.getControlValueAndStateString(a):null}; |
cvox.ChromeVoxEventWatcher.mutationHandler=function(a){if(cvox.ChromeVoxEventSuspender.areEventsSuspended())return!0;cvox.ChromeVox.navigationManager.updateIndicatorIfChanged();cvox.LiveRegions.processMutations(a,function(a,c){var d=new window.Event("LiveRegion");d.navDescriptions=c;d.assertive=a;cvox.ChromeVoxEventWatcher.addEvent(d);return!0})}; |
-cvox.ChromeVoxEventWatcher.mouseClickEventWatcher=function(a){cvox.PlatformUtil.matchesPlatform(cvox.PlatformFilter.WML)&&!a.fromCvox&&cvox.ApiImplementation.syncToNode(a.target,!0);return cvox.ChromeVox.host.mustRedispatchClickEvent()&&!a.fromCvox?(cvox.ChromeVoxUserCommands.wasMouseClicked=!0,a.stopPropagation(),a.preventDefault(),cvox.Focuser.setFocus(cvox.ChromeVox.navigationManager.getCurrentNode()),cvox.ChromeVox.tts.speak(cvox.ChromeVox.msgs.getMsg("element_clicked"),cvox.AbstractTts.QUEUE_MODE_FLUSH, |
-cvox.AbstractTts.PERSONALITY_ANNOTATION),a=cvox.ChromeVox.navigationManager.getCurrentNode(),cvox.DomUtil.clickElem(a,!1,!0),!1):cvox.ChromeVoxUserCommands.wasMouseClicked=!0}; |
+cvox.ChromeVoxEventWatcher.mouseClickEventWatcher=function(a){if(a.fromCvox)return!0;if(cvox.ChromeVox.host.mustRedispatchClickEvent())return cvox.ChromeVoxUserCommands.wasMouseClicked=!0,a.stopPropagation(),a.preventDefault(),cvox.Focuser.setFocus(cvox.ChromeVox.navigationManager.getCurrentNode()),cvox.ChromeVox.tts.speak(cvox.ChromeVox.msgs.getMsg("element_clicked"),cvox.AbstractTts.QUEUE_MODE_FLUSH,cvox.AbstractTts.PERSONALITY_ANNOTATION),a=cvox.ChromeVox.navigationManager.getCurrentNode(),cvox.DomUtil.clickElem(a, |
+!1,!0),!1;cvox.ChromeVoxEventWatcher.addEvent(a);return cvox.ChromeVoxUserCommands.wasMouseClicked=!0}; |
cvox.ChromeVoxEventWatcher.mouseOverEventWatcher=function(a){if(!cvox.ChromeVoxEventWatcher.focusFollowsMouse||cvox.DomUtil.isDescendantOfNode(cvox.ChromeVoxEventWatcher.announcedMouseOverNode,a.target)||a.target==cvox.ChromeVoxEventWatcher.pendingMouseOverNode)return!0;cvox.ChromeVoxEventWatcher.pendingMouseOverNode=a.target;cvox.ChromeVoxEventWatcher.mouseOverTimeoutId&&(window.clearTimeout(cvox.ChromeVoxEventWatcher.mouseOverTimeoutId),cvox.ChromeVoxEventWatcher.mouseOverTimeoutId=null);if(a.target.tagName&& |
"BODY"==a.target.tagName)return cvox.ChromeVoxEventWatcher.pendingMouseOverNode=null,cvox.ChromeVoxEventWatcher.announcedMouseOverNode=null,!0;cvox.ChromeVoxEventWatcher.mouseOverTimeoutId=window.setTimeout(function(){cvox.ChromeVoxEventWatcher.mouseOverTimeoutId=null;if(a.target==cvox.ChromeVoxEventWatcher.pendingMouseOverNode){cvox.ChromeVox.navigationManager.stopReading(!0);var b=a.target;cvox.Focuser.setFocus(b);cvox.ApiImplementation.syncToNode(b,!0,cvox.AbstractTts.QUEUE_MODE_FLUSH);cvox.ChromeVoxEventWatcher.announcedMouseOverNode= |
b}},cvox.ChromeVoxEventWatcher.mouseoverDelayMs);return!0};cvox.ChromeVoxEventWatcher.mouseOutEventWatcher=function(a){a.target==cvox.ChromeVoxEventWatcher.pendingMouseOverNode&&(cvox.ChromeVoxEventWatcher.pendingMouseOverNode=null,cvox.ChromeVoxEventWatcher.mouseOverTimeoutId&&(window.clearTimeout(cvox.ChromeVoxEventWatcher.mouseOverTimeoutId),cvox.ChromeVoxEventWatcher.mouseOverTimeoutId=null));return!0}; |
@@ -1590,13 +1592,13 @@ cvox.ChromeVoxEventWatcherUtil.shouldWaitToProcess=function(a,b,c){a=c-a;b=c-b;r |
cvox.ChromeVoxEventWatcher.processQueue_=function(){if(0!=cvox.ChromeVoxEventWatcher.events_.length){var a=cvox.ChromeVoxEventWatcher.events_,b=-1,c=0,d,e;for(e=0;d=a[e];e++)"focus"==d.type&&(b=e,c=d.timeStamp);cvox.ChromeVoxEventWatcher.events_=[];for(e=0;d=a[e];e++){var f=a[e-1]||{};!(e>=b||"LiveRegion"==d.type||"DOMSubtreeModified"==d.type)||"focus"==f.type&&"change"==d.type||cvox.ChromeVoxEventWatcher.events_.push(d)}cvox.ChromeVoxEventWatcher.events_.sort(function(a,b){return"LiveRegion"!=b.type&& |
"LiveRegion"==a.type||"DOMSubtreeModified"!=b.type&&"DOMSubtreeModified"==a.type?1:-1});a=(new Date).getTime();if(0<=b&&cvox.ChromeVoxEventWatcherUtil.shouldWaitToProcess(c,cvox.ChromeVoxEventWatcher.firstUnprocessedEventTime,a))window.setTimeout(cvox.ChromeVoxEventWatcher.processQueue_,cvox.ChromeVoxEventWatcher.WAIT_TIME_MS_);else{for(e=0;d=cvox.ChromeVoxEventWatcher.events_[e];e++)cvox.ChromeVoxEventWatcher.handleEvent_(d),cvox.ChromeVoxEventWatcher.processing_=!0;cvox.ChromeVoxEventWatcher.processing_= |
!1;cvox.ChromeVoxEventWatcher.events_=[];cvox.ChromeVoxEventWatcher.firstUnprocessedEventTime=-1;cvox.ChromeVoxEventWatcher.queueProcessingScheduled_=!1;cvox.ChromeVoxEventWatcher.maybeCallReadyCallbacks_()}}}; |
-cvox.ChromeVoxEventWatcher.handleEvent_=function(a){switch(a.type){case "keydown":cvox.ChromeVoxEventWatcher.setUpTextHandler();if(cvox.ChromeVoxEventWatcher.currentTextControl&&(cvox.ChromeVoxEventWatcher.handleTextChanged(!0),(a=cvox.ChromeVoxEventWatcher.currentTextHandler)&&a.lastChangeDescribed))break;cvox.ChromeVoxEventWatcher.handleControlChanged(document.activeElement);break;case "keypress":cvox.ChromeVoxEventWatcher.setUpTextHandler();break;case "focus":cvox.ChromeVoxEventWatcher.focusHandler(a); |
-break;case "blur":cvox.ChromeVoxEventWatcher.setUpTextHandler();break;case "change":cvox.ChromeVoxEventWatcher.changeHandler(a);break;case "select":cvox.ChromeVoxEventWatcher.setUpTextHandler();break;case "LiveRegion":cvox.ChromeVoxEventWatcher.speakLiveRegion_(a.assertive,a.navDescriptions);break;case "DOMSubtreeModified":cvox.ChromeVoxEventWatcher.subtreeModifiedHandler(a)}}; |
+cvox.ChromeVoxEventWatcher.handleEvent_=function(a){switch(a.type){case "keydown":cvox.ChromeVoxEventWatcher.setUpTextHandler();if(cvox.ChromeVoxEventWatcher.currentTextControl&&(cvox.ChromeVoxEventWatcher.handleTextChanged(!0),(a=cvox.ChromeVoxEventWatcher.currentTextHandler)&&a.lastChangeDescribed))break;cvox.ChromeVoxEventWatcher.handleControlChanged(document.activeElement);break;case "keypress":cvox.ChromeVoxEventWatcher.setUpTextHandler();break;case "click":cvox.ApiImplementation.syncToNode(a.target, |
+!0);break;case "focus":cvox.ChromeVoxEventWatcher.focusHandler(a);break;case "blur":cvox.ChromeVoxEventWatcher.setUpTextHandler();break;case "change":cvox.ChromeVoxEventWatcher.changeHandler(a);break;case "select":cvox.ChromeVoxEventWatcher.setUpTextHandler();break;case "LiveRegion":cvox.ChromeVoxEventWatcher.speakLiveRegion_(a.assertive,a.navDescriptions);break;case "DOMSubtreeModified":cvox.ChromeVoxEventWatcher.subtreeModifiedHandler(a)}}; |
cvox.ChromeVoxEventWatcher.setUpTimeHandler_=function(){var a=document.activeElement;a&&a.hasAttribute&&"true"==a.getAttribute("aria-hidden")&&"true"!=a.getAttribute("chromevoxignoreariahidden")&&(a=null);cvox.ChromeVoxEventWatcher.currentTimeHandler=a.constructor==HTMLInputElement&&a.type&&"time"==a.type?new cvox.ChromeVoxHTMLTimeWidget(a,cvox.ChromeVox.tts):null;return null!=cvox.ChromeVoxEventWatcher.currentTimeHandler}; |
cvox.ChromeVoxEventWatcher.setUpMediaHandler_=function(){var a=document.activeElement;a&&a.hasAttribute&&"true"==a.getAttribute("aria-hidden")&&"true"!=a.getAttribute("chromevoxignoreariahidden")&&(a=null);cvox.ChromeVoxEventWatcher.currentMediaHandler=a.constructor==HTMLVideoElement||a.constructor==HTMLAudioElement?new cvox.ChromeVoxHTMLMediaWidget(a,cvox.ChromeVox.tts):null;return null!=cvox.ChromeVoxEventWatcher.currentMediaHandler}; |
cvox.ChromeVoxEventWatcher.setUpDateHandler_=function(){var a=document.activeElement;a&&a.hasAttribute&&"true"==a.getAttribute("aria-hidden")&&"true"!=a.getAttribute("chromevoxignoreariahidden")&&(a=null);cvox.ChromeVoxEventWatcher.currentDateHandler=a.constructor!=HTMLInputElement||!a.type||"date"!=a.type&&"month"!=a.type&&"week"!=a.type?null:new cvox.ChromeVoxHTMLDateWidget(a,cvox.ChromeVox.tts);return null!=cvox.ChromeVoxEventWatcher.currentDateHandler};cvox.InitialSpeech={};window.INJECTED_AFTER_LOAD||(window.INJECTED_AFTER_LOAD=!1); |
-cvox.InitialSpeech.speak=function(){var a=window.INJECTED_AFTER_LOAD;if(!cvox.ChromeVox.isActive||document.webkitHidden)a=!0;window.top==window&&(document.title&&!a&&cvox.ChromeVox.tts.speak(document.title,cvox.AbstractTts.QUEUE_MODE_FLUSH),cvox.BrailleOverlayWidget.getInstance().init());cvox.LiveRegions.init(new Date,cvox.AbstractTts.QUEUE_MODE_QUEUE,a);document.hasFocus()&&document.activeElement==document.body&&cvox.ChromeVox.navigationManager.syncToBeginning();if(cvox.ChromeVox.position[document.location.href]){var b= |
-cvox.ChromeVox.position[document.location.href];cvox.ChromeVox.navigationManager.updateSelToArbitraryNode(document.elementFromPoint(b.x,b.y))}document.hasFocus()&&(a||cvox.ChromeVoxEventSuspender.withSuspendedEvents(function(){cvox.ChromeVox.navigationManager.finishNavCommand("",!0,cvox.AbstractTts.QUEUE_MODE_QUEUE)})())};cvox.PdfProcessor={}; |
+cvox.InitialSpeech.speak=function(){var a=window.INJECTED_AFTER_LOAD;if(!cvox.ChromeVox.isActive||document.webkitHidden)a=!0;if(window.top==window){var b=document.title,c=document.querySelector("head > title");c&&"true"==c.getAttribute("aria-hidden")&&(b=null);b&&!a&&cvox.ChromeVox.tts.speak(b,cvox.AbstractTts.QUEUE_MODE_FLUSH);cvox.BrailleOverlayWidget.getInstance().init()}cvox.LiveRegions.init(new Date,cvox.AbstractTts.QUEUE_MODE_QUEUE,a);document.hasFocus()&&document.activeElement==document.body&& |
+cvox.ChromeVox.navigationManager.syncToBeginning();cvox.ChromeVox.position[document.location.href]&&(b=cvox.ChromeVox.position[document.location.href],cvox.ChromeVox.navigationManager.updateSelToArbitraryNode(document.elementFromPoint(b.x,b.y)));document.hasFocus()&&(a||cvox.ChromeVoxEventSuspender.withSuspendedEvents(function(){cvox.ChromeVox.navigationManager.finishNavCommand("",!0,cvox.AbstractTts.QUEUE_MODE_QUEUE)})())};cvox.PdfProcessor={}; |
cvox.PdfProcessor.processEmbeddedPdfs=function(){if("#original"!=window.location.hash)for(var a=document.querySelectorAll('embed[type="application/pdf"]'),b=0;b<a.length;b++){var c=a[b];if("function"===typeof c.accessibility){var d=c.accessibility(),e=cvox.ChromeVoxJSON.parse(d);if(e.loaded)if(e.copyable){var f=document.createElement("DIV"),d=document.createElement("DIV");d.style.position="relative";d.style.background="white";d.style.margin="20pt";d.style.padding="20pt";d.style.border="1px solid #000"; |
var g=c.src.substr(c.src.lastIndexOf("/")+1);document.title=g;g=cvox.ChromeVox.msgs.getMsg("pdf_header",[g,c.src+"#original"]);d.innerHTML=g;g=d.getElementsByTagName("a")[0];g.addEventListener("click",function(){window.location.href=c.src+"#original";window.location.reload()},!0);f.appendChild(d);f.style.position="relative";f.style.background="#CCC";f.style.paddingTop="1pt";f.style.paddingBottom="1pt";f.style.width="100%";f.style.minHeight="100%";var h=function(a){var b=c.accessibility(a),d=cvox.ChromeVoxJSON.parse(b), |
b=document.createElement("DIV"),g=document.createElement("A");g.name="page"+a;b.style.position="relative";b.style.background="white";b.style.margin="auto";b.style.marginTop="20pt";b.style.marginBottom="20pt";b.style.height=d.height+"pt";b.style.width=d.width+"pt";b.style.boxShadow="0pt 0pt 10pt #333";for(var d=d.textBox,q=0;q<d.length;q++){var m=d[q],s=document.createElement("Span");s.style.position="absolute";s.style.left=m.left+"pt";s.style.top=m.top+"pt";s.style.fontSize=0.8*m.height+"pt";for(var u= |
@@ -1669,8 +1671,9 @@ cvox.OptionsPage.updateStatus_=function(a){document.getElementById("status").inn |
cvox.ChromeVoxBackground.prototype.init=function(){if(!cvox.ChromeVox.isChromeOS||"mndnfokpggljbaajbnioimlmbfngpief"==chrome.i18n.getMessage("@@extension_id")){cvox.ChromeVox.msgs=cvox.HostFactory.getMsgs();this.prefs=new cvox.ChromeVoxPrefs;this.readPrefs();var a=cvox.ConsoleTts.getInstance();a.setEnabled(!0);this.backgroundTts_=new cvox.TtsBackground;this.tts=(new cvox.CompositeTts).add(this.backgroundTts_).add(a);this.earcons=new cvox.EarconsBackground;this.addBridgeListener();this.backgroundBraille_= |
new cvox.BrailleBackground;this.accessibilityApiHandler_=new cvox.AccessibilityApiHandler(this.tts,this.backgroundBraille_,this.earcons);cvox.ChromeVox.tts=this.tts;cvox.ChromeVox.braille=this.backgroundBraille_;cvox.ChromeVox.earcons=this.earcons;cvox.ChromeVox.isChromeOS&&chrome.accessibilityPrivate.onChromeVoxLoadStateChanged&&chrome.accessibilityPrivate.onChromeVoxLoadStateChanged.addListener(this.onLoadStateChanged);var b;b=["chromeVoxChromePageScript.js"];var c=this,a=function(a){chrome.windows.getAll({populate:!0}, |
function(e){for(var f=0;f<e.length;f++)for(var g=e[f].tabs,h=0;h<g.length;h++){var k=g[h];c.injectChromeVoxIntoTab(k,b,a)}})};this.checkVersionNumber();chrome.extension.onMessage.addListener(function(a,b,c){if(a.srcFile){var g=a.srcFile;cvox.InjectedScriptLoader.fetchCode([g],function(a){c({code:a[g]})})}return!0});cvox.InjectedScriptLoader.fetchCode(b,a);"false"==localStorage.active?this.tts.speak(cvox.ChromeVox.msgs.getMsg("chromevox_inactive"),1):cvox.PlatformUtil.matchesPlatform(cvox.PlatformFilter.WML)&& |
-this.tts.speak(cvox.ChromeVox.msgs.getMsg("chromevox_intro"),1)}}; |
-cvox.ChromeVoxBackground.prototype.injectChromeVoxIntoTab=function(a,b,c){window.console.log("Injecting into "+a.id,a);var d=!1,e=goog.bind(function(b){chrome.tabs.executeScript(a.id,{code:b,allFrames:!0},goog.bind(function(){chrome.extension.lastError&&!d&&(d=!0,console.error("Could not inject into tab",a),this.tts.speak("Error starting ChromeVox for "+a.title+", "+a.url,1))},this))},this);e("try { window.disableChromeVox(); } catch(e) { }\nwindow.INJECTED_AFTER_LOAD = true;\nwindow.CLOSURE_NO_DEPS = true\n");b.forEach(function(a){e(c[a])})}; |
+(this.tts.speak(cvox.ChromeVox.msgs.getMsg("chromevox_intro"),1),cvox.ChromeVox.braille.write(cvox.NavBraille.fromText(cvox.ChromeVox.msgs.getMsg("intro_brl"))))}}; |
+cvox.ChromeVoxBackground.prototype.injectChromeVoxIntoTab=function(a,b,c){window.console.log("Injecting into "+a.id,a);var d=!1,e=goog.bind(function(b){chrome.tabs.executeScript(a.id,{code:b,allFrames:!0},goog.bind(function(){chrome.extension.lastError&&!d&&(d=!0,console.error("Could not inject into tab",a),this.tts.speak("Error starting ChromeVox for "+a.title+", "+a.url,1))},this))},this);e("try { window.disableChromeVox(); } catch(e) { }\nwindow.INJECTED_AFTER_LOAD = true;\nwindow.CLOSURE_NO_DEPS = true\n"); |
+b.forEach(function(a){e(c[a])})}; |
cvox.ChromeVoxBackground.prototype.onTtsMessage=function(a){if("speak"==a.action)this.accessibilityApiHandler_.setWebContext(),this.tts.speak(a.text,a.queueMode,a.properties);else if("stop"==a.action)this.tts.stop();else if("increaseOrDecrease"==a.action){this.tts.increaseOrDecreaseProperty(a.property,a.increase);var b=a.property,b=Math.round(100*this.backgroundTts_.propertyToPercentage(b)),c;switch(a.property){case cvox.AbstractTts.RATE:c=cvox.ChromeVox.msgs.getMsg("announce_rate",[b]);break;case cvox.AbstractTts.PITCH:c= |
cvox.ChromeVox.msgs.getMsg("announce_pitch",[b]);break;case cvox.AbstractTts.VOLUME:c=cvox.ChromeVox.msgs.getMsg("announce_volume",[b])}c&&this.tts.speak(c,cvox.AbstractTts.QUEUE_MODE_FLUSH,cvox.AbstractTts.PERSONALITY_ANNOTATION)}else"cyclePunctuationEcho"==a.action&&this.tts.speak(cvox.ChromeVox.msgs.getMsg(this.backgroundTts_.cyclePunctuationEcho()),cvox.AbstractTts.QUEUE_MODE_FLUSH)};cvox.ChromeVoxBackground.prototype.onEarconMessage=function(a){"play"==a.action&&this.earcons.playEarcon(a.earcon)}; |
cvox.ChromeVoxBackground.prototype.addBridgeListener=function(){cvox.ExtensionBridge.addMessageListener(goog.bind(function(a,b){var c=a.target,d=a.action;switch(c){case "OpenTab":c={};c.url=a.url;chrome.tabs.create(c);break;case "KbExplorer":c={url:"chromevox/background/kbexplorer.html"};chrome.tabs.create(c);break;case "HelpDocs":c={url:"http://chromevox.com/tutorial/index.html"};chrome.tabs.create(c);break;case "Options":"open"==d&&(c={url:"chromevox/background/options.html"},chrome.tabs.create(c)); |