Skip to content

Instantly share code, notes, and snippets.

@schoettl
Last active July 4, 2022 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schoettl/c7afdceb315fc9821dbe680c834908e4 to your computer and use it in GitHub Desktop.
Save schoettl/c7afdceb315fc9821dbe680c834908e4 to your computer and use it in GitHub Desktop.
Customize Xentral Auftrag
// ==UserScript==
// @name Xentral Auftrag
// @namespace https://intensovet.de
// @version 0.1
// @description Add link to open Werkstattauftrag
// @author Jakob Schöttl
// @match https://*.xentral.biz/*?module=auftrag&action=edit&*
// @icon https://www.google.com/s2/favicons?domain=xentral.biz
// @grant none
// ==/UserScript==
(function() {
'use strict';
const urlParams = new URLSearchParams(window.location.search);
const id = encodeURIComponent(urlParams.get('id'));
$('input[name=speichern]').parent()
.append('<a class="button" href="http://j.intensovet.de/dateien/" target="_blank">Dateien anzeigen</a>')
.append('<a class="button" href="http://j.intensovet.de/cgi-bin/auftrag.cgi?' + id + '" target="_blank">Werkstattauftrag öffnen</a>');
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment