added basic platform detection and platform specific settings...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-02-05 20:21:06 +04:00
parent 232576b158
commit 421210f103
2 changed files with 16 additions and 0 deletions

View File

@ -24,6 +24,7 @@ XXX scrollTo is a cool and a powerfull tool but it needs a sustantial code reorg
<!--script src="editor.js"></script-->
<!-- configuration, keep this last... -->
<script src="platform.js"></script>
<script src="keybindings.js"></script>
<script src="config.js"></script>
@ -703,6 +704,13 @@ $(document).ready(function(){
<td id="BrowserInfo">
</td>
</tr>
<tr>
<td>
User Agent:
</td>
<td id="UserAgent">
</td>
</tr>
<table/>
@ -760,6 +768,7 @@ $(document).ready(function(){
$('#FingersSupported').text($.fn.swipe.fingers.ALL)
var b = $('#BrowserInfo')
$.each($.browser, function(i, e){$('<div>'+i+': '+e+'</div>').appendTo(b)})
$('#UserAgent').text(navigator.userAgent)
}
function toggleSetting(obj){
obj = $(obj)

7
platform.js Executable file
View File

@ -0,0 +1,7 @@
// PhoneGap...
if(navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/)){
UPDATE_HASH_URL_POSITION = false
FULL_HISTORY_ENABLED = false
}