Automatically Add Cards on Quizlet

Allows User to set a number of cards to add on Quizlet automatically without having to click multiple times.

目前为 2023-01-04 提交的版本。查看 最新版本

// ==UserScript==
// @name         Automatically Add Cards on Quizlet
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Allows User to set a number of cards to add on Quizlet automatically without having to click multiple times.
// @author       Andriani Perez
// @match        https://quizlet.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=quizlet.com
// @grant        none
// @license      MIT
// ==/UserScript==

window.onload = function(){

    const addCard = document.getElementById("addRow");
    console.log(addCard);
    var iteration = 0;

    function sleep(milliseconds) {
      const date = Date.now();
      let currentDate = null;
      do {
        currentDate = Date.now();
      } while (currentDate - date < milliseconds);
    }

    if (addCard != null ){
        document.getElementById("addRow").addEventListener("click", function (){
            if(iteration ==0) {
                var numCard = window.prompt("Enter number of cards to add: ");
                iteration = 1;
            }
            for(var i=0; i < numCard; i++){
                document.getElementById('addRow').click();
                console.log(i);
                sleep(1);
            }
        })
    }};

QingJ © 2025

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