'How can I block and replace a remote css file in browser?

Let's say there's a stylesheet at https://example.com/x.css. How do I replace that seamlessly on every page load with https://example.com/y.css?

I can use uBlock to block x from loading, but I'm struggling to figure out how to get y to load in its place.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source