Bypass Age Check

The script automically select agree when age check appear

  1. // ==UserScript==
  2. // @name Bypass Age Check
  3. // @name:zh-Tw 動畫瘋自動同意年齡確認
  4. // @description The script automically select agree when age check appear
  5. // @description:zh-Tw 年齡認證出現時自動選取同意
  6. // @author mcc
  7. // @version 1
  8. // @run-at document-end
  9. // @match http*://*ani.gamer.com.tw/animeVideo*
  10. // @license MIT
  11. // @namespace https://greasyfork.org/users/1280342
  12. // ==/UserScript==
  13. /*jshint esversion: 8 */
  14.  
  15. (async function () {
  16. let videoPlayer = document.querySelector('#ani_video')
  17. let observer = new MutationObserver((mutations) => {
  18. mutations.forEach((mutation) => {
  19. mutation.addedNodes.forEach((node) => {
  20. if (node.className == 'R18'){
  21. document.getElementById('adult').click()
  22. }
  23. })
  24. });
  25. });
  26. observer.observe(videoPlayer, { childList: true, });
  27. })();