diff --git a/topdesk-highlight-summary.user.js b/topdesk-highlight-summary.user.js index 530e0e1..f522e2a 100644 --- a/topdesk-highlight-summary.user.js +++ b/topdesk-highlight-summary.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name TOPdesk - Highlight Summary // @namespace http://tampermonkey.net/ -// @version 1.4 -// @description Highlight the summary section in a box with rounded corners and white background +// @version 1.5 +// @description Highlight the summary section in a box with a slightly yellow-orange background // @author Magnus Børnes (magnborn@ntnu.no) // @match https://hjelp.ntnu.no/* // @icon https://www.google.com/s2/favicons?sz=64&domain=topdesk.com @@ -14,6 +14,24 @@ (function() { 'use strict'; + // Function to add custom styles + function addCustomStyles() { + const style = document.createElement('style'); + style.innerHTML = ` + .highlighted-summary { + background-color: #ffebcc; + padding: 12px; + margin: 0 0 0 24px; + max-width: 600px; + font-size: 13px; + } + .highlighted-summary p { + margin: 0px 0 0 0; + } + `; + document.head.appendChild(style); + } + // Function to highlight the summary function highlightSummary() { // Find the first div element with an ID ending in "_Y7" @@ -35,22 +53,31 @@ // Create a highlighted box with a heading const highlightedBox = ` -
${summaryText}.