summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2016-09-13 23:14:16 +0200
committertomsmeding <tom.smeding@gmail.com>2016-09-13 23:14:16 +0200
commit2397b919064598e2c59dc997cf14add194687b54 (patch)
tree40bd62889fac0bee1e13b5e796481963c4b35764
parentb42b3e7a5728b37a559a34072a2a9b0658c0c558 (diff)
Add site body to timeline
-rw-r--r--modules/changes/changes.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/changes/changes.js b/modules/changes/changes.js
index 6a8c8f2..9c536b3 100644
--- a/modules/changes/changes.js
+++ b/modules/changes/changes.js
@@ -18,7 +18,7 @@ persist.initSync();
//urls: map(url => URLobject)
//url: String
-//URLobject: {url, timeline: [[Date, hash]]}
+//URLobject: {url, timeline: [[Date, hash, contents]]}
var urls=persist.getItemSync("urls");
if(!urls){
urls={};
@@ -91,11 +91,11 @@ function refreshURLs(){
fetch("GET",url,function(url,status,body){
console.log("Got <"+url+">; status = "+status);
if(status==-1){
- hashes[url]=[new Date(),null];
+ hashes[url]=[new Date(),null,null];
} else {
var hash=crypto.createHash("sha256");
hash.update(body);
- hashes[url]=[new Date(),hash.digest("hex")];
+ hashes[url]=[new Date(),hash.digest("hex"),body];
}
if(!urls[url]){