Quizlet Show Hidden Flashcards

Show the hidden flashcards in Quizlet without logging in.

目前为 2021-03-27 提交的版本。查看 最新版本

// ==UserScript==
// @name         Quizlet Show Hidden Flashcards
// @namespace    QuizletHack
// @version      0.0.1
// @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 = function() { //Starts the function when the website finishes loading
      document.querySelector("#setPageSetIntroWrapper").remove(); //Remove the big Flashcards in the top
      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
      document.querySelector("#setPageSetLinksWrapper").remove(); //Remove everything inside the "THIS SET IS OFTEN IN FOLDERS WITH..." box
      document.querySelector("footer").remove(); //Remove the needlessly big footer
    }; //Finishes the onload function
  } //Finishes the if condition

  document.arrive('div.SetPageWall.SetPageWall--normal', (function() { //Creates a new function to run when the Sign Up box is loaded

    // 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 FlasCard 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

    document.querySelector("div.SetPageWall.SetPageWall--normal").remove(); //Remove the Sign Up Box and the white overlay above this box
  })); //Finishes the function
})();