Amazon always sort by price
Direct property modification usually needs a change
event being dispatched to notify the page scripts:
document.getElementById("s-result-sort-select").dispatchEvent(new Event('change', {bubbles: true}));
Thank you wOxxOm, that's a good info to remember.
Unfortunately changing the dropdown select and triggering the event change is not enough.
document.getElementById("s-result-sort-select").selectedIndex = 2;
document.getElementById("s-result-sort-select").dispatchEvent(new Event('change', {bubbles: true}));
Shouldn't that work or am I thinking too simple?
Amazon always sort by price
This should be an easy one, but I'm not experienced enough.
does change it in the dropdown, but doesn't trigger the event listener on the surrounding form.
Redirecting (add URL parameter) also doesn't work (because of CSP?):
Something like
also doesn't do the job.
Can someone please help?