Anonymous ID: c473cc Sept. 3, 2021, 3:07 p.m. No.14516129   🗄️.is 🔗kun   >>6154 >>6173 >>6202

>>14516013 LB

Thanks anon!

 

I have put that in and now I can see png too.

 

Here's the full JS that works for both JS and PMG (but not for MP4) on my machine.

 

/ Image Fix /

{

var updateLinks = function() {

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

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

imageLinks.forEach(link ={

var n = Math.floor(Math.random() * 77777777777) + 1 ;

/Add in to enable .png /

 

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?n=${n};

 

/ Patch out previous fix /

/ var href = ${link.href.replaceAll("media.","sys.")}?n=${n};/

 

var imgs = link.querySelectorAll('img');

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

link.href = href;

});

};

 

updateLinks();

'//' allow to work with auto-reload.js, etc.

$(document).on('new_post', function (e, post) {

updateLinks();

});

}

 

9.5/10 mp4 missing kek

Anonymous ID: c473cc Sept. 3, 2021, 3:18 p.m. No.14516175   🗄️.is 🔗kun   >>6188 >>6192

>>14516154

The one that worked with jpg only is still in there, its just commented out with / /

See red text below. just remove the stuff below / Add in to enable png / and uncomment the red text part. should be back to what you had.

 

/ Image Fix /

{

var updateLinks = function() {

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

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

imageLinks.forEach(link ={

var n = Math.floor(Math.random() * 77777777777) + 1 ;

/Add in to enable .png /

 

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?n=${n};

 

==/ Patch out previous fix /

/ var href = ${link.href.replaceAll("media.","sys.")}?n=${n};/==

 

var imgs = link.querySelectorAll('img');

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

link.href = href;

});

};

 

updateLinks();

'//' allow to work with auto-reload.js, etc.

$(document).on('new_post', function (e, post) {

updateLinks();

});

}