From 9ff9d8f23762fabd88af64b37e2e52809173c96c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christopher=20Cot=C3=A9?= Date: Fri, 7 Jan 2022 20:44:15 -0500 Subject: [PATCH] add build files --- www/js/index.js | 2 ++ www/js/index.js.map | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 www/js/index.js create mode 100644 www/js/index.js.map diff --git a/www/js/index.js b/www/js/index.js new file mode 100644 index 00000000..3938d130 --- /dev/null +++ b/www/js/index.js @@ -0,0 +1,2 @@ +(()=>{var t=null;function o(){a()}function a(){fetch("config.json").then(e=>e.json()).then(e=>f(e))}function f(e){t=e.media_server,m()}function m(){fetch("metadata.json").then(e=>e.json()).then(e=>d(e))}function d(e){let n=document.getElementById("content");e.forEach(c=>{let i=h(c);n.appendChild(i)})}function h(e){let n=document.createElement("img");return n.src=t+e.path,n}o();})(); +//# sourceMappingURL=index.js.map diff --git a/www/js/index.js.map b/www/js/index.js.map new file mode 100644 index 00000000..02adc5f1 --- /dev/null +++ b/www/js/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../src/index.js"], + "sourcesContent": ["let server = null;\n\nfunction init(){\n get_config();\n}\n\nfunction get_config(){\n fetch(\"config.json\")\n .then(result => result.json())\n .then(data => handle_config(data))\n}\n\nfunction handle_config(data){\n server = data.media_server;\n get_metadata();\n}\n\nfunction get_metadata(){\n fetch(\"metadata.json\")\n .then(result => result.json())\n .then(data => process_media(data))\n}\n\nfunction process_media(items){\n let p = document.getElementById(\"content\")\n items.forEach(i => {\n let img = image(i);\n p.appendChild(img);\n })\n}\n\nfunction image(image){\n let i = document.createElement(\"img\");\n i.src = server + image.path;\n return i\n}\n\ninit();\n"], + "mappings": "MAAA,GAAI,GAAS,KAEb,YAAe,CACb,IAGF,YAAqB,CACnB,MAAM,eACH,KAAK,GAAU,EAAO,QACtB,KAAK,GAAQ,EAAc,IAGhC,WAAuB,EAAK,CAC1B,EAAS,EAAK,aACd,IAGF,YAAuB,CACrB,MAAM,iBACH,KAAK,GAAU,EAAO,QACtB,KAAK,GAAQ,EAAc,IAGhC,WAAuB,EAAM,CAC3B,GAAI,GAAI,SAAS,eAAe,WAChC,EAAM,QAAQ,GAAK,CACjB,GAAI,GAAM,EAAM,GAChB,EAAE,YAAY,KAIlB,WAAe,EAAM,CACnB,GAAI,GAAI,SAAS,cAAc,OAC/B,SAAE,IAAM,EAAS,EAAM,KAChB,EAGT", + "names": [] +} -- 2.45.3