-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
113 lines (94 loc) · 3.95 KB
/
index.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<meta http-equiv=X-UA-Compatible content=IE=edge>
<meta name=viewport content=width=device-width, initial-scale=1>
<title>Pebble App Settings</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css' rel='stylesheet' integrity='sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7' crossorigin='anonymous'>
<script src='https://code.jquery.com/jquery-2.2.2.min.js' integrity='sha256-36cp2Co+/62rEAAYHLmRCPIych47CvdM+uTBJwSzWjI=' crossorigin='anonymous'></script>
<style>
html{padding:0;margin:0;}
body{padding:0;color:white;background:#2c2c2c;width:100%;margin:0 auto;text-align:center;min-height:100%;font-family:Arial}
.active{width:10vh;background:#00ace6;color:#004d66;}
a{color:white;}
a:hover{color:black;text-decoration:none;cursor:pointer;}
.footer{display:table;margin:0 auto;text-align:center;background:#00BFFE;position:fixed;width:86.5%;line-height:1.75;bottom:0;}
.mainContent{min-height:100%;position:relative;margin:0 auto;background:#2c2c2c;width:85%;padding-bottom:100px;padding-top:10px;height:100%;}
.footerTab{display:table-cell;line-height: inherit;width:16%}
.row{margin-top:4px;}
.buttonBox{background:#333333;border:1px solid #1a1a1a;border-top:3px solid black;border-left:3px solid black;font-size:10vw;height:24vw;width:100%;margin:0px;padding:0px;vertical-align:middle;line-height: 23vw; -webkit-touch-callout: none;-webkit-user-select: none;-ms-user-select: none;user-select: none;cursor:pointer}
.buttonBox:hover{background:#262626;color:#d9d9d9;border:1px solid #007399;border-top:3px solid #007399;border-left:3px solid #007399;}
.buttonBox:active{background:black;color:#b3b3b3;border:1px solid #007399;border-top:0;border-left:0;}
*[class^='col-xs-']{margin:0px;padding:5px;}
.responseImg{height:25vw;width:25vw;}
.form-control{background:#00bffe;color:black;border:1px solid black;}
.btn{background:#00ace6;color:white;border:1px solid black;}
.holder{#636363;}
</style>
</head>
<body>
<!--
<p>PHP file URL:</p>
<input type="text" id="theurl">
<br>
<input type="submit" id="subButton"></button>
-->
<div class="mainContent">
<div class="row">
<div class="col-lg-12" style="text-align:left">
<h3>Universal Wait Times</h3>
<h4>Enter your website's PHP URL:</h4>
<div class="input-group input-group-lg" id="loginform">
<input type="text" class="form-control" id="theurl" placeholder="PHP URL">
<span class="input-group-btn">
<button class="btn btn-secondary" id="subButton" type="button">Save</button>
</span>
</div>
</div>
</div>
</div>
<script>
/*
$(document).ready(function(e) {
$("#subButton").click(function(e) {
var fileURL = document.getElementById("file_url").value;
var options = { fileurl:fileURL };
document.location = 'pebblejs://close#' + encodeURIComponent(JSON.stringify(options));
});
});
*/
function updateSettings() {
if (window.location.search) {
var settings = decodeURIComponent(window.location.search).replace('?settings=','');
if (settings == "null") {
settings = '{"fileurl":"https://yoursite.com/rides.php"}';
}
if (settings) {
var json = $.parseJSON(settings);
if (json.fileurl) {
$("#theurl").val(json.fileurl);
}
}
}
}
function saveOptions() {
var options = {
'fileurl': $("#theurl").val(),
}
return options;
}
$().ready(function() {
$("#subButton").click(function() {
document.location = "pebblejs://close";
});
$("#subButton").click(function() {
var location = "pebblejs://close#" + encodeURIComponent(JSON.stringify(saveOptions()));
document.location = location;
});
});
$(document).ready(updateSettings());
</script>
</body>
</html>