diff --git a/topdesk-highlight-summary.user.js b/topdesk-highlight-summary.user.js
index 611592c..e356516 100644
--- a/topdesk-highlight-summary.user.js
+++ b/topdesk-highlight-summary.user.js
@@ -1,7 +1,7 @@
// ==UserScript==
// @name TOPdesk - Highlight Summary
// @namespace http://tampermonkey.net/
-// @version 1.0
+// @version 1.1
// @description Highlight the summary section in a box with rounded corners and white background
// @author Magnus Børnes (magnborn@ntnu.no)
// @match https://hjelp.ntnu.no/*
@@ -26,15 +26,22 @@
// Match the summary text
const summaryMatch = html.match(/
Summary: (.*?)\.
/);
- if (summaryMatch) {
- // Extract the summary text
- const summaryText = summaryMatch[0];
+ if (summaryMatch && !div.querySelector('.highlighted-summary')) {
+ // Extract the summary text without "Summary: "
+ let summaryText = summaryMatch[1];
- // Create a highlighted box
- const highlightedBox = `
${summaryText}.
+