static gboolean mimetype_decision_cb(WebKitWebView *webview,
WebKitWebFrame *frame, WebKitNetworkRequest *request, char*
mime_type, WebKitWebPolicyDecision *decision);
+static void window_object_cleared_cb(GtkWidget *widget, WebKitWebFrame *frame,
+ JSContextRef js, JSObjectRef win, gpointer data);
static void download_progress_cp(WebKitDownload *download, GParamSpec *pspec);
/* functions */
} else {
set_status(VB_STATUS_NORMAL);
}
-
- /* inject the hinting javascript */
- hints_init(frame);
-
- /* run user script file */
- run_user_script(frame);
}
/* if we load a page from a submitted form, leafe the insert mode */
"signal::hovering-over-link", G_CALLBACK(hover_link_cb), NULL,
"signal::title-changed", G_CALLBACK(title_changed_cb), NULL,
"signal::mime-type-policy-decision-requested", G_CALLBACK(mimetype_decision_cb), NULL,
+ "signal::window-object-cleared", G_CALLBACK(window_object_cleared_cb), NULL,
"signal::download-requested", G_CALLBACK(vb_download), NULL,
"signal::should-show-delete-interface-for-element", G_CALLBACK(gtk_false), NULL,
NULL
return false;
}
+static void window_object_cleared_cb(GtkWidget *widget, WebKitWebFrame *frame,
+ JSContextRef js, JSObjectRef win, gpointer data)
+{
+ /* inject the hinting javascript */
+ hints_init(frame);
+
+ /* run user script file */
+ run_user_script(frame);
+}
+
gboolean vb_download(WebKitWebView *view, WebKitDownload *download, const char *path)
{
WebKitDownloadStatus status;