URL Fixer discussion

Discussion related to extensions like Extension Auto-Installer or Google Search link fix.
Locked
HaRT

URL Fixer discussion

Post by HaRT »

I was trying to use the URL Fixer 4.1's regexp abilities to implement a local URL rewriter in Firefox 21, primarily to switch to mobile versions of some pages automagically; e.g. http://alburov.livejournal.com/55897.html --> http://m.livejournal.com/read/user/alburov/55897.
I've added a replacement of “re:(https?:)//(.+)(\.livejournal.com)/(\d+)\.html” to “$1//m$3/read/user/$2/$4” but that didn't work (the URL wasn't replaced). I tried to prefix the «Replace It With...» string with “re:” too, to use ‘\’ instead of ‘$’, to escape all ‘/’ characters in the «If I Type...» string, and combinations thereof — to no avail.

What am I doing wrong? Which particular regexp syntax is supported? Has anyone succeeded in using this feature?
A working example would be appreciated.
HaRT

Re: URL Fixer discussion

Post by HaRT »

It seems to only make replacements in the host part of the URL, not schema, path, etc.
If true, this is a major drawback for this otherwise very useful extension and an unjustified limitation of its advanced functionality.
Wladimir Palant

Re: URL Fixer discussion

Post by Wladimir Palant »

Yes, URL Fixer only changes host names, not other parts of the URL. That's how it works in general.
HaRT

Re: URL Fixer discussion

Post by HaRT »

Wladimir Palant wrote:URL Fixer only changes host names, not other parts of the URL. That's how it works in general.
That's a real pity!
This limitation definitely has to find its way into all relevant pieces of URL Fixer documentation, as currently it's far from obvious.

Any hope that URL Fixer will be able to fix other parts of URL (as its name suggests) anytime soon (at least via regexps)?
Wladimir Palant

Re: URL Fixer discussion

Post by Wladimir Palant »

Quite frankly, I'm not sure what to do with the custom rules at all - right now they are a big footgun, it's too easy to break things and to be left wondering why something doesn't work later.
HaRT

Re: URL Fixer discussion

Post by HaRT »

Wladimir Palant wrote:it's too easy to break things and to be left wondering why something doesn't work later.
Current implementation communicates the change being made quite clearly. If some future version of URL Fixer assigns ids (consecutive numbers?) to the custom rules and adds the id of the applied rule to the message, that will be enough for troubleshooting. And, of course, many other features may be helpful to simplify the entire workflow.

Yet the question of correcting other parts of URL is interesting regardless of custom rules. Consider, say, multi-script keyboard layouts where some characters are produced by different keys depending on the active input language (e.g. in standard Latin-Cyrillic keyboard, ‘.’ in Russian is next to the right Shift, where ‘/’ is in US English). Since many sites still rely upon „file name extension”, users may end up with “host.tld/index/html” or “host.tld/default/aspx” instead of “host.tld/index.html” or “host.tld/default.aspx” respectively. Isn't that a perfect situation for URL Fixer to step in?
throwaway

Re: URL Fixer discussion

Post by throwaway »

For Firefox 23.0.1, URLs are not corrected.
throwaway1

Re: URL Fixer discussion

Post by throwaway1 »

Picture of corrections: http://i.imgur.com/ZpTwv7O.png

Gif of it not correcting: http://i.imgur.com/Uy2UY5j.gif
Locked