diff options
Diffstat (limited to 'StoneIsland/platforms/android/assets/www/js/lib/etc/accessibility.js')
| -rw-r--r-- | StoneIsland/platforms/android/assets/www/js/lib/etc/accessibility.js | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/StoneIsland/platforms/android/assets/www/js/lib/etc/accessibility.js b/StoneIsland/platforms/android/assets/www/js/lib/etc/accessibility.js deleted file mode 100644 index c66143cc..00000000 --- a/StoneIsland/platforms/android/assets/www/js/lib/etc/accessibility.js +++ /dev/null @@ -1,77 +0,0 @@ -var accessibility = (function() { - - var accessibility = {} - accessibility.voiceOver = false - - accessibility.DEBUG = false - - accessibility.init = function(ready) { - console.log('Accessibility init') - accessibility.bind() - if (accessibility.DEBUG) { - console.log('Accessibility debug mode') - app.accessible = true - accessibility.voiceOver = true - $('html').addClass('vscroll') - $('html').addClass('accessible') - return ready() - } - if ('MobileAccessibility' in window) { - console.log('init accessibility') - accessibility.build(ready) - } else { - console.log('MobileAccessibility not found') - ready() - } - } - - accessibility.build = function(ready) { - MobileAccessibility.usePreferredTextZoom(true); - MobileAccessibility.getTextZoom(function getTextZoomCallback(textZoom) { - console.log('WebView text should be scaled to the preferred value ' + textZoom + '%') - if (textZoom > 100) { - // app.accessible = true - // $("html").addClass('accessible') - } - }); - MobileAccessibility.isVoiceOverRunning(function(state){ - console.log('Screen reader: ' + state) - accessibility.voiceOver = state - if (state) { - console.log(">>>>>> actual debug mode!") - app.accessible = true - $("html").addClass('accessible') - $('html').addClass('vscroll') - } else { - $('html').addClass('iscroll') - } - ready() - }) - } - - accessibility.bind = function() { - $("h1").each(function(){ - this['aria-label'] = 'Section title is ' + this.innerText - }) - if ('MobileAccessibilityNotifications' in window) { - window.addEventListener(MobileAccessibilityNotifications.SCREEN_READER_STATUS_CHANGED, - accessibility.onScreenReaderStatusChanged, false) - } - } - - accessibility.onScreenReaderStatusChanged = function(info) { - if (info && typeof info.isScreenReaderRunning !== "undefined") { - if (info.isScreenReaderRunning) { - console.log("Screen reader: ON"); - } else { - console.log("Screen reader: OFF"); - } - } - } - - return accessibility -})() - -function stonewash (s) { - return s.replace(/'9/g, '19').replace(/'0/g, '20').replace(/_/g, ' ').replace(/-/g, ' - ').replace(/^[013456789][0-9]+/, '') -} |
