Browser Game Engine Detector (+ Version)

Detects current game engine

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

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

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!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

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

// ==UserScript==
// @name         Browser Game Engine Detector (+ Version)
// @description Detects current game engine
// @match        *://*/*
// @grant        none
// @license MIT
// @version 0.0.1.20260321154450
// @namespace https://greasyfork.org/users/1492052
// ==/UserScript==

(function() {

    function detectEngine() {
        let engine = "Unknown";
        let version = "Unknown";

        // Phaser
        if (window.Phaser) {
            engine = "Phaser";
            version = window.Phaser.VERSION || version;
        }

        else if (window.cc) {
            engine = "Cocos Creator";
            version = window.cc.ENGINE_VERSION || version;
        }

        else if (window.createUnityInstance) {
            engine = "Unity WebGL";
            if (window.Module && window.Module.unityVersion) {
                version = window.Module.unityVersion;
            } else {
                version = "Check UnityLoader.js filename";
            }
        }

        else if (window.THREE) {
            engine = "Three.js";
            version = window.THREE.REVISION || version;
        }

        else if (window.ex) {
            engine = "Excaliber.js";
            version = "Unknown";
        }

        else if (window.pc) {
            engine = "PlayCanvas";
            version = window.pc.version || version;
        }

        else if (window.BABYLON) {
            engine = "Babylon.js";
            version = window.BABYLON.Engine ? window.BABYLON.Engine.Version : version;
        }

        else if (window.Engine) {
            engine = "Godot Web";
            version = window.Engine.VERSION || version;
        }

        else if (window.gdjs) {
            engine = "GDevelop";
            version = window.gdjs.VERSION || version;
        }

        else if (window.C3 || window.runtime) {
            engine = "Construct 3";
            if (window.C3 && window.C3.version) version = window.C3.version;
        }
        else {
            const scripts = Array.from(document.scripts).map(s => s.src);
            for (let src of scripts) {
                if (/c3runtime.*\.js/i.test(src)) {
                    engine = "Construct 3";
                    const match = src.match(/c3runtime[-.]([0-9]+)\.js/i);
                    if (match) version = match[1];
                    break;
                }
                if (/c2runtime.*\.js/i.test(src)) {
                    engine = "Construct 2";
                    const match = src.match(/c2runtime[-.]([0-9]+)\.js/i);
                    if (match) version = match[1];
                    break;
                }
                if (/UnityLoader.*\.js/i.test(src)) {
                    engine = "Unity WebGL";
                    const match = src.match(/UnityLoader[-.]([0-9.]+)\.js/i);
                    if (match) version = match[1];
                    break;
                }
            }
        }

        return { engine, version };
    }

    setTimeout(() => {
        const detected = detectEngine();

        if (detected.engine !== "Unknown") {
            const badge = document.createElement("div");
            badge.innerText = `Engine: ${detected.engine} | Version: ${detected.version}`;
            badge.style.position = "fixed";
            badge.style.bottom = "10px";
            badge.style.right = "10px";
            badge.style.background = "black";
            badge.style.color = "white";
            badge.style.padding = "6px 10px";
            badge.style.fontSize = "12px";
            badge.style.zIndex = 999999;
            badge.style.borderRadius = "5px";
            badge.style.fontFamily = "monospace";
            document.body.appendChild(badge);
        }
    }, 2000);

})();