Fast Linesplit (like fast split)

Put your cursor on top of on of the dots and press U

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Fast Linesplit (like fast split)
// @namespace    Put your cursor on top of on of the dots and press U
// @version      1.1
// @description  Put your cursor on top of on of the dots and press U
// @author       Net#1872
// @license      GPL-3.0-or-later
// @match        https://cellcraft.io/
// @match        https://agma.io/
// @grant        none
// ==/UserScript==

var split = "U"
window.addEventListener('keydown', keydown);
setTimeout(function() {
    split = split.charCodeAt(0)

}, 50)
function fsLine(){
    $("#canvas").trigger($.Event("keydown", { keyCode: 84}));
    $("#canvas").trigger($.Event("keyup", { keyCode: 84}));
}
function freezeKey() {
    $("#canvas").trigger($.Event("keydown", { keyCode: 70}));
    $("#canvas").trigger($.Event("keyup", { keyCode: 70}));
}

function keydown(event) {
    if(event.keyCode == split){
        fsLine()
        setTimeout(freezeKey, 115)
        setTimeout(freezeKey, 165)
    }
}



$("head").append(`<style>
.point {
  background-color:#333;
}

.point:hover {
  background-color: orange;
}
</style>`);

//Credit to wynell for the window.innerHeight and window.innerWidth

let [w, h] = [, window.innerHeight]
$('body').append(`
<div class="point" id="point-top" onclick="fsLine()" style="border: 2px solid white; border-radius: 100%; width: 15px; height: 15px; position: fixed; left: ${
  window.innerWidth / 2
}px; top: ${0}px; transform: translate(-50%, -50%);"></div>
<div class="point" id="point-right" onclick="fsLine()" style="border: 2px solid white; border-radius: 100%; width: 15px; height: 15px; position: fixed; left: ${
  window.innerWidth
}px; top: ${window.innerHeight / 2}px; transform: translate(-50%, -50%);"></div>
<div class="point" id="point-bottom" onclick="fsLine()" style="border: 2px solid white; border-radius: 100%; width: 15px; height: 15px; position: fixed; left: ${
  window.innerWidth / 2
}px; top: ${window.innerHeight}px; transform: translate(-50%, -50%);"></div>
<div class="point" id="point-left" onclick="fsLine()" style="border: 2px solid white; border-radius: 100%; width: 15px; height: 15px; position: fixed; left: ${0}px; top: ${
  window.innerHeight / 2
}px; transform: translate(-50%, -50%);"></div>
</div>`)
$('#settingTab3,.rab-radius').click(function (e) {
  $('#roleSettings').css('display', 'block')
  $('#cLinesplitOverlay')
    .removeAttr('disabled')
    .parent()
    .parent()
    .css('display', 'block')
})

$(window).resize(function (e) {
  let [w, h] = [window.innerWidth, window.innerHeight]
  $('#point-top')
    .css('left', `${window.innerWidth / 2}px`)
    .css('top', `${0}px`)
  $('#point-right')
    .css('left', `${window.innerWidth}px`)
    .css('top', `${window.innerHeight / 2}px`)
  $('#point-bottom')
    .css('left', `${window.innerWidth / 2}px`)
    .css('top', `${window.innerHeight}px`)
  $('#point-left')
    .css('left', `${0}px`)
    .css('top', `${window.innerHeight / 2}px`)
})