ubuntu: implement inject* functions

This commit is contained in:
Maxim Ermilov
2014-10-18 02:36:31 +04:00
parent 88b71b3a57
commit e5d6d6f69a
4 changed files with 55 additions and 17 deletions
+8
View File
@@ -0,0 +1,8 @@
oxide.addMessageHandler("EXECUTE", function(msg) {
var code = msg.args.code;
try {
msg.reply({result: eval(code)});
} catch(e) {
msg.error("Code threw exception: \"" + e + "\"");
}
});