Misc 18+ Auto Confirm

Auto clicks 'I'm 18+' dialogue at landing.

  1. // ==UserScript==
  2. // @name Misc 18+ Auto Confirm
  3. // @license GNU GPLv3
  4. // @description Auto clicks 'I'm 18+' dialogue at landing.
  5. // @match https://www.pornoxo.com/*
  6. // @match https://www.fetishpapa.com/*
  7. // @match https://www.boyfriendtv.com/*
  8. // @version 1.1
  9. // @grant GM_getValue
  10. // @grant GM_setValue
  11. // @namespace
  12. // @namespace https://greasyfork.org/users/9946
  13. // ==/UserScript==
  14.  
  15.  
  16. /* defines PopUp Button button */
  17. const pB1=document.getElementsByClassName("swal2-confirm");
  18.  
  19.  
  20.  
  21. setTimeout(init,0.2*1000)
  22.  
  23. function init()
  24. {
  25. if (pB1.length > 0)
  26. {
  27. try
  28. {
  29. pB1[0].click();
  30. }
  31. catch(err)
  32. {
  33. console.log('caught the error');
  34. console.log(err.message);
  35. setTimeout(init,1000);
  36. }
  37. }
  38. else
  39. {
  40. setTimeout(init,2*1000);
  41. }
  42. }