Sleazy Fork is available in English.

討論 » 開發

How can I use Greasemonkey user script automatically enter the Youtube Url into the input and submit

§
發表於:2020-02-29
編輯:2020-02-29

How can I use Greasemonkey user script automatically enter the Youtube Url into the input and submit

I try to let the input place automatically entered the Youtube Url and submit the button on this page: https://dualsub-exporter.netlify.com

The trick is to pass the parameter of the Url https://dualsub-exporter.netlify.com/?https://www.youtube.com/watch?v=5HhB4oMgS7E

The script I use does not work:

document.querySelector('input.jss128').value = location.href.split('/?')[1];
document.querySelector('div.jss124 button').click();

It has to click the input place first and enter something, then to cick the button. My script could fill the Url into the input place, but it seems that the button could not response to the click event.

Someone tells me that

“The form has its own submit method. The input can have the required attribute.”

How could I handle with this special form? THX!

發表回覆

登入以回復