forked from naveen/foursquair
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfoursquair.html
55 lines (49 loc) · 1.84 KB
/
foursquair.html
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
<html>
<head>
<meta http-equiv="refresh" content="300"/>
<title>foursquair</title>
<style type="text/css">
body { margin-left: 5px; }
</style>
<script type="text/javascript" src="AIRAliases.js"></script>
<script type="text/javascript">
// AIR-related functions created by the developer
function appLoad(){
}
// reads the content of a local text file
function readLocalFile(){
var f = air.File.applicationDirectory.resolvePath("LocalFile.txt");
var fs = new air.FileStream();
fs.open(f, air.FileMode.READ);
var content = fs.readUTFBytes(fs.bytesAvailable);
fs.close();
return content;
}
// loads the content of a remote URL
function doRequest(url) {
var req = new XMLHttpRequest();
req.onreadystatechange = function() {
if (req.readyState == 4) {
var str = req.responseText;
if (str.length > 400) {
str = str.substring(0, 399);
str += "..";
}
alert('readystate: ' + req.readyState + '\n' +
'status/statusText: ' + req.status + '/' +
req.statusText + '\n' +
'responseText (400 chars): ' + "\n\n" + str);
}
};
req.open('GET', url, true);
req.send(null);
}
function openInBrowser(url) {
air.navigateToURL( new air.URLRequest(url));
}
</script>
</head>
<body onLoad="appLoad()">
<iframe frameborder="0" src="http://m.playfoursquare.com" sandboxRoot="http://m.playfoursquare.com" documentRoot="/" width="100%" height="100%"></iframe>
</body>
</html>