-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
73 lines (67 loc) · 3.59 KB
/
index.html
File metadata and controls
73 lines (67 loc) · 3.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" manifest="Maps.manifest">
<head>
<title>Google Maps</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- <script src="javascript/prototype/prototype.js" type="text/javascript"></script>
<script src="/usr/palm/frameworks/mojo2/mojo.js" type="text/javascript" x-mojo-version="1"></script> -->
<script src="/usr/palm/frameworks/mojo/mojo.js" type="text/javascript" x-mojo-version="1"></script>
<link href="stylesheets/maps.css" media="screen" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="javascript/kalendae/kalendae.css" type="text/css" charset="utf-8">
<script>
var MapsLocale = "en-us"; //default locale
var gAPI = "?v=3"; //default Google API
if (typeof(PalmSystem) !== "undefined" && PalmSystem.localeRegion){
var lang = PalmSystem.localeRegion.substring(0,2); //returns only the two first characters
MapsLocale = lang;
// This is a workaround, because WebOS reports region in non ISO 639 format..
switch (lang) {
case 'cz':
MapsLocale = "cs";
break;
};
};
// Load Language from Preferences, if is set, override previous API Locale
var PreferencesCookie = new Mojo.Model.Cookie('PrefsCookie');
try {
Preferences = PreferencesCookie.get();
if (Preferences.APILang.code && Preferences.APILang.code != "") {
MapsLocale = Preferences.APILang.code;
};
}
catch (error) {
//nothing to do... use previous Locale
};
var pre3hack = " ,width=device-width'>";
if(Mojo.Environment.DeviceInfo.screenWidth==480 || Mojo.Environment.DeviceInfo.screenWidth==800 ){
//pre3hack = "'>"; //pre3 needs to omit width value for the right size of Mojo UI
//pre3hack = " ,width=240px'>";
//gAPI = "?v=3.10"; //force to use Stable release of Google API for PRE3
var pre3overridestag = '<link href="stylesheets/pre3overrides.css" media="screen" rel="stylesheet" type="text/css" />';
document.write(pre3overridestag);
};
if(Mojo.Environment.DeviceInfo.screenWidth==1024 || Mojo.Environment.DeviceInfo.screenWidth==768 ){
//detcted TouchPad
var TPoverridestag = '<link href="stylesheets/TPoverrides.css" media="screen" rel="stylesheet" type="text/css" />';
document.write(TPoverridestag);
};
// infobubble gradients works on WebOS 2.2 and higher, older devices has fixed image instead
if ((Mojo.Environment.DeviceInfo.platformVersionMajor == "1") || (Mojo.Environment.DeviceInfo.platformVersionMajor == "2" && Mojo.Environment.DeviceInfo.platformVersionMinor == "1")) {
var BubbleStyle = '<link href="stylesheets/BubbleOlder.css" media="screen" rel="stylesheet" type="text/css" />';
} else {
var BubbleStyle = '<link href="stylesheets/BubbleNewer.css" media="screen" rel="stylesheet" type="text/css" />';
};
document.write(BubbleStyle);
var MetaTag = "<meta name='viewport' content='initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, height=device-height" + pre3hack;
//var ScaleScriptTag = "<meta name='viewport' content='initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, height=device-height'>";
document.write(MetaTag);
var MapsURL = "http://maps.google.com/maps/api/js" + gAPI + "&libraries=places,weather,geometry&language=" + MapsLocale;
//var MapsURL = "http://maps.google.com/maps/api/js?v=3.exp&signed_in=true&libraries=places,weather,panoramio,geometry&language=cs";
var scriptTag = "<script type='text/javascript' src='" + MapsURL + "'\><\/script>";
document.write(scriptTag);
</script>
</head>
<body>
</body>
</html>