Code Executer

Execute code on any websites!

2023-10-28 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Code Executer
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Execute code on any websites!
// @author       cool
// @match        *://*/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @license      MIT
// ==/UserScript==

(function(w) {
    'use strict';
    var _codeExecuteio = false;
    var _codeExecutec = document.createElement("button");
    _codeExecutec.setAttribute("style", "width: 80px !important; height: 40px !important; padding: 0px !important; margin: 0px !important; text-size: 14px !important; background-color: dodgerblue !important; color: white !important; border: none !important; border-radius: 5px 0px 5px 0px !important; position: fixed !important; right: 0px !important; bottom: 0px !important; z-index: 99999999 !important; cursor: pointer !important;");
    _codeExecutec.innerHTML = "Code Execute";
    document.body.appendChild(_codeExecutec);
    var _codeExecutei = document.createElement("input");
    _codeExecutei.setAttribute("style", "width: calc(100% - 90px) !important; padding: 0px 5px !important; margin: 0px !important; height: 40px !important; text-size: 14px !important; background-color: white !important; color: black !important; outline: none !important; border: 1px solid gray !important; border-radius: 0px !important; position: fixed !important; left: 0px !important; bottom: 0px !important; z-index: 99999999 !important; cursor: text !important;");
    _codeExecutei.placeholder = "Press enter to execute";
    _codeExecutei.hidden = true;
    document.body.appendChild(_codeExecutei);
    _codeExecutec.addEventListener("click", function() {
        if (_codeExecuteio) {
            _codeExecuteio = false;
            _codeExecutei.hidden = true;
            _codeExecutec.innerHTML = "Code Execute";
        } else {
            _codeExecuteio = true;
            _codeExecutei.hidden = false;
            _codeExecutec.innerHTML = "Close";
            _codeExecutei.focus();
        }
    });
    _codeExecutei.addEventListener("keydown", function(e) {
        if (e.key == "Enter") {
            (function(window, _codeExecuteCode) {
                eval(_codeExecuteCode);
            })(w, _codeExecutei.value);
            _codeExecutei.value = "";
        }
    });
})(window);