Quizlet Show Hidden Flashcards

Show the hidden flashcards in Quizlet without logging in.

目前為 2021-10-07 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Quizlet Show Hidden Flashcards
// @namespace    QuizletHack
// @version      0.0.8
// @description  Show the hidden flashcards in Quizlet without logging in.
// @author       hacker09
// @match        *://quizlet.com/*
// @icon         https://assets.quizlet.com/a/j/dist/i/favicon.6e263725c926227.ico
// @require      https://greasyfork.org/scripts/21927-arrive-js/code/arrivejs.js
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
  'use strict';
  var DisableReading = true; //If true the Reading function will be disabled
  var RemoveNeedlessThings = true; //If true the Needless Things will be removed

  if (RemoveNeedlessThings === true) //If the RemoveNeedlessThings variable is true
  { //Starts the if condition
    window.onload = setTimeout(function() { //Starts the function when the website finishes loading

      //Show all hidden elements and disable the reading function.
      var FlashCards = document.getElementsByClassName("SetPageTerm has-definitionText"); //Get all flashcards
      for (var i = 0; i < FlashCards.length; i++) { //For every FlashCard
        FlashCards[i].className = "SetPageTerm has-definitionText is-showing"; //Change the FlashCard element class name so that the card is shown
        if (DisableReading === true) //If the DisableReading variable is true
        { //Starts the if condition
          var FlashCardClone = FlashCards[i].cloneNode(true); //Remove all event listeners by cloning the FlashCard element. (This removes the audio)
          FlashCards[i].parentNode.replaceChild(FlashCardClone, FlashCards[i]); //Add our cloned node to the page
        } //Finishes the if condition
      } //Finishes the for condition


      if (document.querySelector(".SetPageTermsStickyBanner.SetPageTermsStickyBanner--hasAdz") !== null) //If the Sign Up Box and the white overlay element exists
      { //Starts the if condition
        document.querySelector("div.SetPageWall.SetPageWall--normal").remove(); //Remove the Sign Up Box and the white overlay above this box
      } //Finishes the if condition

      if (document.querySelector("#setPageSetIntroWrapper") !== null) //If the big flashcards in the top element exists
      { //Starts the if condition
        document.querySelector("#setPageSetIntroWrapper").remove(); //Remove the big Flashcards in the top
      } //Finishes the if condition
      if (document.querySelector("div.SetPageStickyHeader.hgmlhdt") !== null) //If the top menu element exists
      { //Starts the if condition
        document.querySelector("div.SetPageStickyHeader.hgmlhdt").remove(); //Remove the top menu
      } //Finishes the if condition

      document.querySelector("div.SetPage-setDetailsInfoWrapper").remove(); //Remove the user name that created the quiz
      document.querySelector("div.SetPage-content").remove(); //Remove the tags related to the quiz set
      document.querySelector("#TopNavigationReactTarget").remove(); //Remove the top blue navigation menu

      if (document.querySelector("#setPageSetLinksWrapper") !== null) //If the "THIS SET IS OFTEN IN FOLDERS WITH..." box element exists
      { //Starts the if condition
        document.querySelector("#setPageSetLinksWrapper").remove(); //Remove everything inside the "THIS SET IS OFTEN IN FOLDERS WITH..." box
      } //Finishes the if condition

      document.querySelector("footer").remove(); //Remove the needlessly big footer

      if (document.querySelector(".SetPageTermsStickyBanner.SetPageTermsStickyBanner--hasAdz") !== null) //If the stick footer banner element exists
      { //Starts the if condition
        document.querySelector(".SetPageTermsStickyBanner.SetPageTermsStickyBanner--hasAdz").remove(); //Remove the stick footer banner
      } //Finishes the if condition
      if (document.querySelector("#UniversalUpsellTarget > div") !== null) //If the "save time with an expert" message element exists
      { //Starts the if condition
        document.querySelector("#UniversalUpsellTarget > div").remove(); //Remove the "save time with an expert" message
      } //Finishes the if condition
      if (document.querySelector("div.wugyavo") !== null) //If the "Sign up and see the remaining cards. It’s free!" box element exists
      { //Starts the if condition
        document.querySelector("div.wugyavo").remove(); //Remove the "Sign up and see the remaining cards. It’s free!" box
      } //Finishes the if condition
    }, 4000); //Finishes the onload function
  } //Finishes the if condition
})();