link_cleaner icon indicating copy to clipboard operation
link_cleaner copied to clipboard

Generalise parameter remover

Open ghost opened this issue 7 years ago • 2 comments

Now we have a query parameter remover factory that takes a callback that's called on each query parameter.

ghost avatar Jul 05 '17 08:07 ghost

I was wondering about doing it this way for the first version. I decided to not have the indirection (even if some code was very similar), but maybe now that the list of sites is growing, it might be more justified.

I don't see a reason to remove the remove_searchparams function though, since it would be faster than going through every single search param.

idlewan avatar Jul 05 '17 10:07 idlewan

I don't think there's any downside to generalising from the beginning, if it saves us from having to change everything in the future. That's a fair reason not to alter remove_searchparams; it's up to you, then.

ghost avatar Jul 05 '17 20:07 ghost