Open ghost opened 7 years ago
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.
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.
Now we have a query parameter remover factory that takes a callback that's called on each query parameter.