SHARE
TWEET

Untitled

a guest Jun 25th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function triggerKeyboardEvent(el, keyCode, type)
  2. {
  3.     var eventObj = document.createEventObject ?
  4.         document.createEventObject() : document.createEvent("Events");
  5.  
  6.     if(eventObj.initEvent){
  7.       eventObj.initEvent(type, true, true);
  8.     }
  9.  
  10.     eventObj.keyCode = keyCode;
  11.     eventObj.which = keyCode;
  12.    
  13.     el.dispatchEvent ? el.dispatchEvent(eventObj) : el.fireEvent("onkeydown", eventObj);
  14.  
  15. }
  16. $=$$
  17.  
  18. content = $('table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(1) > td > table > tbody > tr:nth-child(1) > td > div > div')[3].textContent.split('');
  19. i = 0;
  20. function a () {
  21.     if (i == content.length - 1) return;
  22.     input = $('table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(2) > td > input')[0]
  23.     input.focus()
  24.     input.value += content[i++];
  25.     triggerKeyboardEvent(input, input.value.charCodeAt(0), "keydown")
  26.     input.click()
  27.     triggerKeyboardEvent(input, input.value.charCodeAt(0), "keypress")
  28.     triggerKeyboardEvent(input, input.value.charCodeAt(0), "keyup")
  29. }
  30. a();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top