Skip to content

Commit

Permalink
Merge pull request #6 from M365-Drift/fuglane-efficient
Browse files Browse the repository at this point in the history
fuglane - now only searches in the main-content div (was body before)…
  • Loading branch information
on authored and GitHub Enterprise committed Aug 22, 2024
2 parents 8ddc891 + 994da46 commit ca3e90c
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 ca3e90c

Please sign in to comment.