diff options
author | tomsmeding <tom.smeding@gmail.com> | 2016-09-13 23:14:16 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2016-09-13 23:14:16 +0200 |
commit | 2397b919064598e2c59dc997cf14add194687b54 (patch) | |
tree | 40bd62889fac0bee1e13b5e796481963c4b35764 /modules | |
parent | b42b3e7a5728b37a559a34072a2a9b0658c0c558 (diff) |
Add site body to timeline
Diffstat (limited to 'modules')
-rw-r--r-- | modules/changes/changes.js | 6 |
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]){ |