-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparams.json
6 lines (6 loc) · 1.83 KB
/
params.json
1
2
3
4
5
6
{
"name": "Universalwaittimes",
"tagline": "",
"body": "<!DOCTYPE html>\r\n<html>\r\n<head>\r\n<title>Pebble App Settings</title>\r\n<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js\"></script>\r\n<script>\r\n/*\r\n $(document).ready(function(e) {\r\n $(\"#subButton\").click(function(e) {\r\n var fileURL = document.getElementById(\"file_url\").value;\r\n var options = { fileurl:fileURL };\r\n document.location = 'pebblejs://close#' + encodeURIComponent(JSON.stringify(options));\r\n });\r\n\r\n });\r\n*/\r\n \r\n function updateSettings() {\r\n\tif (window.location.search) {\r\n\t\tvar settings = decodeURIComponent(window.location.search).replace('?settings=','');\r\n\t\tif (settings == \"null\") {\r\n\t\t\tsettings = '{\"file_url\":\"https://yoursite.com/rides.php\"}';\r\n\t\t}\r\n\t\tif (settings) {\r\n\t\t\tvar json = $.parseJSON(settings);\r\n\t\t\tif (json.phpurl) {\r\n\t\t\t\t$('#file_url').val(json.phpurl);\r\n\t\t\t}\r\n }\r\n }\r\n }\r\n\tfunction saveOptions() {\r\n\t\tvar options = {\r\n\t\t\t'fileurl': $(\"#file_url\").val(),\r\n\t\t}\r\n\t\treturn options;\r\n\t}\r\n\t$().ready(function() {\r\n\t\t$(\"#subButton\").click(function() {\r\n\t\t\tdocument.location = \"pebblejs://close\";\r\n\t\t});\r\n\t\t$(\"#subButton\").click(function() {\r\n\t\t\tvar location = \"pebblejs://close#\" + encodeURIComponent(JSON.stringify(saveOptions()));\r\n\t\t\tdocument.location = location;\r\n\t\t});\r\n\t});\r\n\t$('#main').bind('pageinit', updateSettings);\r\n \r\n \r\n</script>\r\n</head>\r\n<body>\r\n<p>Universal Wait Time Settings</p>\r\n\r\n<p>PHP file URL:</p>\r\n<input type=\"text\" id=\"file_url\">\r\n<br>\r\n<button id=\"subButton\">Submit</button>\r\n</body>\r\n</html>",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}