When setting option.selected = true;, the "change" event (which creates the download link for the selected format) doesn't fire. Calling .dispatchEvent(new Event('change')) on the <select> element (the parent) fixes that issue.
I haven't thoroughly tested this, it works for me on Waterfox G6.0.8 (64-bit) using Violentmonkey v2.18.0.
When setting
option.selected = true;
, the "change" event (which creates the download link for the selected format) doesn't fire. Calling.dispatchEvent(new Event('change'))
on the<select>
element (the parent) fixes that issue.I haven't thoroughly tested this, it works for me on Waterfox G6.0.8 (64-bit) using Violentmonkey v2.18.0.