Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Replace is/is2 with i.4cdn.org
- // @namespace boards.4chan.org
- // @include *boards.4chan.org*
- // @description Replaces slow new links with fast old ones
- // @version 1
- // @grant none
- // ==/UserScript==
- function replaceLinks () {
- var aTags = document.getElementsByTagName('a');
- for (i = 0; i < aTags.length; i++) {
- if (aTags[i].href.includes('is2.4chan.org')) aTags[i].href = aTags[i].href.replace('is2.4chan.org', 'i.4cdn.org');
- if (aTags[i].href.includes('is.4chan.org')) aTags[i].href = aTags[i].href.replace('is.4chan.org', 'i.4cdn.org');
- }
- setTimeout(replaceLinks, 500);
- }
- replaceLinks();
Add Comment
Please, Sign In to add comment