Anyone have a script that redirects all is.4chan and is2.chan links to i.4cdn?
Pic unrelated.
Use 4chan x
>>58804958
What if my 4chan X doesn't have that option?
>>58804978
Then you're either an idiot or using some wacky fork.
>>58805139
I'm using the only fork that supports my browser. Will changing the hosts file to redirect both to i.4cdn result in any repercussions?
>>58804958
Huh, I never noticed it got that option, I guess I don't need this greasemonkey script any more then// ==UserScript==
// @name 4chanimgfix
// @namespace Hiroshima Nagasaki
// @author Anonymous
// @match *://boards.4chan.org/*
// @grant none
// ==/UserScript==
var a_scan = document.getElementsByTagName('a');
var hiroshima, nagasaki;
for(var i = 0; i < a_scan.length; i++) {
hiroshima = a_scan[i];
nagasaki = hiroshima.getAttribute('href');
if(nagasaki) hiroshima.setAttribute('href', nagasaki.replace(/is.4chan.org/gi, 'i.4cdn.org'));
}
>>58805149
No.
just edit the hosts file senpai
>>58805254
You're a hero. I can't stand 4chan x.
// ==UserScript==
// @name 4chan fix bad images url
// @namespace none
// @description read name
// @include http://boards.4chan.org/*
// @include https://boards.4chan.org/*
// @version 1.2
// @grant none
// ==/UserScript==
var images = document.body.getElementsByClassName("file");
for (var i = 0; i < images.length; i++)
{
var image = images[i];
var links = image.getElementsByTagName("a");
for (var j = 0; j < links.length; j++)
{
var link = links[j];
if (link.hostname == "i.4cdn.org")
continue;
link.hostname = "i.4cdn.org";
}
}
>>58805254
I had a very similar script and it worked only on some boards, tried this it does the same.
I honestly don't know why the fuck is it doing this