Dateien nach "/" hochladen

This commit is contained in:
2025-11-25 09:58:36 +01:00
commit 79a347f84d
5 changed files with 209 additions and 0 deletions

View File

@@ -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 = `
<div class="btn-group btn-group-sm btn-block">
<button type="button" class="actions-btn bs-select-all btn btn-default">Alles auswählen</button>
<button type="button" class="actions-btn bs-deselect-all btn btn-default">Nichts auswählen</button>
</div>
`;
searchBox.insertAdjacentElement('afterend', actionsBox);
console.log('Select/Deselect Buttons erfolgreich eingefügt');
});
})();

View File

@@ -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
});
})();

View File

@@ -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);
})();

View File

@@ -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";
}
})();

View File

@@ -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";
}
})();