JSFiddle - React, Tailwind, and code Playground
by Glutamat
HTML
<h1>Open your chrome console and start typing</h1>
JavaScript
(function () {
console.warn("Before you type something in the console, make sure you don't need your clipboard data");
var _CommandLineAPI;
var _LastCommandAPI;
Object.defineProperty(console, "_commandLineAPI", {
configurable: false,
set: function (a) {
_LastCommandAPI = _CommandLineAPI;
_CommandLineAPI = a;
if (!_LastCommandAPI) {
console.log("You just started typing into the console")
console.log("Your clipboard will be filled with 'Some nonsense'");
console.log("If you enter an expression and type on, its last value will be logged to the console");
}
if ((_LastCommandAPI || {}).$_ != _CommandLineAPI.$_) {
console.log("The value of your last evaluated expression was \n", _CommandLineAPI.$_);
}
},
get: function () {
return _CommandLineAPI
}
})
setInterval(function () {
if (_CommandLineAPI) {
_CommandLineAPI.copy("Some nonsense...");
}
}, 100);
})();