Skip to content

Commit

Permalink
cleaned up root dir
Browse files Browse the repository at this point in the history
  • Loading branch information
on committed Oct 3, 2025
1 parent 7f74f9a commit 8cb67da
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 41 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ TamperMonkey scripts to improve sites (Fuglane, Innsida etc.)

### BAS - Modern Style Toggle

- **Install:** [![](https://img.shields.io/badge/modern--bas.user.js-1.0.13-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/modern-bas.user.js)
- **Install:** [![](https://img.shields.io/badge/modern--bas.user.js-1.0.13-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/modern-bas/modern-bas.user.js)
- **Author:** Øyvind Nilsen (on@ntnu.no)
- **Match:** `https://bas.ntnu.no/*`
- **Exclude:**
Expand All @@ -41,7 +41,7 @@ TamperMonkey scripts to improve sites (Fuglane, Innsida etc.)
- **Description:** Apply modern styling to BAS/Cereweb with toggle between modern and classic
### BAS - Quick Search

- **Install:** [![](https://img.shields.io/badge/bas--search.user.js-1.8.5-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/bas-search.user.js)
- **Install:** [![](https://img.shields.io/badge/bas--search.user.js-1.8.5-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/bas-search/bas-search.user.js)
- **Author:** Øyvind Nilsen (on@ntnu.no)
- **Match:** `https://bas.ntnu.no/*`
- **Description:** Quick search using `Ctrl` + `Shift` + `F` hotkey, group search with "g:" and person search with "p:" prefix. Navigate tabs with Ctrl + Left/Right keys. Navigate search results with up and down keys.
Expand All @@ -60,19 +60,19 @@ TamperMonkey scripts to improve sites (Fuglane, Innsida etc.)
![Search GIF](doc/bas-search-lowres.gif)
### Diri.ai - Remove blur

- **Install:** [![](https://img.shields.io/badge/diri.user.js-0.1.1-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/diri.user.js)
- **Install:** [![](https://img.shields.io/badge/diri.user.js-0.1.1-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/diri/diri.user.js)
- **Author:** Øyvind Nilsen (on@ntnu.no)
- **Match:** `https://diri.ai/*`
- **Description:** Sets --blur-xs to 0px instead of 4px for diri.ai
### Feide - Auto-Press Microsoft Sign-In.

- **Install:** [![](https://img.shields.io/badge/feide--microsoft.user.js-1.1.3-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/feide-microsoft.user.js)
- **Install:** [![](https://img.shields.io/badge/feide--microsoft.user.js-1.1.3-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/feide-microsoft/feide-microsoft.user.js)
- **Author:** Øyvind Nilsen (on@ntnu.no)
- **Match:** `https://idp.feide.no/simplesaml/module.php/*`
- **Description:** Automatically press the Microsoft sign-in button.
### Fuglane - Issue links

- **Install:** [![](https://img.shields.io/badge/fuglane.user.js-1.3.6-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/fuglane.user.js)
- **Install:** [![](https://img.shields.io/badge/fuglane.user.js-1.3.6-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/fuglane/fuglane.user.js)
- **Author:** Øyvind Nilsen (on@ntnu.no)
- **Match:**
- `https://fuglane.it.ntnu.no/display/*`
Expand All @@ -82,25 +82,25 @@ TamperMonkey scripts to improve sites (Fuglane, Innsida etc.)
- **Description:** Replace NTNU issue numbers, change numbers and upn's with clickable links to TopDesk
### Innsida - Custom CSS

- **Install:** [![](https://img.shields.io/badge/innsida--custom--css.user.js-1.2-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/innsida-custom-css.user.js)
- **Install:** [![](https://img.shields.io/badge/innsida--custom--css.user.js-1.2-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/innsida-custom-css/innsida-custom-css.user.js)
- **Author:** Magnus Børnes (magnborn@ntnu.no)
- **Match:** `https://innsida.ntnu.no/*`
- **Description:** Custom CSS and Text Removal for innsida.ntnu.no
### Innsida - Quick Search

- **Install:** [![](https://img.shields.io/badge/innsida--search.user.js-1.2.0-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/innsida-search.user.js)
- **Install:** [![](https://img.shields.io/badge/innsida--search.user.js-1.2.0-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/innsida-search/innsida-search.user.js)
- **Author:** Øyvind Nilsen (on@ntnu.no)
- **Match:** `https://innsida.ntnu.no/*`
- **Description:** `Ctrl` + `Shift` + `F` to search on Innsida
### M365 Admin - PIM Activate Hotkey

- **Install:** [![](https://img.shields.io/badge/m365--admin.user.js-1.0.0-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/m365-admin.user.js)
- **Install:** [![](https://img.shields.io/badge/m365--admin.user.js-1.0.0-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/m365-admin/m365-admin.user.js)
- **Author:** Øyvind Nilsen (on@ntnu.no)
- **Match:** `https://portal.azure.com/*`
- **Description:** `Ctrl` + `Enter` to Activate PIM role instead of having to manually click the `Activate` button.
### TopDesk - Copy Issuenumber

- **Install:** [![](https://img.shields.io/badge/topdesk.user.js-1.2.3-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/topdesk.user.js)
- **Install:** [![](https://img.shields.io/badge/topdesk.user.js-1.2.3-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/topdesk/topdesk.user.js)
- **Author:** Øyvind Nilsen (on@ntnu.no)
- **Match:** `https://hjelp.ntnu.no/tas/secure/mango/window/*`
- **Description:** Copies the issue number if you click it in TopDesk or with the hotkey `ctrl` + `alt` + `c`. It copies plain text and a clickable HTML version. So if the place you paste supports HTML, you can paste a clickable link to the issue.
Expand All @@ -109,7 +109,7 @@ TamperMonkey scripts to improve sites (Fuglane, Innsida etc.)
![Demo GIF](doc/topdesk.gif)
### TOPdesk - Highlight Summary

- **Install:** [![](https://img.shields.io/badge/topdesk--highlight--summary.user.js-1.6-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/topdesk-highlight-summary.user.js)
- **Install:** [![](https://img.shields.io/badge/topdesk--highlight--summary.user.js-1.6-green.svg)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/topdesk-highlight-summary/topdesk-highlight-summary.user.js)
- **Author:** Magnus Børnes (magnborn@ntnu.no)
- **Match:** `https://hjelp.ntnu.no/tas/secure/mango/window/*`
- **Description:** Highlight the summary section in a box with a slightly yellow-orange background
Expand Down
8 changes: 4 additions & 4 deletions ReadmeTemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ TamperMonkey scripts to improve sites (Fuglane, Innsida etc.)
git clone git@git.ntnu.no:M365-Drift/MonkeyMagic.git
cd MonkeyMagic
```
2. Pull the latest changes. (Important since the README.md is generated)
2. If there have been made changes in the repository after you cloned it you should pull the latest changes. (Important since the README.md is auto generated)
```bash
git pull
```
Expand All @@ -42,8 +42,8 @@ git pull
## Advanced Contribution

### Auto Update
To enable auto update of your UserScript, you need to add the following lines (change the filename to your filename) to the top of your script. This will make TamperMonkey check for updates every 24 hours.
To enable auto update of your UserScript, you need to add the following lines to the top of your script. Replace `script-folder` and `script-name.user.js` with your actual script folder and filename. This will make TamperMonkey check for updates every 24 hours.
```javascript
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/bas-search.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/bas-search.user.js
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/script-folder/script-name.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/script-folder/script-name.user.js
```
11 changes: 6 additions & 5 deletions generate-readme.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Define the directory containing the user scripts
$UserScripts = "."
$UserScripts = "scripts"

# Get all .user.js files in the specified directory
#$userJsFiles = Get-ChildItem -Path $UserScripts -Filter "*.user.js" | Sort-Object Name
$userJsFiles = Get-ChildItem -Path $UserScripts -Filter "*.user.js" | Select-Object fullname, name, @{ Name = 'NameTag'; Expression = { $name_tag = ([regex]"@name\s+(.+)").Match((Get-Content $_.fullname -Raw)).Groups[1].value; if ($name_tag -eq "") { $_.name} else { $name_tag } }} | sort NameTag
# Get all .user.js files in the scripts subdirectories
$userJsFiles = Get-ChildItem -Path $UserScripts -Filter "*.user.js" -Recurse | Select-Object fullname, name, @{ Name = 'NameTag'; Expression = { $name_tag = ([regex]"@name\s+(.+)").Match((Get-Content $_.fullname -Raw)).Groups[1].value; if ($name_tag -eq "") { $_.name} else { $name_tag } }} | sort NameTag

$regEx = [regex]'\/\/\s+@(\w+)\s+(.+)'

Expand Down Expand Up @@ -103,7 +102,9 @@ foreach ($file in $userJsFiles) {
$scriptList += "$script_heading`n`n"
$scriptList += " - **Install:** "
if ($autoUpdate) { $color = "green" } else { $color = "blue" }
$scriptList += New-MDImage -Subject "$($file.Name)" -Status "$version" -Color $color -Link "https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/$($file.Name)"
# Get the relative path from the root, replacing backslashes with forward slashes for URLs
$relativePath = $file.FullName.Replace((Get-Location).Path + "\", "").Replace("\", "/")
$scriptList += New-MDImage -Subject "$($file.Name)" -Status "$version" -Color $color -Link "https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/$relativePath"
if ($author) {
$scriptList += "`n - **Author:** $author`n"
}
Expand Down
4 changes: 2 additions & 2 deletions bas-search.user.js → scripts/bas-search/bas-search.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// @grant none
// @run-at document-end
// @icon https://www.google.com/s2/favicons?sz=64&domain=ntnu.no
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/bas-search.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/bas-search.user.js
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/bas-search/bas-search.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/bas-search/bas-search.user.js
// ==/UserScript==

(function() {
Expand Down
4 changes: 2 additions & 2 deletions diri.user.js → scripts/diri/diri.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// @icon https://www.google.com/s2/favicons?sz=64&domain=diri.ai
// @grant none
// @run-at document-start
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/diri.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/diri.user.js
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/diri/diri.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/diri/diri.user.js
// ==/UserScript==

(function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// @icon https://www.google.com/s2/favicons?sz=64&domain=feide.no
// @grant none
// @run-at document-end
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/feide-microsoft.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/feide-microsoft.user.js
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/feide-microsoft/feide-microsoft.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/feide-microsoft/feide-microsoft.user.js
// ==/UserScript==

(function() {
Expand Down
4 changes: 2 additions & 2 deletions fuglane.user.js → scripts/fuglane/fuglane.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
// @grant none
// @run-at document-end
// @icon https://www.google.com/s2/favicons?sz=64&domain=ntnu.no
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/fuglane.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/fuglane.user.js
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/fuglane/fuglane.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/fuglane/fuglane.user.js
// ==/UserScript==

(function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// @match https://innsida.ntnu.no/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=ntnu.no
// @grant none
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/innsida-custom-css.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/innsida-custom-css.user.js
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/innsida-custom-css/innsida-custom-css.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/innsida-custom-css/innsida-custom-css.user.js
// ==/UserScript==

(function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// @grant none
// @run-at document-end
// @icon https://www.google.com/s2/favicons?sz=64&domain=ntnu.no
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/innsida-search.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/innsida-search.user.js
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/innsida-search/innsida-search.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/innsida-search/innsida-search.user.js
// ==/UserScript==

(function() {
Expand Down
4 changes: 2 additions & 2 deletions m365-admin.user.js → scripts/m365-admin/m365-admin.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// @match https://portal.azure.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=microsoft.com
// @grant none
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/m365-admin.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/m365-admin.user.js
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/m365-admin/m365-admin.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/m365-admin/m365-admin.user.js
// ==/UserScript==

(function() {
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions modern-bas.user.js → scripts/modern-bas/modern-bas.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
// @match https://bas.ntnu.no/*
// @exclude https://bas.ntnu.no/groupadmin/*
// @exclude https://bas.ntnu.no/userclient/*
// @resource modernCSS https://raw.git.ntnu.no/M365-Drift/MonkeyMagic/main/modern-bas.css
// @resource modernLoginCSS https://raw.git.ntnu.no/M365-Drift/MonkeyMagic/main/modern-bas-login.css
// @resource modernCSS https://raw.git.ntnu.no/M365-Drift/MonkeyMagic/main/scripts/modern-bas/modern-bas.css
// @resource modernLoginCSS https://raw.git.ntnu.no/M365-Drift/MonkeyMagic/main/scripts/modern-bas/modern-bas-login.css
// @grant GM_addStyle
// @grant GM_getResourceText
// @grant GM_setValue
// @grant GM_getValue
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/modern-bas.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/modern-bas.user.js
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/modern-bas/modern-bas.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/modern-bas/modern-bas.user.js
// ==/UserScript==

(function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// @match https://hjelp.ntnu.no/tas/secure/mango/window/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=topdesk.com
// @grant none
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/topdesk-highlight-summary.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/topdesk-highlight-summary.user.js
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/topdesk-highlight-summary/topdesk-highlight-summary.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/topdesk-highlight-summary/topdesk-highlight-summary.user.js
// ==/UserScript==

(function() {
Expand Down
4 changes: 2 additions & 2 deletions topdesk.user.js → scripts/topdesk/topdesk.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// @grant none
// @run-at document-end
// @icon https://www.google.com/s2/favicons?sz=64&domain=topdesk.com
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/topdesk.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/topdesk.user.js
// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/topdesk/topdesk.user.js
// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/topdesk/topdesk.user.js
// ==/UserScript==

(function() {
Expand Down

0 comments on commit 8cb67da

Please sign in to comment.