Я не могу заставить мой скрипт автологина Tampermonkey работать на веб-странице.
Это источник страницы:
<p>
<label for="username" style="opacity: 1;">Gebruikersnaam</label>
<input type="text" name="username" id="username" autocomplete="off" autofocus="">
</p>
<p>
<label for="password">Wachtwoord</label>
<input type="password" name="password" id="password" autocomplete="off">
</p>
<button id="authLeftPaneLoginButton" class="smscButton">
Aanmelden
</button>
Перевод некоторых слов:
Gebruikersnaam означает имя пользователя
Wachtwoord означает пароль
Aanmelden означает логин
Вот код tampermonkey, который я использую:
waitForKeyElements('document.getElementById("username")', enterUsername())
function enterUsername (jNode) {
$("#username").val("username_here");
}
$("#password").val("password_here");