Commit 35f60e06 authored by Tobias Zeumer's avatar Tobias Zeumer
Browse files

Add case frontpage to TUB-Tore_-_Authority-Links.user.js

parent 8ec95310
// ==UserScript==
// @name TUB TORE: Autoren-Authority anpassen
// @namespace https://collaborating.tuhh.de/tobias.zeumer/Tampermonkey/
// @version 1.0.3
// @version 1.0.4
// @updateURL https://collaborating.tuhh.de/tobias.zeumer/Tampermonkey/raw/master/TUB-Tore_-_Authority-Links.user.js
// @description Icons für Autoren, die sich selbst in der Personensuche ausgeblendete haben und Anpassung der Farben.
// @author Tobias Zeumer
......@@ -19,6 +19,7 @@
(function() {
'use strict';
/* VARIANTE A https://tore.tuhh.de/handle/... */
// Alle Links mit class 'authority' finden
var lstAuthority = document.querySelectorAll('a.authority');
......@@ -55,6 +56,14 @@
}
/* VARIANTE B Startseite https://tore.tuhh.de/ */
document.querySelectorAll('.text-muted em').forEach(function(element) {
if (element.innerHTML.match(/ ;/gi)) {
element.innerHTML = element.innerHTML.replace(/&nbsp;;/gi, '<a href="#" class="authority"> <span data-toggle="tooltip" data-placement="top" title="TUHH MitarbeiterIn (ungelistet)" class="fa fa-user staff-unlisted"></span></a> ;');
}
})
// Eigenes Style-Element
var style = document.createElement('style');
style.type = 'text/css';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment