Create a userscript for rewriting URLs
Source request: http://forum.adguard.com/showthread.php?8695-HowTo-rewrite-a-URL
Recently, I ran into ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/readme.txt while reading about the recent PHP vuln, but it turns out the major browsers dropped FTP capability around the time they integrated HTTPS-by-default everywhere. If this userscript is ever published, the best fallback would be to convert
- [ ] [s]ftp[s]:// → https://
- [ ] ftp:// → http:// (which the browsers would then try https://, but would allow fallback to http:// with (justified) warning
In theory the new $urltransform modifier: https://github.com/AdguardTeam/CoreLibs/issues/1364
I've read the $urltransform sections of the docs several times, but regex always confuses me. This seems simple, but I hesitate b/c of that. What would be the correct rule to attempt?