In the future, when WPTouch actually supports FxOS, we
can tweak the regex to only match for versions lower than
whatever the working version will be.
Some notes to explain the version tests here:
1.1, 1.2
Has div#wptouch-search
Shipped with prototype.js, => Prototype.Version === '1.5.1'
1.3
Has div#wptouch-search
Shipped with jQuery 1.2.6, => jQuery.fn.jquery === '1.2.6'
1.4, 1.5, 1.6, 1.7, 1.8
Has div#wptouch-search
No longer ships with jQuery, but uses the jQuery that comes with WP. Check for $.noConflict() usage, => typeof window.$wptouch === 'function'
1.9
Has div#wptouch-menu
Later dot revisions of 1.9.X use winodw.$wpt instead of window.$wptouch as jQuery aliases: => typeof window.$wptouch === 'function', typeof window.$wpt === 'function'
(according to the change log, there were no 2.x releases?)
3.1.1
Has div#wptouch-search-inner
Look for doBauhausReady === fn OR wptouchFdnBaseReady ===fn (no longer has any jQuery aliases)
correct with the double escaping! I'm not sure if injectionTime:start looks good though - this script digs through the DOM so I guess "load" is a better timing?
In the future, when WPTouch actually supports FxOS, we can tweak the regex to only match for versions lower than whatever the working version will be.
Some notes to explain the version tests here:
1.1, 1.2
div#wptouch-search
Prototype.Version === '1.5.1'
1.3
div#wptouch-search
jQuery.fn.jquery === '1.2.6'
1.4, 1.5, 1.6, 1.7, 1.8
div#wptouch-search
$.noConflict()
usage, =>typeof window.$wptouch === 'function'
1.9
div#wptouch-menu
winodw.$wpt
instead ofwindow.$wptouch
as jQuery aliases: =>typeof window.$wptouch === 'function'
,typeof window.$wpt === 'function'
(according to the change log, there were no 2.x releases?)
3.1.1
div#wptouch-search-inner
doBauhausReady === fn
ORwptouchFdnBaseReady ===fn
(no longer has any jQuery aliases)