I'm writing a Tampermonkey code for a webpage like ConverTo:
It's supposed to automatically select the second option in a dropdown:
<select class="format-select">
<option value="mp3">MP3</option>
<option value="mp4">MP4 (video)</option>
</select>
, several seconds after the page is fully loaded.
But nothing happens.
My code:
......
// @match https://www.converto.io/*
// @require http://code.jquery.com/jquery-1.11.0.min.js
// ==/UserScript==
$(document).ready(function(){
setTimout(test(),10000);
function test()
{
$(".format-select").val('mp4');
}
})();
Please help!