From d24fe4a368659411ce761686be7dc2a0d29bf3c5 Mon Sep 17 00:00:00 2001 From: manetta Date: Tue, 2 Apr 2019 14:06:23 +0200 Subject: [PATCH] adding the cnn.js --- 08/cnn/cnn.js | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 08/cnn/cnn.js diff --git a/08/cnn/cnn.js b/08/cnn/cnn.js new file mode 100644 index 0000000..746599d --- /dev/null +++ b/08/cnn/cnn.js @@ -0,0 +1,84 @@ +const invocation = new XMLHttpRequest(); + const url = 'https://pad.xpub.nl/p/special_issue_8_cnn/export/txt'; + + function findCategories(data){ + // Return categories that this page is part of + // by doing a reversed dictionary lookup + var current_url = window.location.href; + var keys = Object.keys(data) + var categories = []; + for(var i=0; i