// ==UserScript== // @name HTSD Calendar Filter v9 // @namespace http://tampermonkey.net/ // @version 9.2 // @description Floating modal to filter HTSD calendar to your schools. Scroll the left sidebar once, then use the two-step flow. // @author oneglory // @match https://www.htsdnj.org/our-district/hamilton-township-school-district-calendar* // @grant none // ==/UserScript== (function () { 'use strict'; // ─── CONFIG ─────────────────────────────────────────────────────────────── // Add or remove school name fragments to match what you want checked. const MY_SCHOOLS = []; // ───────────────────────────────────────────────────────────────────────── // ─── UI INJECTION ───────────────────────────────────────────────────────── const style = document.createElement('style'); style.textContent = ` #htsd-v9 { position: fixed; top: 16px; right: 16px; z-index: 9999999; width: 300px; background: #fff; border: 2px solid #003366; border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,0.22); font-family: system-ui, sans-serif; font-size: 13px; overflow: hidden; } #htsd-v9 .hdr { background: #003366; color: #fff; padding: 10px 14px; font-weight: 700; font-size: 13px; letter-spacing: 0.03em; } #htsd-v9 .body { padding: 12px; max-height: 360px; overflow-y: auto; background: #f7f9fc; } #htsd-v9 .foot { padding: 10px 12px; background: #fff; border-top: 1px solid #e0e6ee; } #htsd-v9 .hint { font-size: 11px; color: #666; margin-bottom: 10px; line-height: 1.5; } #htsd-v9 .row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; margin-bottom: 5px; background: #fff; border: 1px solid #dce4ef; border-radius: 6px; cursor: pointer; } #htsd-v9 .row:hover { background: #eef3fb; } #htsd-v9 .row input { cursor: pointer; width: 15px; height: 15px; flex-shrink: 0; } #htsd-v9 .row span { flex: 1; } #htsd-v9 .btn { width: 100%; padding: 11px; border: none; border-radius: 7px; font-weight: 700; font-size: 13px; cursor: pointer; margin-bottom: 7px; transition: opacity 0.15s, background 0.15s; } #htsd-v9 .btn:hover { opacity: 0.88; } #htsd-v9 .btn:disabled { opacity: 0.45; cursor: not-allowed; } #htsd-v9 .btn-prep { background: #e05c00; color: #fff; } #htsd-v9 .btn-apply { background: #003366; color: #fff; display: none; } #htsd-v9 .btn-clear { background: #fff; color: #c0392b; border: 1.5px solid #c0392b; } #htsd-v9 .status { font-size: 11px; font-weight: 600; text-align: center; min-height: 16px; color: #666; } #htsd-v9 .status.ok { color: #1a7a3a; } #htsd-v9 .status.warn { color: #c0392b; } #htsd-v9 .status.info { color: #e05c00; } `; document.head.appendChild(style); const ui = document.createElement('div'); ui.id = 'htsd-v9'; ui.innerHTML = `
Before Step 1: Scroll the school list on the left side of the page up and down once so the browser renders all the checkboxes. Then click Step 1.