From 79a347f84de08b9e34e700c92332b4ce1dae1367 Mon Sep 17 00:00:00 2001 From: Dims Akpan Date: Tue, 25 Nov 2025 09:58:36 +0100 Subject: [PATCH] Dateien nach "/" hochladen --- academyFIVE__AddSelectBox.user.js | 47 ++++++++++++++++++ academyFIVE__ChangeFont.user.js | 69 ++++++++++++++++++++++++++ academyFIVE__MoveNavbarIcons.user.js | 40 +++++++++++++++ academyFIVE__ResizeNavbar.user.js | 26 ++++++++++ academyFIVE__ResizeSQLTextarea.user.js | 27 ++++++++++ 5 files changed, 209 insertions(+) create mode 100644 academyFIVE__AddSelectBox.user.js create mode 100644 academyFIVE__ChangeFont.user.js create mode 100644 academyFIVE__MoveNavbarIcons.user.js create mode 100644 academyFIVE__ResizeNavbar.user.js create mode 100644 academyFIVE__ResizeSQLTextarea.user.js diff --git a/academyFIVE__AddSelectBox.user.js b/academyFIVE__AddSelectBox.user.js new file mode 100644 index 0000000..67f6984 --- /dev/null +++ b/academyFIVE__AddSelectBox.user.js @@ -0,0 +1,47 @@ +// ==UserScript== +// @name academyFIVE::AddSelectBox +// @namespace dakp/academyfive +// @version 2025-11-24 +// @description Füge Selectbox für Kohorten hinzu +// @author Dims Akpan +// @match https://a5.fhdw-hannover.de/course/planning-group/list* +// @match https://a5.fhdw.de/course/planning-group/list* +// @match https://fhdw.academyfive-preview.net/course/planning-group/list* +// @match https://fhdw-hannover.academyfive-preview.net/course/planning-group/list* +// @grant none +// @icon https://www.academyfive.com/typo3conf/ext/sitepackage/Resources/Public/build/assets/images/favicon-academyfive.ico +// ==/UserScript== + +(function() { + 'use strict'; + + window.addEventListener('load', function() { + const cohortsDropdown = document.querySelector('select[name="cohort-ids[]"]'); + + if (!cohortsDropdown) { + console.log('Kohorten-Dropdown nicht gefunden'); + return; + } + + const dropdownContainer = cohortsDropdown.closest('.btn-group.bootstrap-select'); + const searchBox = dropdownContainer.querySelector('.bs-searchbox'); + + if (!searchBox) { + console.log('Searchbox nicht gefunden'); + return; + } + + const actionsBox = document.createElement('div'); + actionsBox.className = 'bs-actionsbox'; + actionsBox.innerHTML = ` +
+ + +
+ `; + + searchBox.insertAdjacentElement('afterend', actionsBox); + + console.log('Select/Deselect Buttons erfolgreich eingefügt'); + }); +})(); \ No newline at end of file diff --git a/academyFIVE__ChangeFont.user.js b/academyFIVE__ChangeFont.user.js new file mode 100644 index 0000000..6c05a0a --- /dev/null +++ b/academyFIVE__ChangeFont.user.js @@ -0,0 +1,69 @@ +// ==UserScript== +// @name academyFIVE::ChangeFont +// @namespace tvog/academyfive +// @version 2025-05-14 +// @description Ändert die Schriftart im Navigationsbaum zu Arial +// @author Dims Akpan +// @match https://a5.fhdw-hannover.de/nav.php4* +// @match https://a5.fhdw.de/nav.php4* +// @match https://fhdw.academyfive-preview.net/nav.php4* +// @match https://fhdw-hannover.academyfive-preview.net/nav.php4* +// @grant none +// @icon https://www.academyfive.com/typo3conf/ext/sitepackage/Resources/Public/build/assets/images/favicon-academyfive.ico +// ==/UserScript== + +(function() { + 'use strict'; + + // Füge einen eigenen CSS-Style mit höchster Priorität hinzu + function injectCustomFontStyle() { + const customStyle = document.createElement('style'); + // Mit höherer Spezifität und !important für maximale Durchsetzungskraft + customStyle.textContent = ` + /* Generelle Anwendung auf alle Links in der Navigation */ + html body a, + html body a:link, + html body a:visited, + html body a:active, + html body a:hover, + html body A:link, + html body A:hover { + font-family: Inter, Arial, "Open Sans", Verdana, sans-serif !important; + } + + /* Zusätzlich noch spezifische Elemente abdecken */ + html body .tree-node, + html body .tree-node *, + html body div.tree *, + html body #content a, + html body #content_scroll a { + font-family: Inter, Arial, "Open Sans", Verdana, sans-serif !important; + } + `; + + // Stelle sicher, dass unser Style als letztes eingefügt wird (höchste Priorität) + customStyle.setAttribute('id', 'academyfive-custom-font'); + + // Style einfügen + document.head.appendChild(customStyle); + console.log('Benutzerdefinierter Font-Style eingefügt'); + } + + // Beginne so früh wie möglich + if (document.head) { + injectCustomFontStyle(); + } else { + // Falls document.head noch nicht verfügbar ist + document.addEventListener('DOMContentLoaded', injectCustomFontStyle); + } + + // Zusätzliche Sicherheit: Reagiere auf zukünftige DOM-Änderungen + document.addEventListener('DOMContentLoaded', function() { + // Prüfe regelmäßig, ob unser Style noch vorhanden ist + setInterval(function() { + if (!document.getElementById('academyfive-custom-font')) { + injectCustomFontStyle(); + } + }, 2000); // Alle 2 Sekunden prüfen + }); +})(); \ No newline at end of file diff --git a/academyFIVE__MoveNavbarIcons.user.js b/academyFIVE__MoveNavbarIcons.user.js new file mode 100644 index 0000000..1f78c98 --- /dev/null +++ b/academyFIVE__MoveNavbarIcons.user.js @@ -0,0 +1,40 @@ +// ==UserScript== +// @name academyFIVE::MoveNavbarIcons +// @namespace tvog/academyfive +// @version 2024-05-13 +// @description Verschiebt die Icons zur Steuerung des Baummenüs auf die linke Seite. +// @author Tobias Vogler +// @match https://a5.fhdw-hannover.de/* +// @match https://a5.fhdw.de/* +// @grant none +// @icon https://www.academyfive.com/typo3conf/ext/sitepackage/Resources/Public/build/assets/images/favicon-academyfive.ico +// ==/UserScript== + +(function() { + 'use strict'; + + // neue position der buttons + const left = "330px"; + + var intv = setInterval(function() { + + var controlLayerElements = document.querySelectorAll('[id^="controlLayer"]'); + + if(controlLayerElements.length < 1){ + // kein element gefunden. weiterhin warten + return false; + } + + // element gefunden. setze intervall zurück und ändere die ausrichtung der Buttons + clearInterval(intv); + + for (var i = 0, len = controlLayerElements.length; i < len; i++){ + console.log('Moving menu controls to ' + left + '...'); + controlLayerElements[i].style.left = left; + } + + + }, 100); + + +})(); \ No newline at end of file diff --git a/academyFIVE__ResizeNavbar.user.js b/academyFIVE__ResizeNavbar.user.js new file mode 100644 index 0000000..579dc41 --- /dev/null +++ b/academyFIVE__ResizeNavbar.user.js @@ -0,0 +1,26 @@ +// ==UserScript== +// @name academyFIVE::ResizeNavbar +// @namespace tvog/academyfive +// @version 2024-05-13 +// @description Verbreitert das Baummenü auf der linken Seite +// @author Tobias Vogler +// @match https://a5.fhdw-hannover.de/* +// @match https://a5.fhdw.de/* +// @icon https://www.academyfive.com/typo3conf/ext/sitepackage/Resources/Public/build/assets/images/favicon-academyfive.ico +// @grant none +// ==/UserScript== + +(function() { + 'use strict'; + + // neue breite des menüs + const width = "400"; + + var navbar = document.getElementById("nav"); + + // wurde das element gefunden, ändere die breite + if(navbar) { + console.log("Changing navbar width to " + width + "px..."); + navbar.style.width = width + "px"; + } +})(); \ No newline at end of file diff --git a/academyFIVE__ResizeSQLTextarea.user.js b/academyFIVE__ResizeSQLTextarea.user.js new file mode 100644 index 0000000..8a2a03b --- /dev/null +++ b/academyFIVE__ResizeSQLTextarea.user.js @@ -0,0 +1,27 @@ +// ==UserScript== +// @name academyFIVE::ResizeSQLTextarea +// @namespace tvog/academyfive +// @version 2024-05-13 +// @description Vergrößert das Eingabefeld für SQL-Queries von gespeicherten Suchen +// @author Tobias Vogler +// @match https://a5.fhdw-hannover.de/* +// @match https://a5.fhdw.de/* +// @icon https://www.academyfive.com/typo3conf/ext/sitepackage/Resources/Public/build/assets/images/favicon-academyfive.ico +// @grant none +// ==/UserScript== + +(function() { + 'use strict'; + + const width = "1500"; + const height = "1000"; + + // finde eingabefeld mit der ID "sql" + var sqlTextarea = document.getElementById("sql"); + + // verändere das eingabefeld nur, wenn es auf der Seite "admin/profil_query_edit.php" vorkommt und vom typ textarea ist + if(sqlTextarea && sqlTextarea.type == "textarea" && sqlTextarea.baseURI.includes("admin/profil_query_edit.php")) { + console.log("Changing textarea dimensions to " + width + "x" + height + "px..."); + sqlTextarea.style = "width:" + width + "px;height:" + height + "px"; + } +})(); \ No newline at end of file