Quizlet fuzz remover

Remove all flashcard answer fuzz

  1. // ==UserScript==
  2. // @name Quizlet fuzz remover
  3. // @version 1.1
  4. // @grant none
  5. // @include https://quizlet.com/*-flash-cards/
  6. // @description Remove all flashcard answer fuzz
  7. // @namespace https://greasyfork.org/users/22981
  8. // @license MIT
  9. // ==/UserScript==
  10.  
  11. /// While the load more button exists, load more
  12.  
  13. let tryCounter = 1
  14. console.log('script running')
  15. interval_documentHidden = setInterval(function checker() {
  16. if (!document.hidden) {
  17. if (document.readyState === 'complete') {
  18. try{
  19. let scripts = document.getElementsByTagName('script');
  20. [].forEach.call(scripts, el => {
  21. if (el.src.includes('setSlug')) {el.remove();let found = true;console.log('found slug')}
  22. });
  23. let fuzz = document.querySelectorAll('[class*="b1sa2ccx"');
  24. [].forEach.call(fuzz, el => {
  25. el.classList.remove('b1sa2ccx')
  26. });
  27. if (found = true) {console.log('script exiting');clearInterval(interval_documentHidden)}
  28. }
  29. catch{
  30. console.log('Waiting for elements to load. Try #'+tryCounter)
  31. tryCounter++;
  32. if (tryCounter > 5){
  33. console.log('Quizlet fuzz remover-Something wrong happened.')
  34. clearInterval(interval_documentHidden)}
  35. }
  36. }
  37. }
  38. }, 1000);