Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
MobileAccessibility.prototype.injectLocalAndroidVoxScript = function() {
var versionsplit = device.version.split('.');
if (device.platform !== "Android" ||
!(versionsplit[0] > 4 || (versionsplit[0] == 4 && versionsplit[1] >= 1)) ||
typeof cvox !== "undefined" || mobileAccessibility.scriptInjected) return;
var script = document.createElement('script');
script.type = 'text/javascript';
script.async = true;
script.onload = function(){
// console.log(this.src + ' has loaded');
if (mobileAccessibility.isChromeVoxActive()) {
cordova.fireWindowEvent("screenreaderstatuschanged", {
isScreenReaderRunning: true
});
}
};
script.src = (versionsplit[0] > 4 || versionsplit[1] > 3)