Instantly share code, notes, and snippets.

@UDXS /ujsc.js
Last active Dec 8, 2017

Embed
What would you like to do?
Small JavaScript console with prompt
cL = "";
cC = 0;
console.log = (x)=>{
cL += " '"+x+"'\n";
}
console.error = (x)=>{
cL += " '"+x+"'\n";
}
while(true){
if(cC<=5){
cC=0;
cC="";
}
var com = prompt("UDXS JS Prompt:\n\n"+cL,"");
cC++;
if(com === null){break;}
cL+="> "+com+"\n";
try {
var res = eval(com);
}
catch(err) {
res = "ERROR: "+err;
}
cL+=" "+res+"\n";
}
javascript:cL="";cC=0;console.log=function(a){cL+=" '"+a+"'\n"};for(console.error=function(a){cL+=" '"+a+"'\n"};;){5>=cC&&(cC=0,cC="");var b=prompt("UDXS JS Prompt:\n\n"+cL,"");cC++;if(null===b)break;cL+="> "+b+"\n";try{var c=eval(b)}catch(a){c="ERROR: "+a}cL+=" "+c+"\n"};
cL="";cC=0;console.log=function(a){cL+=" '"+a+"'\n"};for(console.error=function(a){cL+=" '"+a+"'\n"};;){5>=cC&&(cC=0,cC="");var b=prompt("UDXS JS Prompt:\n\n"+cL,"");cC++;if(null===b)break;cL+="> "+b+"\n";try{var c=eval(b)}catch(a){c="ERROR: "+a}cL+=" "+c+"\n"};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment