Mercurial > code > home > repos > gcalendarwatch
changeset 18:4d578c67bf79
option to sync a single cal; show results
author | drewp@bigasterisk.com |
---|---|
date | Thu, 29 Oct 2020 23:45:46 -0700 |
parents | bfd55a2fd358 |
children | 0af075b62e4a |
files | index.html |
diffstat | 1 files changed, 19 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/index.html Thu Oct 29 23:45:08 2020 -0700 +++ b/index.html Thu Oct 29 23:45:46 2020 -0700 @@ -1,12 +1,19 @@ <!DOCTYPE html> <html> - <head><title>gcalendarwatch</title></head> + <head> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <title>gcalendarwatch</title></head> + <style> + button { min-height: 80px; } + </style> <body> <p>MSG</p> <button data-bind="click: pollNow">poll now</button> - + <button data-bind="click: poll1Now">poll just ps4online cal now</button> +<pre id="results"> +</pre> <script type="text/javascript" src="https://bigasterisk.com/lib/jquery-2.0.3.min.js"></script> <script type="text/javascript" src="https://bigasterisk.com/lib/knockout-3.1.0.js"></script> <script type="text/javascript"> @@ -14,8 +21,16 @@ var model = { pollNow: function () { - $.post("pollNow", function () { - window.location.reload(); + document.querySelector("#results").innerText += "poll...\n" + $.post("pollNow", function (res) { + document.querySelector("#results").innerText += res + "\ndone.\n" + }); + }, + poll1Now: function() { + document.querySelector("#results").innerText += "poll...\n" + $.post("pollNow", JSON.stringify({cal: "iem9ppgqdbleh96nkeaj4l6714@group.calendar.google.com"}), + function (res) { + document.querySelector("#results").innerText += res + "\ndone.\n" }); } };