From 464c3ffe3009d966f8caa723821495df23f65829 Mon Sep 17 00:00:00 2001 From: Marcel Fries Date: Fri, 25 Jun 2021 08:13:59 +0200 Subject: [PATCH] Update esp-fixes.user.js --- esp-fixes.user.js | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/esp-fixes.user.js b/esp-fixes.user.js index e69de29..d7a7bc6 100644 --- a/esp-fixes.user.js +++ b/esp-fixes.user.js @@ -0,0 +1,43 @@ +// ==UserScript== +// @name ESP Fixes +// @namespace https://esp.eas-cpq.de/ +// @version 1.1 +// @description Collection of fixes for the EAS Service Portal +// @updateURL https://raw.githubusercontent.com/luxick/scripts/master/esp-fixes.user.js +// @downloadURL https://raw.githubusercontent.com/luxick/scripts/master/esp-fixes.user.js +// @author Marcel Fries +// @match https://esp.eas-cpq.de/* +// @grant GM_setValue +// @grant GM_getValue +// ==/UserScript== + +// Force popups into new tabs instead +function OnlyTabs(url, width, heigth) { + window.open(url, "_blank"); +} + +// Set title of the tab to number and description of the task +function fixTitle(){ + var header = document.getElementById("TaskLabelHeader"); + if (header){ + document.title = header.innerText + } +} + +// No more ViewState Errors. Horrible, Horrible Hack +function clearViewState(){ + document.getElementById("__EVENTVALIDATION").value = null; +} + +(function () { + 'use strict'; + + // Never open Popup windows + NewWindowWithoutControls = OnlyTabs + + //Improve the tab title display + fixTitle(); + + // Clear the ViewState every 500ms + setInterval(clearViewState,500); +}()); \ No newline at end of file