aboutsummaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/js/app.js41
1 files changed, 0 insertions, 41 deletions
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 <https://www.gnu.org/licenses/>.
*/
-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!")
})