Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- waitforformready();
- function waitforformready() {
- let myform = document.querySelector("form");
- if ( myform == null ) {
- setTimeout(waitforformready, 1000);
- } else {
- myform.addEventListener('submit', setautomagicallink);
- }
- }
- function setautomagicallink(event) {
- let myaid = document.querySelector("[name='custom aid']").value.trim();
- let mylink = document.querySelector("[name='custom link']").value.trim();
- let myaffiliate = document.querySelector("[name='custom affiliate']").value.trim();
- let mymailingboss = document.querySelector("[name='custom mailingboss']").value.trim();
- let myautomagicallink = 'https://w.rapidprofitmachine.com/?affiliate='+encodeURIComponent(myaffiliate)+'&aid='+myaid+'&mailingboss='+mymailingboss+'&link='+encodeURIComponent(mylink);
- let myinput = document.querySelector("[name='custom automagicallink']");
- jameschangevalue(myinput,myautomagicallink);
- myinput.setAttribute('value', myautomagicallink);
- return true;
- }
- function jameschangevalue(el,value){
- var nativeInputValueSetter = Object.getOwnPropertyDescriptor(
- window.HTMLInputElement.prototype,
- "value"
- ).set;
- nativeInputValueSetter.call(el, value);
- var inputEvent = new Event("input", { bubbles: true });
- el.dispatchEvent(inputEvent);
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement