Created
February 29, 2024 10:55
-
-
Save luttje/436e271753573bc2e2b0047050884c31 to your computer and use it in GitHub Desktop.
Adds the option to hide names to PARS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name PARS hide names option | |
// @namespace https://lutt.online | |
// @version 2024-02-22 | |
// @description PARS hide names option | |
// @author Lutt.online | |
// @match https://pars.curio.nl/* | |
// @icon https://www.curio.nl/assets/images/favicons/favicon.ico | |
// @run-at document-body-end | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.innerHTML = '.hidden { display:none; }'; | |
document.getElementsByTagName('head')[0].appendChild(style); | |
const attendanceEl = document.querySelector('#ContentPlaceHolder1_pnlDagroosterSelectie .row.clear'); | |
if (!attendanceEl) return; | |
const html = `<div class="pull-left extra-margin right top5"> | |
<input id="ContentPlaceHolder1_cbNamenLijstDagrooster" type="checkbox" checked="checked" onclick="document.querySelectorAll('.class-view-name').forEach(e => e.classList.toggle('hidden'), document.getElementById('ContentPlaceHolder1_cbNamenLijstDagrooster').checked);"> | |
</div> | |
<div class="pull-left extra-margin right top5"> | |
<label for="ContentPlaceHolder1_cbNamenLijstDagrooster">Toon Namen</label> | |
</div>`; | |
attendanceEl.innerHTML += html; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment