5keeve

Matt Parker's Math Puzzles - Fill Data

May 17th, 2020
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name     Matt Parker's Math Puzzles - My Data
  3. // @version  1
  4. // @grant    none
  5. // @include  https://think-maths.co.uk/*
  6. // ==/UserScript==
  7.  
  8. function init () {
  9.     let sr= document.querySelector('div.field.field--name-field-html.field--type-text-long.field--label-hidden.field__items').children[1].shadowRoot;
  10.   if (sr === null) return;
  11.  
  12.   email= sr.querySelector('input[name="email"]');
  13.   played_before= sr.querySelector('div.radio input[type="radio"]');
  14.  
  15.   if (email === null || played_before == null) {
  16.     console.log("retry");
  17.     window.setTimeout(init, 100);
  18.     return;
  19.   }
  20.   email.value='** YOUR MAIL ADDRESS HERE **';
  21.   played_before.click();
  22. }
  23.  
  24. init();
Add Comment
Please, Sign In to add comment