Browse Source

dispatch input event to simulate user input

pull/342/head
Guillaume Vincent 8 years ago
parent
commit
02cd4bd4a4
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      extension/content.js

+ 5
- 0
extension/content.js View File

@@ -3,6 +3,11 @@ chrome.runtime.onMessage.addListener(message => {
const loginForm = getLoginForm();
loginForm.loginField.value = message.login;
loginForm.passwordField.value = message.password;

var event = new Event('input');
loginForm.loginField.dispatchEvent(event);
loginForm.passwordField.dispatchEvent(event);

loginForm.form.submit();
});


Loading…
Cancel
Save