aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Robert Manea <gotmor@gmail.com>2009-05-25 12:50:05 +0200
committerGravatar Robert Manea <gotmor@gmail.com>2009-05-25 12:50:05 +0200
commit5085ffdd5b07cdf71b07d3e0973f0d014313ceb6 (patch)
tree7151916ed79628bd49dbd589e7d44419b3b67798
parentf467ef9dc05a4dca9221c30f3da565c16aee8542 (diff)
added inject_html variable
-rw-r--r--uzbl.c12
-rw-r--r--uzbl.h3
2 files changed, 14 insertions, 1 deletions
diff --git a/uzbl.c b/uzbl.c
index ee81613..d057185 100644
--- a/uzbl.c
+++ b/uzbl.c
@@ -61,7 +61,8 @@ typedef void (*Command)(WebKitWebView*, GArray *argv);
/* commandline arguments (set initial values for the state variables) */
-const GOptionEntry entries[] =
+static const
+GOptionEntry entries[] =
{
{ "uri", 'u', 0, G_OPTION_ARG_STRING, &uzbl.state.uri,
"Uri to load at startup (equivalent to 'set uri = URI')", "URI" },
@@ -93,6 +94,7 @@ const struct {
/* variable name pointer to variable in code type callback function */
/* --------------------------------------------------------------------------------------- */
{ "uri", PTR(uzbl.state.uri, STR, cmd_load_uri)},
+ { "inject_html", PTR(uzbl.behave.inject_html, STR, cmd_inject_html)},
{ "status_message", PTR(uzbl.gui.sbar.msg, STR, update_title)},
{ "show_status", PTR(uzbl.behave.show_status, INT, cmd_set_status)},
{ "status_top", PTR(uzbl.behave.status_top, INT, move_statusbar)},
@@ -1308,6 +1310,14 @@ cmd_socket_dir() {
}
static void
+cmd_inject_html() {
+ if(uzbl.behave.inject_html) {
+ webkit_web_view_load_html_string (uzbl.gui.web_view,
+ uzbl.behave.inject_html, NULL);
+ }
+}
+
+static void
cmd_modkey() {
int i;
char *buf;
diff --git a/uzbl.h b/uzbl.h
index 3f5e60f..1fd129a 100644
--- a/uzbl.h
+++ b/uzbl.h
@@ -166,6 +166,7 @@ typedef struct {
guint resizable_txt;
gchar* default_encoding;
guint enforce_96dpi;
+ gchar *inject_html;
/* command list: name -> Command */
GHashTable* commands;
@@ -480,5 +481,7 @@ cmd_default_encoding();
static void
cmd_enforce_96dpi();
+static void
+cmd_inject_html();
/* vi: set et ts=4: */