From 64698f0860a131cb2db06f5ab10267f972a22ac3 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 28 Aug 2019 13:45:37 +0200 Subject: Remove obsolete code. --- public/js/app.js | 41 ----------------------------------------- 1 file changed, 41 deletions(-) (limited to 'public') diff --git a/public/js/app.js b/public/js/app.js index f5970ae..821b0c1 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -16,14 +16,6 @@ along with this program. If not, see . */ -function fetch_rooms(data_done) { - let req = new XMLHttpRequest() - req.addEventListener("load", data_done) - req.open("GET", "http://localhost:8000/rooms") - req.responseType = "json" - req.send() -} - function load_screenings(data_done) { let req = new XMLHttpRequest() req.addEventListener("load", data_done) @@ -32,23 +24,6 @@ function load_screenings(data_done) { req.send() } -function pluralize(num, word) { - let result = num + " " + word - - if (num > 1) { - result += "s" - } - - return result -} - -function log_film(film) { - console.log(film["title"] - + " (" - + pluralize(film["screenings"].length, "screening") - + ")") -} - function date_f(d) { let opts = { weekday: 'long', day: 'numeric', month: 'long', year: 'numeric' } return new Intl.DateTimeFormat('nb-NO', opts).format(d) @@ -220,20 +195,4 @@ window.addEventListener("load", function() { } }) - - /* - fetch_rooms(function() { - let table = document.getElementById("screening-table") - let row = document.createElement("tr") - table.appendChild(row) - - this.response.forEach(function(room) { - console.log(room["name"]) - let item = document.createElement("th") - item.innerHTML = room["name"] - row.appendChild(item) - }) - }) - */ - console.log("Holahey!") }) -- cgit v1.2.3