From f2c7c41f6cc70e1d509967c7487aec5126495557 Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Thu, 13 Jan 2011 11:59:23 -0700 Subject: remove the vestiges of Uzbl.run --- src/uzbl-core.c | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) (limited to 'src/uzbl-core.c') diff --git a/src/uzbl-core.c b/src/uzbl-core.c index 6bbed3c..c6443cc 100644 --- a/src/uzbl-core.c +++ b/src/uzbl-core.c @@ -979,52 +979,6 @@ load_uri (WebKitWebView *web_view, GArray *argv, GString *result) { } /* Javascript*/ - -JSValueRef -js_run_command (JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, - size_t argumentCount, const JSValueRef arguments[], - JSValueRef* exception) { - (void) function; - (void) thisObject; - (void) exception; - - JSStringRef js_result_string; - GString *result = g_string_new(""); - - if (argumentCount >= 1) { - JSStringRef arg = JSValueToStringCopy(ctx, arguments[0], NULL); - size_t arg_size = JSStringGetMaximumUTF8CStringSize(arg); - char ctl_line[arg_size]; - JSStringGetUTF8CString(arg, ctl_line, arg_size); - - parse_cmd_line(ctl_line, result); - - JSStringRelease(arg); - } - js_result_string = JSStringCreateWithUTF8CString(result->str); - - g_string_free(result, TRUE); - - return JSValueMakeString(ctx, js_result_string); -} - -JSStaticFunction js_static_functions[] = { - {"run", js_run_command, kJSPropertyAttributeNone}, -}; - -void -js_init() { - /* This function creates the class and its definition, only once */ - if (!uzbl.js.initialized) { - /* it would be pretty cool to make this dynamic */ - uzbl.js.classdef = kJSClassDefinitionEmpty; - uzbl.js.classdef.staticFunctions = js_static_functions; - - uzbl.js.classref = JSClassCreate(&uzbl.js.classdef); - } -} - - void eval_js(WebKitWebView * web_view, gchar *script, GString *result, const char *file) { WebKitWebFrame *frame; @@ -1037,8 +991,6 @@ eval_js(WebKitWebView * web_view, gchar *script, GString *result, const char *fi JSStringRef js_result_string; size_t js_result_size; - js_init(); - frame = webkit_web_view_get_main_frame(WEBKIT_WEB_VIEW(web_view)); context = webkit_web_frame_get_global_context(frame); globalobject = JSContextGetGlobalObject(context); -- cgit v1.2.3