diff --git a/pageUpdater.js b/pageUpdater.js index f983850..7a3ad0f 100644 --- a/pageUpdater.js +++ b/pageUpdater.js @@ -25,8 +25,6 @@ function firstToUpper(str) { } var thumborURL = "https://thumbor.violets-purgatory.dev/unsafe/" -var imgExtension = "png" -var thumborArgs = `filters:format(${imgExtension})/` function timeFormatter(seconds) { seconds = Math.ceil(seconds) @@ -274,12 +272,11 @@ function socketeer() { if (get_img_url(activity)) { var url = get_img_url(activity) - var fn = Math.ceil(Math.random() * 100_000_000_000).toString() + "." + imgExtension + var fn = Math.ceil(Math.random() * 100_000_000_000).toString() var fp = path.join(__dirname, 'cached', fn) if (!cachedImages[url]) { - const response = await (await fetch(thumborURL + "200x200/" + thumborArgs + url)).arrayBuffer() - console.log(url) + const response = await (await fetch(thumborURL + "200x200/" + url)).arrayBuffer() fs.writeFileSync(fp, Buffer.from(response)) cachedImages[url] = fn @@ -288,11 +285,11 @@ function socketeer() { if (get_img_url(activity, "small_image")) { var url = get_img_url(activity, "small_image") - var fn = Math.ceil(Math.random() * 100_000_000_000).toString() + "." + imgExtension + var fn = Math.ceil(Math.random() * 100_000_000_000).toString() var fp = path.join(__dirname, 'cached', fn) if (!cachedImages[url]) { - const response = await (await fetch(thumborURL + "64x64/" + thumborArgs + url)).arrayBuffer() + const response = await (await fetch(thumborURL + "64x64/" + url)).arrayBuffer() fs.writeFileSync(fp, Buffer.from(response)) diff --git a/static/root.css b/static/root.css index 662e888..bebb8dd 100644 --- a/static/root.css +++ b/static/root.css @@ -87,6 +87,27 @@ img:not(.project-inner > div > img):not(.activity>img) { } } +.lengthBar { + background-color: rgb(50, 40, 60); + display: inline-block; + width: 80%; + height: 10px; + padding: 0; + overflow: hidden; + border-radius: 5px; + margin-right: 1.9%; +} + +.lengthBar>span { + margin: 0; + padding: 0; + width: 100%; + background-color: rgb(200, 200, 230); + height: 20px; + display: block; + position: relative; +} + @keyframes spinny { 0% { rotate: 0deg; diff --git a/static/style.css b/static/style.css index a83192c..17a1a2f 100644 --- a/static/style.css +++ b/static/style.css @@ -231,25 +231,4 @@ li { .noscript { display: none; -} - -.lengthBar { - background-color: rgb(50, 40, 60); - display: inline-block; - width: 80%; - height: 10px; - padding: 0; - overflow: hidden; - border-radius: 5px; - margin-right: 1.9%; -} - -.lengthBar>span { - margin: 0; - padding: 0; - width: 100%; - background-color: rgb(200, 200, 230); - height: 20px; - display: block; - position: relative; } \ No newline at end of file