Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const inputTypes = [
- window.HTMLInputElement,
- window.HTMLSelectElement,
- window.HTMLTextAreaElement,
- ];
- function triggerInputChange(node, value = ''){
- if ( inputTypes.indexOf(node.__proto__.constructor) >-1 ) {
- const setValue = Object.getOwnPropertyDescriptor(node.__proto__, 'value').set;
- const event = new Event('input', { bubbles: true });
- setValue.call(node, value);
- node.dispatchEvent(event);
- }
- };
- var el = document.querySelector("#root > div > div > section > div.alternative-menu > button:nth-child(16)");
- el.addEventListener("click", function(){
- setTimeout(function(){
- 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"){
- triggerInputChange(document.querySelector("body > div:nth-child(10) > div > div > div > section > div.top > div > input"),'9f3c6b32dbe4a4d039e1a1f32d197c16f40f931ffadba5');
- //console.log("------------------- 99 ------------------------");
- }else{
- triggerInputChange(document.querySelector("body > div:nth-child(10) > div > div > div > section > div.top > div > input"),'5ff077e6458e4314daf325734487a00c1654c5bf72147b69afb7097ab7c093be833608971c77d172e67');
- //console.log("------------------- 00 ------------------------");
- }
- },1000);
- }, false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement