PerfectSlayer / scrollupfolder

A firefox addon wich goes up a folder of a website.
https://addons.mozilla.org/fr/firefox/addon/scroll-up-folder/
Other
21 stars 9 forks source link

feature: expose RegEx #27

Closed atomGit closed 9 years ago

atomGit commented 9 years ago

wondering if you might consider exposing the RegEx for segmenting the URL for better customization?

PerfectSlayer commented 9 years ago

Hi @atomGit

The function which computes the URLs is not only a RegEx. It is based on Firefox APIs. You could have a look to the function or the API computing segments.

So I will be hard to expose this feature.. Perhaps the best solution for you is to fork the source to customize the algorithm to fit your needs. But if you have ideas to improve it, feel free to share so I could integrate it for everyone.

Regards.

atomGit commented 9 years ago

@PerfectSlayer - thanks for the reply i was wanting to split URL parameters at the "&" char - that is actually useful sometimes... example.com/?aaa&bbb example.com/?aaa example.com/

PerfectSlayer commented 9 years ago

Hum, did you have a look at the first part of the issue #23 ? It looks like this match what you want, isn't it?

atomGit commented 9 years ago

not exactly - i'm not interested in in incrementing the variable - see my example again ... `example.com/?aaa&bbb

example.com/?aaa

example.com/`

PerfectSlayer commented 9 years ago

I barely see the difference between:

Where aaa and bbb are parameter names without value. Why the "Parse in key-value blocks" doesn't did the trick?

atomGit commented 9 years ago

ah, yes, you're right - there is no difference - both examples are the same /?a=1&b=2 /?a=1 /

i thought that enabling the "parse get vars..." would allow this, but it doesn't

PerfectSlayer commented 9 years ago

Nope, for the moment, the option only strips the get vars in one block. The issue #23 deals with this improvement but the original reporter doesn't seemto be involve anymore.

The main question that remains before I implement it is: does it make sens to cut URL var by var? I mean, there is no logic in var order so it will be no logic in URL displayed in panel..

atomGit commented 9 years ago

i messed up - sorry - although splitting at the & char could be useful in some cases, what i meant was to split at the # char

a lot of times you may open a URL to, for example, a forum thread that points to a particular post (anchor tag) and it would be nice to trim that in some cases... /this#that /this

PerfectSlayer commented 9 years ago

Sorry for the delay, I was moving my home…

So you want to strip the anchor only? I could be easy to do. Would you like I have a look at it?

atomGit commented 9 years ago

moving your hom.... OH i get it! you mean like this... https://www.youtube.com/watch?v=xI3O_frrQN4

sure, if you have dev version i can test that would be great

PerfectSlayer commented 9 years ago

Here is a dev preview version with anchor parsing support (link removed, the public version is now released). Give it a try then give me your feedback :wink:

P.S.: Yeah, it was too heavy, I just buy a new one :dizzy_face:

atomGit commented 9 years ago

it works, but it's a bit strange that it took a little fiddling to get it to work at first - i loaded up a page, enabled the option to segment # chars and it didn't work, as i sort of expected, however even a page reload didn't work. upon loading a new page however, it worked as expected and then when i closed and re-opened the original it worked there also, so i guess all is OK

perhaps more importantly, it is probably highly likely that the wife/GF will be pestering you to get things done around your new home, in which case this might come in handy... http://kuukunen.net/pics/he_will_fix_it.jpg

PerfectSlayer commented 9 years ago

The strange behavior is due to the fact I keep computed URLs are cached by tab for the current page. So enabling the option and check the current page will not work. You will have to change page or open a new tab to enjoy the new behavior.

Anyway, if everything works file, I will make a public release and upload it to AMO and babelzilla. Don't forget to re-install the AMO version to have the future updates!

Right, actually she is flooding my todolist with no-tech tasks (like fixing radiators, installing window curtains, …) :cry:

atomGit commented 9 years ago

seems to work fine - thanks for your work :) take care!

PerfectSlayer commented 9 years ago

The new version is live on AMO! Feel free to leave review if you have an account :angel: