From 9f9562f26736882701995000a5fe6a4cba8560b5 Mon Sep 17 00:00:00 2001 From: "Haoran S. Diao" <0@hairydiode.xyz> Date: Fri, 22 Nov 2019 17:56:36 -0800 Subject: Editted backend.go to serve timestamp of most recently sent alert, index.html now periodically checks that timestamp to send notifications. --- backend.go | 2 +- index.html | 36 +++++++++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/backend.go b/backend.go index 25878c3..aaa4122 100644 --- a/backend.go +++ b/backend.go @@ -14,5 +14,5 @@ func main() { } func messageHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Access-Control-Allow-Origin", "*") - fmt.Fprintf(w, "肏"); + fmt.Fprintf(w, "1574466927"); } diff --git a/index.html b/index.html index 49a40b5..723e46e 100644 --- a/index.html +++ b/index.html @@ -1,8 +1,12 @@ - +

You have not granted notification permissions

-- cgit v1.1