modler

Oneclick-like installer for Beat Saber mods from github.

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        modler 
// @namespace   https://github.com/StormPacer/Modler
// @include     https://github.com/*/*
// @version     0.1
// @author      StormPacer
// @license     MIT
// @description Oneclick-like installer for Beat Saber mods from github.
// ==/UserScript==

(function () {
    "use strict";

    const list = document.getElementsByClassName("file-navigation mb-3 d-flex flex-items-start");

    const element = document.createElement("button");
    element.classList.add("btn");
    const txt = document.createTextNode("🛠 Install mod");

    const urlParts = window.location.href.split("/");

    element.onclick = () => {
        window.location.replace(`modler://https://api.github.com/repos/${urlParts[3]}/${urlParts[4]}/releases/latest`);
    };

    element.appendChild(txt);

    list.item(0).appendChild(element);
})();