I have a website that I cannot edit that I visit frequently. I'm using Both Greasemonkey for Firefox and Tampermonkey for Chrome to try to use Javascript to automatically select a value in a dropdown. Below is the element of the dropdown.
<select name="term">
<option value="12">12 /mo. - $20.95/mo.</option>
<option value="24">24 /mo. - $17.95/mo.</option>
<option value="36">36 /mo. - $15.95/mo.</option>
</select>
As you can see, there is no element id. I've tried following the answers on here and here but changed them to use document.getElementsByName
instead of document.getElementById
since this dropdown element doesn't have an id but nothing I've done has worked.
How can I use Greasemonkey or Tampermonkey to automatically select the value of "36" whenever I visit that webpage?