Skip to content

Commit

Permalink
fuglane - now only searches in the main-content div (was body before)…
Browse files Browse the repository at this point in the history
…. Fore efficient
  • Loading branch information
Turbosnute committed Aug 22, 2024
1 parent 8ddc891 commit 994da46
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions fuglane.user.js
Original file line number Diff line number Diff line change
@@ -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/*
Expand Down Expand Up @@ -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);
}

})();

0 comments on commit 994da46

Please sign in to comment.