// ==UserScript== // @name Quizlet set copier // @namespace http://tampermonkey.net/ // @version 0.1 // @license MIT // @description Ctrl + Shift + I -> go to console and copy the output // @author You // @match https://quizlet.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=quizlet.com // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; let output = ""; const spanTermTexts = document.querySelectorAll("span.TermText"); if(!spanTermTexts || spanTermTexts == null) { console.log("No terms were found. Please go to the main page of a quizlet set!"); return } const textArr = Array.prototype.slice.call(spanTermTexts).map(x => x.innerText); textArr.forEach((x, i) => { output += (i%2 == 0) ? `${x} : ` : `${x}\n`; }); console.log(output); })();