Update js/esp-fixes.user.js
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name ESP Fixes
|
// @name ESP Fixes
|
||||||
// @namespace https://esp.eas-cpq.de/
|
// @namespace https://esp.eas-cpq.de/
|
||||||
// @version 1.11
|
// @version 2026-01-21.01
|
||||||
// @description Collection of fixes for the EAS Service Portal
|
// @description Collection of fixes for the EAS Service Portal
|
||||||
// @updateURL https://raw.githubusercontent.com/luxick/scripts/master/esp-fixes.user.js
|
// @updateURL https://raw.githubusercontent.com/luxick/scripts/master/esp-fixes.user.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/luxick/scripts/master/esp-fixes.user.js
|
// @downloadURL https://raw.githubusercontent.com/luxick/scripts/master/esp-fixes.user.js
|
||||||
@@ -52,6 +52,14 @@ String.prototype.replaces = function(str, replace) {
|
|||||||
|
|
||||||
// Set title of the tab to number and description of the task
|
// Set title of the tab to number and description of the task
|
||||||
function updateTitle(){
|
function updateTitle(){
|
||||||
|
// Check for tabtitle URL parameter first
|
||||||
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
|
const customTitle = urlParams.get('tabtitle');
|
||||||
|
if (customTitle) {
|
||||||
|
document.title = customTitle;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let header = document.getElementById("TaskLabelHeader");
|
let header = document.getElementById("TaskLabelHeader");
|
||||||
|
|
||||||
headerReplacements.forEach(function(value,key) {header.innerText = header.innerText.replaces(key, value); })
|
headerReplacements.forEach(function(value,key) {header.innerText = header.innerText.replaces(key, value); })
|
||||||
@@ -68,9 +76,11 @@ function updateTitle(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
let errorSubHeader = document.getElementById("SubHeaderLabel");
|
let errorSubHeader = document.getElementById("SubHeaderLabel");
|
||||||
let numberText = errorSubHeader.textContent.substring(27);
|
if (errorSubHeader) {
|
||||||
if (numberText.startswith('E')) {
|
let numberText = errorSubHeader.textContent.substring(27);
|
||||||
document.title = numberText;
|
if (numberText.startsWith('E')) {
|
||||||
|
document.title = numberText;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.title = document.title.replace("Word Editor - TaskDescription - ", "Text ")
|
document.title = document.title.replace("Word Editor - TaskDescription - ", "Text ")
|
||||||
Reference in New Issue
Block a user