Skip to content

Instantly share code, notes, and snippets.

@jaeheonshim
Last active July 4, 2022 03:14
Show Gist options
  • Save jaeheonshim/bf3709c43007ea09e6608d42495f75ee to your computer and use it in GitHub Desktop.
Save jaeheonshim/bf3709c43007ea09e6608d42495f75ee to your computer and use it in GitHub Desktop.
This userscript conceals scores on the AP score report page until you reveal each score individually.
// ==UserScript==
// @name Conceal AP Scores
// @namespace https://jaeheonshim.com
// @version 1.0
// @description Conceals scores on AP score report page until you reveal each score individually.
// @author Jaeheon Shim
// @match https://apstudents.collegeboard.org/view-scores
// @icon https://www.google.com/s2/favicons?sz=64&domain=collegeboard.org
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant none
// ==/UserScript==
(function() {
const linkCSS = "cursor: pointer; text-decoration: underline;";
const customStyles = ".apscores-badge-score { display: none; }"
$('html > head').append($(`<style>${customStyles}</style>`));
waitForKeyElements(".apscores-badge-score", function(node) {
node.parent().children("a").remove();
node.after(function() {
return $(`<a style="${linkCSS}">Reveal Score</a>`).click((e) => {
node.show();
$(e.currentTarget).remove();
});
});
}, false);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment