Remove windowobjectcleared(), execute scripts on load finished

The “window-object-cleared” signal is not directly accessible for
specific WebViews now. We'll have to use an Extension or rewrite the
JavaScript running functions.
This commit is contained in:
Quentin Rameau 2015-11-19 16:38:58 +01:00
parent bb1fc4195f
commit 72905b8bfc
1 changed files with 0 additions and 14 deletions

14
surf.c
View File

@ -188,8 +188,6 @@ static void togglestyle(Client *c, const Arg *arg);
static void updatetitle(Client *c); static void updatetitle(Client *c);
static void updatewinid(Client *c); static void updatewinid(Client *c);
static void usage(void); static void usage(void);
static void windowobjectcleared(GtkWidget *w, WebKitWebFrame *frame,
JSContextRef js, JSObjectRef win, Client *c);
static void zoom(Client *c, const Arg *arg); static void zoom(Client *c, const Arg *arg);
/* configuration, allows nested code to access above variables */ /* configuration, allows nested code to access above variables */
@ -993,9 +991,6 @@ newview(Client *c, WebKitWebView *rv)
g_signal_connect(G_OBJECT(v), g_signal_connect(G_OBJECT(v),
"decide-policy", "decide-policy",
G_CALLBACK(decidepolicy), c); G_CALLBACK(decidepolicy), c);
g_signal_connect(G_OBJECT(v),
"window-object-cleared",
G_CALLBACK(windowobjectcleared), c);
g_signal_connect(G_OBJECT(v), g_signal_connect(G_OBJECT(v),
"load-changed", "load-changed",
G_CALLBACK(loadchanged), c); G_CALLBACK(loadchanged), c);
@ -1037,8 +1032,6 @@ showview(WebKitWebView *v, Client *c)
gdk_window_set_events(gwin, GDK_ALL_EVENTS_MASK); gdk_window_set_events(gwin, GDK_ALL_EVENTS_MASK);
gdk_window_add_filter(gwin, processx, c); gdk_window_add_filter(gwin, processx, c);
runscript(frame);
/* This might conflict with _zoomto96dpi_. */ /* This might conflict with _zoomto96dpi_. */
if (zoomlevel != 1.0) if (zoomlevel != 1.0)
webkit_web_view_set_zoom_level(c->view, zoomlevel); webkit_web_view_set_zoom_level(c->view, zoomlevel);
@ -1528,13 +1521,6 @@ usage(void)
"[-u useragent] [-z zoomlevel] [uri]\n", basename(argv0)); "[-u useragent] [-z zoomlevel] [uri]\n", basename(argv0));
} }
void
windowobjectcleared(GtkWidget *w, WebKitWebFrame *frame, JSContextRef js,
JSObjectRef win, Client *c)
{
runscript(frame);
}
void void
zoom(Client *c, const Arg *arg) zoom(Client *c, const Arg *arg)
{ {