[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Anyone have a script that redirects all is.4chan and is2.chan

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 11
Thread images: 2

File: C3feQlbXUAEmyvl.jpg (65KB, 1024x570px) Image search: [Google]
C3feQlbXUAEmyvl.jpg
65KB, 1024x570px
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'));
}
>>
File: Screenshot_20170205-122143.png (54KB, 1080x1920px) Image search: [Google]
Screenshot_20170205-122143.png
54KB, 1080x1920px
>>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
Thread posts: 11
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.