aboutsummaryrefslogtreecommitdiffhomepage
path: root/uzbl.c
diff options
context:
space:
mode:
Diffstat (limited to 'uzbl.c')
-rw-r--r--uzbl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/uzbl.c b/uzbl.c
index 2f24b56..edd0b38 100644
--- a/uzbl.c
+++ b/uzbl.c
@@ -303,6 +303,7 @@ static struct {char *name; Command command;} cmdlist[] =
{ "zoom_in", view_zoom_in, }, //Can crash (when max zoom reached?).
{ "zoom_out", view_zoom_out, },
{ "uri", load_uri },
+ { "script", run_js },
{ "toggle_status", toggle_status_cb },
{ "spawn", spawn },
{ "exit", close_uzbl },
@@ -375,6 +376,12 @@ load_uri (WebKitWebView * web_view, const gchar *param) {
}
static void
+run_js (WebKitWebView * web_view, const gchar *param) {
+ if (param)
+ webkit_web_view_execute_script (web_view, param);
+}
+
+static void
search_text (WebKitWebView *page, const char *param) {
if ((param) && (param[0] != '\0')) {
strcpy(searchtx, param);