Auto Replace CAPTCHA Text

Tự động thay thế bất kỳ văn bản CAPTCHA nào thành "Bạn không phải Ngọc Thành"

  1. // ==UserScript==
  2. // @name Auto Replace CAPTCHA Text
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.1
  5. // @description Tự động thay thế bất kỳ văn bản CAPTCHA nào thành "Bạn không phải Ngọc Thành"
  6. // @author duong030909
  7. // @match *://*/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Các từ khóa CAPTCHA cần dò
  15. const captchaKeywords = [
  16. 'captcha',
  17. "I'm not a robot",
  18. 'I am not a robot',
  19. 'xác minh',
  20. 'robot'
  21. ];
  22.  
  23. const replacementText = "Bạn không phải Ngọc Thành";
  24.  
  25. function replaceCaptchaText() {
  26. const elements = document.querySelectorAll('body *');
  27. elements.forEach(el => {
  28. if (el.children.length === 0 && el.innerText.trim() !== "") {
  29. const text = el.innerText.toLowerCase();
  30. if (captchaKeywords.some(keyword => text.includes(keyword.toLowerCase()))) {
  31. el.innerText = replacementText;
  32. }
  33. }
  34. });
  35. }
  36.  
  37. replaceCaptchaText();
  38.  
  39. const observer = new MutationObserver(replaceCaptchaText);
  40. observer.observe(document.body, { childList: true, subtree: true });
  41. })();