Quizlet Show Hidden Flashcards

Show the hidden flashcards in Quizlet without logging in.

当前为 2022-01-12 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Quizlet Show Hidden Flashcards
  3. // @namespace QuizletHack
  4. // @version 0.0.12
  5. // @description Show the hidden flashcards in Quizlet without logging in.
  6. // @author hacker09
  7. // @match *://quizlet.com/*
  8. // @icon https://assets.quizlet.com/a/j/dist/i/favicon.6e263725c926227.ico
  9. // @run-at document-end
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (async function() {
  14. 'use strict';
  15. var TimesExecuted = 0; //Creates a new variable
  16. var Counter = 0; //Creates a new counter variable
  17. var DisableReading = true; //If true the Reading function will be disabled
  18. var RemoveNeedlessThings = true; //If true the Needless Things will be removed
  19.  
  20. async function hack() //Creates a new hack function
  21. { //Starts the new hack function
  22. //Show all hidden elements and disable the reading function
  23. document.querySelectorAll("div.SetPageTerm").forEach(function(FlashCards) { //For each FlashCard
  24. FlashCards.className = "SetPageTerm has-definitionText is-showing"; //Change the FlashCard element class name so that the card is shown
  25. if (DisableReading === true) //If the DisableReading variable is true
  26. { //Starts the if condition
  27. FlashCards.innerHTML = FlashCards.innerHTML; //Remove the audio of the FlashCard element
  28. } //Finishes the if condition
  29. }); //Finishes the foreach loop
  30. } //Finishes the hack function
  31. await hack(); //Calls the hack function
  32.  
  33. window.onscroll = async function() { //Creates a new function to run when the page is scrolled
  34. TimesExecuted += 1; //Sum the amount of times that the page is scrolled
  35. if (TimesExecuted === 15) { //On the first time that the page is scrolled
  36. await hack(); //Calls the hack function
  37.  
  38. setTimeout(function() { //Starts the settimeout function
  39. if (document.querySelector("#Executed") === null) //If the element wasn't added in the page yet
  40. { //Starts the if condition
  41. document.querySelector("div.SetPageTerm").insertAdjacentHTML('beforebegin', '<h1 id="Executed">(Showing ' + document.querySelectorAll("div.SetPageTerm.has-definitionText.is-showing").length + ' Terms)</h1>'); //Show the number of shown terms
  42. window.scrollTo(0, 0); //Scroll to top
  43. } //Finishes the if condition
  44. }, 1000); //Finishes the settimeout function
  45.  
  46. if (RemoveNeedlessThings === true) //If the RemoveNeedlessThings variable is true
  47. { //Starts the if condition
  48. document.head.insertAdjacentHTML('beforeend', '<style>.SetPageStickyHeader.hgmlhdt, .SetPageTermsStickyBanner.SetPageTermsStickyBanner--hasAdz, .SetPageWall.SetPageWall--normal, .TopNavigationWrapper, .SetPage-setDetailsInfoWrapper, footer, .SetPage-setIntro, .wugyavo, .SetPage-setLinksWrapper, .SetPage-setIntroWrapper, .SetPageEmbeddedAd-wrapper, .SetPageTerms-embeddedDesktopAdz, .SetPageStudyModesBanner-body {display: none !important;}</style>'); //Hide the top menu, the stick footer banner, the Sign Up Box and the white overlay above this box, the top navigation menu, the user name that created the quiz, the needlessly big footer, the big flashcards box, the 2 stick footer banner, the related questions below all the cards, title of the cards set, big flash cards box and study/play columns below the big flash cars box, ads in between card rows, more ads, wants to learn this set quickly? question box below all card rows
  49.  
  50. if (DisableReading === true) //If the DisableReading variable is true
  51. { //Starts the if condition
  52. document.querySelectorAll(".SetPageTerm-actions").forEach(function(FlashCards) { //For each star and audio btn
  53. Counter += 1; //Increase the Counter variable
  54. FlashCards.innerHTML = Counter; //Add a crescent number
  55. }); //Finishes the foreach loop
  56. } //Finishes the if condition
  57.  
  58. if (document.querySelector("#UniversalUpsellTarget > div") !== null) //If the "save time with an expert" message element exists
  59. { //Starts the if condition
  60. document.querySelector("#UniversalUpsellTarget > div").remove(); //Remove the "save time with an expert" message
  61. } //Finishes the if condition
  62.  
  63. } //Finishes the if condition
  64. } //Finishes the if condition
  65. }; //Finishes the onscroll event listener
  66. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址