Linesplit

Linesplit Mod for Abs0rb.me

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Linesplit
// @namespace    http://tampermonkey.net/
// @version      2.2
// @description  Linesplit Mod for Abs0rb.me
// @author       nyone
// @match        http://abs0rb.me/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

window.addEventListener('keydown', keydown);

const Speed = 25;

function split() {
    $("body").trigger($.Event("keydown", {
        keyCode: 32
    }));
    $("body").trigger($.Event("keyup", {
        keyCode: 32
    }));
}

function keydown(event) {
    if (event.key == "f") {
        split();
        setTimeout(split, Speed);
        setTimeout(split, Speed * 2);
    }
    if (event.key == "ArrowRight") {
        let X = window.innerWidth / 0.5;
        let Y = window.innerHeight / 2;
        $("canvas").trigger($.Event("mousemove", {
            clientX: X,
            clientY: Y
        }));
    }
    if (event.key == "ArrowLeft") {
        let X2 = window.innerWidth / 3.5;
        let Y2 = window.innerHeight / 2;
        $("canvas").trigger($.Event("mousemove", {
            clientX: X2,
            clientY: Y2
        }));
    }
    if (event.key == "ArrowUp") {
        let X3 = window.innerWidth / 2;
        let Y3 = window.innerHeight / 3.5;
        $("canvas").trigger($.Event("mousemove", {
            clientX: X3,
            clientY: Y3
        }));
    }
    if (event.key == "ArrowDown") {
        let X4 = window.innerWidth / 2;
        let Y4 = window.innerHeight / 0.5;
        $("canvas").trigger($.Event("mousemove", {
            clientX: X4,
            clientY: Y4
        }));
    }
    if (event.key == "z") {
        let X5 = window.innerWidth / 2;
        let Y5 = window.innerHeight / 2;
        $("canvas").trigger($.Event("mousemove", {
            clientX: X5,
            clientY: Y5
        }));
    }
}