Skip to content

Instantly share code, notes, and snippets.

@daniely
Last active April 30, 2016 00:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daniely/95eb4a564cbb5598a22ccd9839227f34 to your computer and use it in GitHub Desktop.
Save daniely/95eb4a564cbb5598a22ccd9839227f34 to your computer and use it in GitHub Desktop.
var run=function(n){var e={input:n,output:null,error:null};try{e.output=runHidden(n)}catch(l){e.error=l.message}"undefined"===e.output&&(e.output=""),application.remote.output(e)},runHidden=function(code){var indexedDB=null,location=null,navigator=null,onerror=null,onmessage=null,performance=null,self=null,webkitIndexedDB=null,postMessage=null,close=null,openDatabase=null,openDatabaseSync=null,webkitRequestFileSystem=null,webkitRequestFileSystemSync=null,webkitResolveLocalFileSystemSyncURL=null,webkitResolveLocalFileSystemURL=null,addEventListener=null,dispatchEvent=null,removeEventListener=null,dump=null,onoffline=null,ononline=null,importScripts=null,application=null,log_a=[];"undefined"!=typeof console&&("undefined"!=typeof console.log?console.olog=console.log:console.olog=function(){}),console.log=function(n){log_a.push(n)},console.error=console.debug=console.info=console.log;var result;try{result=eval(code)}catch(e){result=e.message}return log_a.push(result),log_a.join("\n")},stringify=function(n){var e;return e="undefined"==typeof n?"undefined":null===n?"null":JSON.stringify(n)||n.toString()};application.setInterface({run:run});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment