Compare commits
No commits in common. "448b05374910d3371331f2cf4852c0579c868151" and "80ad607d9243821179d813c64884a7f8ac06ea38" have entirely different histories.
448b053749
...
80ad607d92
3 changed files with 25 additions and 28 deletions
|
@ -25,8 +25,6 @@ function firstToUpper(str) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var thumborURL = "https://thumbor.violets-purgatory.dev/unsafe/"
|
var thumborURL = "https://thumbor.violets-purgatory.dev/unsafe/"
|
||||||
var imgExtension = "png"
|
|
||||||
var thumborArgs = `filters:format(${imgExtension})/`
|
|
||||||
|
|
||||||
function timeFormatter(seconds) {
|
function timeFormatter(seconds) {
|
||||||
seconds = Math.ceil(seconds)
|
seconds = Math.ceil(seconds)
|
||||||
|
@ -274,12 +272,11 @@ function socketeer() {
|
||||||
|
|
||||||
if (get_img_url(activity)) {
|
if (get_img_url(activity)) {
|
||||||
var url = 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)
|
var fp = path.join(__dirname, 'cached', fn)
|
||||||
|
|
||||||
if (!cachedImages[url]) {
|
if (!cachedImages[url]) {
|
||||||
const response = await (await fetch(thumborURL + "200x200/" + thumborArgs + url)).arrayBuffer()
|
const response = await (await fetch(thumborURL + "200x200/" + url)).arrayBuffer()
|
||||||
console.log(url)
|
|
||||||
fs.writeFileSync(fp, Buffer.from(response))
|
fs.writeFileSync(fp, Buffer.from(response))
|
||||||
|
|
||||||
cachedImages[url] = fn
|
cachedImages[url] = fn
|
||||||
|
@ -288,11 +285,11 @@ function socketeer() {
|
||||||
|
|
||||||
if (get_img_url(activity, "small_image")) {
|
if (get_img_url(activity, "small_image")) {
|
||||||
var url = 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)
|
var fp = path.join(__dirname, 'cached', fn)
|
||||||
|
|
||||||
if (!cachedImages[url]) {
|
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))
|
fs.writeFileSync(fp, Buffer.from(response))
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
@keyframes spinny {
|
||||||
0% {
|
0% {
|
||||||
rotate: 0deg;
|
rotate: 0deg;
|
||||||
|
|
|
@ -232,24 +232,3 @@ li {
|
||||||
.noscript {
|
.noscript {
|
||||||
display: none;
|
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;
|
|
||||||
}
|
|
Loading…
Reference in a new issue