Anonymous ID: 8cad38 Sept. 3, 2021, 11:07 p.m. No.88464   ๐Ÿ—„๏ธ.is ๐Ÿ”—kun   >>8465

btw. that User-JS script.

I just thought about it and modified it, because it adds a number at the end of the URL, which causes the browser to not cache any picture, but reload them every time.

 

That makes no sense, because the URL is rewritten to sys.8kun.top and so it loads it from that URL anyway, but when that number is added the loads the same image over and over from the server instead of caching it, which means more outgoing traffic for 8kun, which is bad.

 

I removed the code that adds the number and for me it still works fine.

Anonymous ID: 8cad38 Sept. 3, 2021, 11:16 p.m. No.88468   ๐Ÿ—„๏ธ.is ๐Ÿ”—kun   >>8469

>>88465

 

{

var links = Array.from(document.querySelectorAll('a'))

var imageLinks = links.filter(l =/.media.8kun.top./ig.test(l.href))

imageLinks.forEach(link ={

var pieces = link.href.split('/')

var filename = pieces[pieces.length-1]

var [hash, extension] = filename.split('.')

var href = ${link.href.replace("media.","sys.")}/${hash}.jpg

var imgs = link.querySelectorAll('img')

imgs.forEach(i =i.src = href)

link.href = href

})

 

}

Anonymous ID: 8cad38 Sept. 4, 2021, 1:34 a.m. No.88503   ๐Ÿ—„๏ธ.is ๐Ÿ”—kun

>>88502

>is it my imagination or are images sharper using the javascript?

imagination.

I'm not sure about the thumbnails, but the full size images are the same.

I'm looking if there is a way to change the URL on load, so no refresh would be needed anymore.