-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from M365-Drift/crazycleanup
Crazycleanup
- Loading branch information
Showing
21 changed files
with
180 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| <div align="center"> | ||
| <img src="doc/mm_logo.png" alt="MonkeyMagic Logo" /> | ||
| </div> | ||
|
|
||
| # Monkey Magic 🐒🪄 | ||
|
|
||
| TamperMonkey scripts to improve sites (Fuglane, Innsida etc.) | ||
|
|
||
| # How to use | ||
| 1. Install the TamperMonkey extension for your browser | ||
| 2. Enable permission to use User Scripts. | ||
| - Open extension settings by right-clicking the Tampermonkey icon (1) and selecting **"Manage Extension"** (2). | ||
|  | ||
| - Locate and enable the **"Allow User Scripts"** toggle. | ||
|  | ||
| 3. Click on the  for the script you want to install (in the list below) | ||
| 4. TamperMonkey should open and ask you to install the script | ||
|
|
||
| # Scripts | ||
| {content_list} | ||
| {scriptlist} | ||
|
|
||
| # Contribute | ||
|
|
||
| ## Getting Started | ||
| 1. Clone the repository | ||
| ```bash | ||
| git clone git@git.ntnu.no:M365-Drift/MonkeyMagic.git | ||
| cd MonkeyMagic | ||
| ``` | ||
| 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 | ||
| ``` | ||
|
|
||
| ## Creating Your UserScript | ||
|
|
||
| ### Hello World Example | ||
| Here's a simple hello world UserScript to get you started: | ||
|
|
||
| ```javascript | ||
| // ==UserScript== | ||
| // @name Hello World Example | ||
| // @namespace https://git.ntnu.no/M365-Drift/MonkeyMagic/ | ||
| // @version 1.0.0 | ||
| // @description A simple hello world example | ||
| // @author Your Name (your.email@ntnu.no) | ||
| // @match https://example.com/* | ||
| // @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/hello-world/hello-world.user.js | ||
| // @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/scripts/hello-world/hello-world.user.js | ||
| // @grant none | ||
| // ==/UserScript== | ||
|
|
||
| (function() { | ||
| 'use strict'; | ||
| console.log('Hello World from MonkeyMagic!'); | ||
| alert('Hello World!'); | ||
| })(); | ||
| ``` | ||
|
|
||
| ### Important Guidelines | ||
| - **Namespace**: Always use `https://git.ntnu.no/M365-Drift/MonkeyMagic/` as your namespace | ||
| - **Folder Structure**: Create a subfolder under `scripts/` for your script (e.g., `scripts/hello-world/`) | ||
| - **Auto Update**: Include `@updateURL` and `@downloadURL` pointing to your script's location in the repository. This enables automatic updates every 24 hours in TamperMonkey. | ||
|
|
||
| ### Adding Your Script | ||
| 1. Create a new folder under `scripts/` with your script name | ||
| 2. Place your `.user.js` file in that folder | ||
| 3. Add any documentation or media files to the same folder | ||
| 4. Commit and push your changes: | ||
| ```bash | ||
| git add scripts/your-script-name/ | ||
| git commit -m "Added your-script-name userscript" | ||
| git push | ||
| ``` | ||
| 5. A GitHub Action will automatically update the README.md file with your script information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.