├── Quizlet Editor.user.js ├── LICENSE └── README.md /Quizlet Editor.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name Quizlet Editor 3 | // @match http*://www.quizlet.com/explanations/textbook-solutions/* 4 | // @match http*://quizlet.com/explanations/textbook-solutions/* 5 | // @version 0.2 6 | // @description Remove paywall for Quizlet answers 7 | // @author troop129 + josephyooo 8 | // @grant none 9 | // @run-at document-end 10 | // ==/UserScript== 11 | window.addEventListener('load', function() { 12 | 'use strict'; 13 | var paywall = document.getElementsByClassName('wugyavo'); 14 | if(paywall.length != 0){ 15 | paywall[0].remove(); 16 | document.getElementsByClassName('ExplanationSolutionsContainer hnqbbas s1oluvjw')[0].style.overflow="visible"; 17 | let newHeight = document.getElementsByClassName('ExplanationsSolutionCard c5ngj6s')[0].offsetHeight; 18 | document.getElementsByClassName('mv7e89c')[0].style.minHeight=newHeight+"px"; 19 | } 20 | }, false); 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Abid Rasheed 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Quizlet Explanations Unlocker 2 | 3 | [![MIT License](https://img.shields.io/apm/l/atomic-design-ui.svg?style=for-the-badge)](https://github.com/troop129/QuizletAnswers/blob/master/LICENSE) 4 | ![Size](https://img.shields.io/github/languages/code-size/troop129/QuizletAnswers?style=for-the-badge) 5 | ![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge&logo=javascript&logoColor=%23F7DF1E) 6 | ![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge&logo=html5&logoColor=white) 7 | [![GreasyFork](https://img.shields.io/badge/Install-Greasy%20Fork-red?style=for-the-badge)](https://greasyfork.org/en/scripts/438663-quizlet-explanations-unlocker) 8 | 9 | # THIS PROJECT HAS BEEN DEPRECATED 10 | On the advent of each new school year comes a new set of aspiring students wishing to take advantage of this script. I admire your agency, but unfortunately, Quizlet has improved their security measures to prevent this very workaround. They now use randomly generated placeholder text in order to provide an appearance of answers, rather than ship the entire answers in the packet and mask it. This script no longer works because of it. I have no plans to update it, primarily because I have no use for Quizlet anymore. 11 | 12 | I only advise you fellow students to spend the effort either actually learning the material, or poke around on websites and find your own fun projects. I am never one to discourage learning. 13 | 14 | Good luck in your academic journeys. 15 | 16 | 17 | # OLD README FOR GIGGLES STILL BELOW 18 | 19 | Ever since Quizlet bought Slader and locked the community-made answers behind a paywall, thousands of high school students have been unable to access the files they need to complete their homework. In order to remedy this situation, I have created a simple Tampermonkey script that will bypass the paywall in an account that is not logged in. 20 | 21 | This is purely for educational purposes (quite literally) and if you want me to take this down I shall. Please contact me through this [email](mailto://quizletscraper@gmail.com). 22 | 23 | ## Installation 24 | 25 | For now, this is a Tampermonkey script that will run in the browser. In order to install this script, download and add [Tampermonkey](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en) to your web browser (script only tested on Chrome). 26 | 27 | ![Installation](https://i.imgur.com/53oY3vt.gif) 28 | 29 | After installing Tampermonkey, a new tab will open. You can click out of that. 30 | 31 | If you already have Tampermonkey, install this script from [Greasyfork](https://greasyfork.org/en/scripts/438663-quizlet-explanations-unlocker). 32 | 33 | The easiest way to install the script is to copy and paste the script from this repo into Tampermonkey. You can also drag and drop it if you download it directly from the repo, the file is named ["Quizlet Answers.user.js"](https://github.com/troop129/QuizletAnswers/blob/main/Quizlet%20Editor.user.js). 34 | 35 | ```javascript 36 | // ==UserScript== 37 | // @name Quizlet Editor 38 | // @match http*://www.quizlet.com/explanations/textbook-solutions/* 39 | // @match http*://quizlet.com/explanations/textbook-solutions/* 40 | // @version 0.2 41 | // @description Remove paywall for Quizlet answers 42 | // @author troop129 + josephyooo 43 | // @grant none 44 | // @run-at document-end 45 | // ==/UserScript== 46 | window.addEventListener('load', function() { 47 | 'use strict'; 48 | var paywall = document.getElementsByClassName('wugyavo'); 49 | if(paywall.length != 0){ 50 | paywall[0].remove(); 51 | document.getElementsByClassName('ExplanationSolutionsContainer hnqbbas s1oluvjw')[0].style.overflow="visible"; 52 | let newHeight = document.getElementsByClassName('ExplanationsSolutionCard c5ngj6s')[0].offsetHeight; 53 | document.getElementsByClassName('mv7e89c')[0].style.minHeight=newHeight+"px"; 54 | } 55 | }, false); 56 | ``` 57 | 58 | Do this by opening the extensions menu, then clicking on "Create a new script". You can drag and drop here (after clearing the screen) or select all, delete, and copy-paste. 59 | 60 | Then press "Ctrl + S" to save and it should automatically be activated. 61 | 62 | 63 | ![Installation p2](https://i.imgur.com/XljMDto.gif) 64 | 65 | ## Usage 66 | THIS SCRIPT WILL NOT WORK WITH A LOGGED IN ACCOUNT!! Use incognito mode or another chrome profile where you are not logged in. Quizlet does not show the preview for the answers when you are logged in, so we cannot scrape it. You can enable this extension in incognito by right-clicking > "Manage Extensions" > "Allow in Incognito". I would recommend pinning Tampermonkey for easy access. 67 | 68 | ![Enabling Incognito](https://i.imgur.com/h5FcT9p.gif) 69 | 70 | In order to use this extension, just go to the page you would like the answers for and wait. In order to get the right `
` tags we have to wait for the page to fully load. 71 | 72 | ![Free Answers](https://i.imgur.com/mXzytpp.gif) 73 | 74 | ## How? 75 | If you look at the Chrome Console, the HTML for the Quizlet answers page has two interesting parts for us. `
` and `
`. 76 | 77 | ![wugyyavo](https://i.imgur.com/Aph6fbf.png) 78 | This div contains the paywall itself, which we can just delete with the following code: 79 | ```javascript 80 | var paywall = document.getElementsByClassName('wugyavo'); 81 | paywall[0].remove(); 82 | ``` 83 | What remains is the snippet of answer (now helpfully unblurred) but most likely cut off, as you can see in the snippet below. 84 | 85 | ![hs7m9cv s1oluvjw](https://i.imgur.com/vDlbva8.png) 86 | 87 | In order to solve this, we can add some styling to the `hs7m9cv s1oluvjw` tag, which contains the answer. This will allow it to scroll and although it is not visually pleasing, it is functional. 88 | ```javascript 89 | document.getElementsByClassName('ExplanationSolutionsContainer hnqbbas s1oluvjw')[0].style.overflow="visible"; 90 | ``` 91 | As you can see, the script appends the `overflow:visible` tag. This makes the box free from being cut off and we can see all of it rendered at once. This does cut off some of the text below it, so it needs a bit of logic to fix that. 92 | ```javascript 93 | let newHeight = document.getElementsByClassName('ExplanationsSolutionCard c5ngj6s')[0].offsetHeight; 94 | document.getElementsByClassName('mv7e89c')[0].style.minHeight=newHeight+"px"; 95 | ``` 96 | This finds the new height of the box and adds it to the height of the box. Still has a lot of edge case errors, but not a bad band-aid overall. 97 | 98 | ![HTML after edit](https://i.imgur.com/064JBUU.png) 99 | 100 | ## Issues 101 | Still cuts off the buttons below the answers some times. Also sometimes has too much space taken up. 102 | 103 | ## Next Steps 104 | I would like to spend more than 5 minutes on reorganizing the page to fit the new visible answer, it does need some reoganizing. 105 | 106 | ## Contributing 107 | Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. 108 | 109 | ## License 110 | [MIT](https://github.com/troop129/QuizletAnswers/blob/main/LICENSE) 111 | 112 | ## Changelog 113 | - 10/24/2022: v0.2 - Updating to working again, make overflow visible instead of scroll. 114 | --------------------------------------------------------------------------------