diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-09-03 19:28:50 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-09-03 19:28:50 +0200 |
| commit | 589c423f3d2d4d65347fbd074b71cc067541c477 (patch) | |
| tree | 9524ca5c159517c7d206e8aa41212ae1d5921db3 /StoneIsland/www/js/lib/etc | |
| parent | c73bf06dff4921b20f344a9cbb91b9b88f4546eb (diff) | |
actually get scrolling working!
Diffstat (limited to 'StoneIsland/www/js/lib/etc')
| -rw-r--r-- | StoneIsland/www/js/lib/etc/accessibility.js | 20 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/etc/push.js | 6 |
2 files changed, 22 insertions, 4 deletions
diff --git a/StoneIsland/www/js/lib/etc/accessibility.js b/StoneIsland/www/js/lib/etc/accessibility.js index c1f5ce5d..3cbda2a0 100644 --- a/StoneIsland/www/js/lib/etc/accessibility.js +++ b/StoneIsland/www/js/lib/etc/accessibility.js @@ -3,8 +3,19 @@ var accessibility = (function() { var accessibility = {} accessibility.voiceOver = false + accessibility.DEBUG = true + 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) { accessibility.build(ready) } else { @@ -25,9 +36,12 @@ var accessibility = (function() { console.log('Screen reader: ' + state) accessibility.voiceOver = state if (state) { - $('html').addClass('iscroll') - } else { + console.log(">>>>>> actual debug mode!") + app.accessible = true + $("html").addClass('accessible') $('html').addClass('vscroll') + } else { + $('html').addClass('iscroll') } ready() }) @@ -57,5 +71,5 @@ var accessibility = (function() { })() function stonewash (s) { - return s.replace(/'0/g, '20').replace(/_/g, ' ') + return s.replace(/'9/g, '19').replace(/'0/g, '20').replace(/_/g, ' ').replace(/-/g, ' - ').replace(/^[013456789][0-9]+/, '') } diff --git a/StoneIsland/www/js/lib/etc/push.js b/StoneIsland/www/js/lib/etc/push.js index 746172eb..74aaf7b5 100755 --- a/StoneIsland/www/js/lib/etc/push.js +++ b/StoneIsland/www/js/lib/etc/push.js @@ -37,6 +37,10 @@ var push = (function(){ push.settings.hub = hub_status == "true" push.settings.store = store_status == "true" + if (push.settings.requested) { + return + } + // not sure why we're also signing up for notifications here?? if (! hub_status || hub_status == "true") { push.subscribe("hub") } @@ -46,7 +50,7 @@ var push = (function(){ } push.got_registration = function(data){ var registrationId = data.registrationId - var oldRegistrationId = localStorage.getItem("yoox.registrationId") + var oldRegistrationId = localStorage.getItem("yoox.registrationId") // console.log(registrationId, oldRegistrationId) if (registrationId !== oldRegistrationId || ! push.settings.requested) { |
