diff options
author | Barrucadu <mike@barrucadu.co.uk> | 2009-05-03 19:32:49 +0100 |
---|---|---|
committer | Barrucadu <mike@barrucadu.co.uk> | 2009-05-03 19:32:49 +0100 |
commit | 01cfcffd7762edd4bed94e91b2013890680765a9 (patch) | |
tree | 1c9269911972d6a71628a16732c055c18feae630 /uzbl.c | |
parent | d0dfcc7ad664f4ff25ade28a38a2157ce4fda94d (diff) |
Added command "script" to run javascript on the current page.
Diffstat (limited to 'uzbl.c')
-rw-r--r-- | uzbl.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); |