Advertisement
Guest User

Untitled

a guest
Feb 18th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1.  
  2. const inputTypes = [
  3. window.HTMLInputElement,
  4. window.HTMLSelectElement,
  5. window.HTMLTextAreaElement,
  6. ];
  7.  
  8. function triggerInputChange(node, value = ''){
  9. if ( inputTypes.indexOf(node.__proto__.constructor) >-1 ) {
  10. const setValue = Object.getOwnPropertyDescriptor(node.__proto__, 'value').set;
  11. const event = new Event('input', { bubbles: true });
  12. setValue.call(node, value);
  13. node.dispatchEvent(event);
  14. }
  15. };
  16.  
  17. var el = document.querySelector("#root > div > div > section > div.alternative-menu > button:nth-child(16)");
  18. el.addEventListener("click", function(){
  19. setTimeout(function(){
  20. if(document.querySelector("body > div:nth-child(10) > div > div > div > section > div.bottom > div:nth-child(2) > div.value").textContent.substr(0, 1)=="5"){
  21. triggerInputChange(document.querySelector("body > div:nth-child(10) > div > div > div > section > div.top > div > input"),'9f3c6b32dbe4a4d039e1a1f32d197c16f40f931ffadba5');
  22. //console.log("------------------- 99 ------------------------");
  23. }else{
  24. triggerInputChange(document.querySelector("body > div:nth-child(10) > div > div > div > section > div.top > div > input"),'5ff077e6458e4314daf325734487a00c1654c5bf72147b69afb7097ab7c093be833608971c77d172e67');
  25. //console.log("------------------- 00 ------------------------");
  26. }
  27. },1000);
  28. }, false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement