'Chrome local overrides with port number?

I'm trying to use Chrome local overrides (running on Windows) to override a javascript file. This works great for a URL where the port number is not specified:

blah.com/static/js/main.js

can be overridden with

<chrome local overrides dir>/blah.com/static/js/main.js

But this doesn't seem to work when the first part of the URL (domain-and-port) contains a port number:

localhost:8080/static/js/main.js

should be able to be overridden with

<chrome local overrides dir>/localhost:8080/static/js/main.js

BUT Windows doesn't allow colon in a file or directory name. So, guessing/hoping that Chrome ignores the port number when applying overrides:

<chrome local overrides dir>/localhost/static/js/main.js

does not appear to get loaded (judging by the lack of purple dot in the page source pane of Chrome devtools).

Trying %3A instead of colon:

<chrome local overrides dir>/localhost%3A8080/static/js/main.js

also does not get loaded.

So - how can you override a file when the port number is specified in the URL?

Maybe I'm missing something simpler about how Chrome local overrides should work?

(Editing the js directly from the devtools window doesn't seem to be a viable option because 1) the file is 10MB making edits extremely slow, and 2) it's minified, and apparently you can't edit after pretty-printing in devtools)



Solution 1:[1]

This problem also exist on mac, you can try the dev edition, local overrides works. https://www.google.com/chrome/dev/

Sources

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

Source: Stack Overflow

Solution Source
Solution 1 kaala