From 8094926278c5218a64eed0b93b95927ca062c48e Mon Sep 17 00:00:00 2001 From: shockrah Date: Tue, 5 Oct 2021 16:26:49 -0700 Subject: [PATCH] * New 404 image and removing generated js --- .../themes/clippable/static/cantfindshit.gif | 4 +- frontend/themes/clippable/static/js/index.js | 42 ------------------- 2 files changed, 2 insertions(+), 44 deletions(-) delete mode 100644 frontend/themes/clippable/static/js/index.js diff --git a/frontend/themes/clippable/static/cantfindshit.gif b/frontend/themes/clippable/static/cantfindshit.gif index 7056813..995e705 100644 --- a/frontend/themes/clippable/static/cantfindshit.gif +++ b/frontend/themes/clippable/static/cantfindshit.gif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d1175dfe7876b7fb57f4e323decd4eced123f809cf5aa27d95924493548d54b -size 1910524 +oid sha256:92c03626e5ad404ee4aee5925be8a2d3c01eb628f3f2dd7ce41ee56ce1807e8a +size 2381961 diff --git a/frontend/themes/clippable/static/js/index.js b/frontend/themes/clippable/static/js/index.js deleted file mode 100644 index ed9bba5..0000000 --- a/frontend/themes/clippable/static/js/index.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -class Category { - constructor(raw) { - this.name = raw['name']; - this.thumbnail_b64 = raw['thumbnail']; - } - as_div_str() { - let container = document.createElement('div'); - container.className = 'video-block'; - let title = document.createElement('h2'); - title.innerText = this.name; - let nail = document.createElement('img'); - nail.className = 'pure-img'; - if (!(this.thumbnail_b64 == null || this.thumbnail_b64.length == 0)) { - nail.setAttribute('src', `data:image/jpg;base64,${this.thumbnail_b64}`); - } - container.appendChild(title); - container.appendChild(nail); - document.getElementById('main-container').appendChild(container); - return container; - } -} -function ready_handler(e) { - // Only let this make a get request once we're ready on the page - if (document.readyState != 'complete') { - return e; - } - // All we do here is basically make a get request to /api/categories - const endpoint = 'http://localhost/api/categories'; - let xml = new XMLHttpRequest(); - xml.open('GET', endpoint, false); // sync request - xml.send(null); // nothing required for stuff - if (xml.getResponseHeader('Content-Type') == 'application/json') { - let raw = JSON.parse(xml.responseText); - for (const cat_raw of raw['categories']) { - let cat = new Category(cat_raw); - cat.as_div_str(); - } - } - return e; -} -document.addEventListener('readystatechange', ready_handler);