Skip to content

Instantly share code, notes, and snippets.

Created November 14, 2021 03:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save prail/fdfebc6745d87504581a8afc9a6d712f to your computer and use it in GitHub Desktop.
PCC Stalker Directory
// ==UserScript==
// @name Stalker Directory
// @version 1.0
// @description Adds images to the PCC student (stalker) directory.
// @author Andrew
// @match
// @icon
// @grant none
// ==/UserScript==
(function() {
'use strict';
var rows = document.getElementById("ctl00_cphMainContent_gvResults").rows;
for (var e in rows) {
var row = rows[e], name = row.className;
if (name == "GridViewNormalRow" || name == "GridViewAlternatingRow") {
/* convert the row's SID to base 64,
so we can look it up with image API. */
var b64RowSID = btoa(row.cells[0].textContent);
var studentImageURL = `${b64RowSID}&t=Y`;
row.insertCell(0).innerHTML = `<img src="${studentImageURL}">`;
Copy link

prail commented May 19, 2023

To install you'll need to download either Tampermonkey or Greasemonkey depending on if you use Chrome or Firefox. Should work in both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment