×
Login Register an account
Top Submissions Explore Upgoat Search Random Subverse Random Post Colorize! Site Rules Donate
8

Tampermonkey for catbox to fatbox redirect

submitted by rando to whatever 8 monthsSep 2, 2024 21:14:44 ago (+8/-0)     (whatever)

`// UserScript`
`// @name cat2fat`
`// @namespace http://tampermonkey.net/`
`// @version 0.1`
`// @description redirect catbox to fatbox`
`// @author anon`
`// @match https://www.voat.xyz/`
`// @match https://www.upgoat.net/`
`// @grant none`
`// /UserScript`
``
`(function () {`
` 'use strict';`
` var links = document.querySelectorAll('a,img,source');`
` if (links) {`
` links.forEach(s => {`
` if (s.href !== undefined && s.href.startsWith("https://files.catbox.moe/")) {`
` s.href = s.href.replace('catbox', 'fatbox');`
` }`
` if (s.src !== undefined && s.src.startsWith("https://files.catbox.moe/")) {`
` s.src = s.src.replace('catbox', 'fatbox');`
` if(s.parentNode.tagName === "VIDEO") {`
` s.parentNode.load();`
` }`
` }`
` });`
` }`
`})();`


Edit: https://pastebin.com/wUvTicij


8 comments block


[ - ] Fascinus 3 points 8 monthsSep 2, 2024 21:26:14 ago (+3/-0)

Thanks for letting me know about fatbox.

[ - ] rando [op] 2 points 8 monthsSep 2, 2024 21:15:57 ago (+2/-0)

Wow, formatting sucks on this site.

[ - ] Kozel 3 points 8 monthsSep 2, 2024 21:23:29 ago (+3/-0)

use pastebin

[ - ] Kozel 5 points 8 monthsSep 2, 2024 21:23:50 ago (+5/-0)

no actually take a screenshot of the code and put it on catbox

[ - ] Fascinus 3 points 8 monthsSep 2, 2024 21:24:54 ago (+3/-0)

This is the answer.

[ - ] Kozel 4 points 8 monthsSep 2, 2024 21:25:22 ago (+4/-0)

I have done the needful

https://files.catbox.moe/7m06xs.png

[ - ] Fascinus 2 points 8 monthsSep 2, 2024 21:33:28 ago (+2/-0)

Fatbox link for same: https://files.fatbox.moe/7m06xs.png

This is great!

Thanks again, OP!

[ - ] rando [op] 1 point 8 monthsSep 2, 2024 21:40:30 ago (+1/-0)

Thanks