From 994da46ed765617ad08928c01fdc3ad01921f63a Mon Sep 17 00:00:00 2001 From: Turbosnute Date: Thu, 22 Aug 2024 12:45:31 +0200 Subject: [PATCH] fuglane - now only searches in the main-content div (was body before). Fore efficient --- fuglane.user.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fuglane.user.js b/fuglane.user.js index a5428ef..f03012e 100644 --- a/fuglane.user.js +++ b/fuglane.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Fuglane - Issue links // @namespace http://tampermonkey.net/ -// @version 1.3 +// @version 1.3.1 // @description Replace NTNU issue numbers, change numbers and upn's with clickable links to TopDesk // @author on@ntnu.no // @match https://fuglane.it.ntnu.no/* @@ -49,6 +49,10 @@ } } - // Run the function on the entire document body - replaceTextWithLinks(document.body); + // Run the function on the 'main-content' div. + const mainContent = document.getElementById('main-content'); + if (mainContent) { + replaceTextWithLinks(mainContent); + } + })(); \ No newline at end of file