// ==UserScript== // @name UWorld Review Answers // @namespace mailto:john.ciubuc@ttuhsc.edu // @version 1.1 // @description Hides and Reveals Answers // @author John Ciubuc // @match https://www.uworld.com/ClientApp/v*/apps/qbanktestinterface/index.html // @grant none // ==/UserScript== (function() { 'use strict'; var timer; function pageLoader() { // Get the answer container var unansweredBtn = document.getElementById("answerContainer"); // If we got it, the page is loaded and we're ready for injection if (unansweredBtn) { clearTimeout(timer); // Create CSS 'hide the answer' stylesheet var style = document.createElement('style'); style.innerHTML = ` [ng-if="(launchTestOptions.canShowAnswer || testInfo.testModeId == constants.testMode.search) && (currentQuestion.formatTypeId == constants.questionFormatType.singleBestResponse)"], .iradio_square-grey, [class="fal fa-lg fa-check"], [class="fal fa-lg fa-times"], .explanation, .pace pace-active, [class="answerStatsBarInsideDiv"], a[class="textHighlight"].a[class^="selection"]{ visibility: hidden; display: none; } strike { text-decoration:none; } `; // Add it to page so that previous answers and explanations are hidden document.head.appendChild(style); // Generate button, place it after answers var el = document.createElement("span"); el.innerHTML = "