Introduction
Introduction Statistics Contact Development Disclaimer Help
tadded js-fix by Troels Henriksen. Thanks :) - surf - customized build of surf,…
git clone git://src.adamsgaard.dk/surf
Log
Files
Refs
README
LICENSE
---
commit 168da3730fcaabf56f9cb7508cbff1699e5b33b1
parent 602eb616231b4606ca09dc2f98b1c3d22b8538d5
Author: Enno Boland (tox) <[email protected]>
Date: Sun, 9 May 2010 19:37:46 +0200
added js-fix by Troels Henriksen. Thanks :)
Diffstat:
M surf.c | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
---
diff --git a/surf.c b/surf.c
t@@ -151,6 +151,19 @@ cleanup(void) {
}
void
+runscript(WebKitWebFrame *frame, JSContextRef js) {
+ JSStringRef jsscript;
+ char *script;
+ JSValueRef exception = NULL;
+ GError *error;
+
+ if(g_file_get_contents(scriptfile, &script, NULL, &error)) {
+ jsscript = JSStringCreateWithUTF8CString(script);
+ JSEvaluateScript(js, jsscript, JSContextGetGlobalObject(js), N…
+ }
+}
+
+void
clipboard(Client *c, const Arg *arg) {
gboolean paste = *(gboolean *)arg;
t@@ -470,6 +483,7 @@ newclient(void) {
int i;
Client *c;
WebKitWebSettings *settings;
+ WebKitWebFrame *frame;
GdkGeometry hints = { 1, 1 };
char *uri, *ua;
t@@ -556,6 +570,8 @@ newclient(void) {
gdk_window_set_events(GTK_WIDGET(c->win)->window, GDK_ALL_EVENTS_MASK);
gdk_window_add_filter(GTK_WIDGET(c->win)->window, processx, c);
webkit_web_view_set_full_content_zoom(c->view, TRUE);
+ frame = webkit_web_view_get_main_frame(c->view);
+ runscript(frame, webkit_web_frame_get_global_context(frame));
settings = webkit_web_view_get_settings(c->view);
if(!(ua = getenv("SURF_USERAGENT")))
ua = useragent;
t@@ -860,15 +876,7 @@ usage(void) {
void
windowobjectcleared(GtkWidget *w, WebKitWebFrame *frame, JSContextRef js, JSOb…
- JSStringRef jsscript;
- char *script;
- JSValueRef exception = NULL;
- GError *error;
-
- if(g_file_get_contents(scriptfile, &script, NULL, &error)) {
- jsscript = JSStringCreateWithUTF8CString(script);
- JSEvaluateScript(js, jsscript, JSContextGetGlobalObject(js), N…
- }
+ runscript(frame, js);
}
void
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.