Infinite Craft - Double click to Duplicate - Deprecated

Deprecated - Neal added this feature natively better lol

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.

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

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         Infinite Craft - Double click to Duplicate - Deprecated
// @namespace    http://ow0.me/infinite
// @version      2048
// @description  Deprecated - Neal added this feature natively better lol
// @author       Ina'
// @match        https://neal.fun/*
// @icon         https://ow0.me/infinite/icon48.png
// @icon64       https://ow0.me/infinite/icon64.png
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        unsafeWindow
// @require      https://neal.fun/_nuxt/992eef7.js
// @require      https://neal.fun/_nuxt/dcc1889.js
// @run-at       document-idle
// @license      GPLv3
// ==/UserScript==

var yuri = () => {
    'use strict';

    var that = unsafeWindow.$nuxt.$children[2].$children[0].$children[0];
    that.calcInstanceSize = function (e) {
        var element = document.getElementById('instance-' + e.id);
        if (element) {
            element.addEventListener("dblclick", (ev) => {
                var t = ev.target;
                var xi = that.instances.findIndex(function (e) {
                    return (('instance-' + e.id) === t.id);
                });
                var x = that.instances[xi];
                console.log(x);
                var d = that.instanceId++;
                var ct = {
                    id: d,
                    text: x.text,
                    emoji: x.emoji,
                    disabled: !1,
                    zIndex: d,
                    discovered: false,
                    isNew: false
                };
                that.instances.push(ct)

                that.$nextTick ( () => {
                    that.setInstancePosition(ct, x.left, x.top - x.height * 1.5);
                } );

            });
            (e.width = element.offsetWidth, e.height = element.offsetHeight);
        }
    };
};
window.addEventListener("load", yuri);