forked from beba/foerderbarometer
26 lines
814 B
JavaScript
26 lines
814 B
JavaScript
window.addEventListener("load", function() {
|
|
(function($) {
|
|
$(function() {
|
|
|
|
// let linkElement = document.querySelector(".field-otrs > div > p.url > a");
|
|
let linkElement = document.querySelector(".field-otrs p.url a");
|
|
if (!linkElement) {
|
|
console.error("OTRS-Link not found!");
|
|
return;
|
|
}
|
|
|
|
let otrs_link = linkElement.href;
|
|
//console.log("Original link:", otrs_link);
|
|
//alert("Original link: " + otrs_link);
|
|
|
|
// Ersetze %3B mit ; und %3D mit =
|
|
let otrs_link_pretty = otrs_link.replace(/%3B/g, ";").replace(/%3D/g, "=");
|
|
|
|
//console.log("Modified link:", otrs_link_pretty);
|
|
linkElement.href = otrs_link_pretty;
|
|
|
|
});
|
|
})(django.jQuery);
|
|
});
|
|
|