[wiki] [sites] wiki updated

From: <hg_AT_suckless.org>
Date: Tue, 27 Sep 2011 00:10:13 +0200 (CEST)

changeset: 775:cb4e20793779
tag: tip
user: Nick White <hg_AT_njw.me.uk>
date: Mon Sep 26 23:25:37 2011 +0100
files: surf.suckless.org/patches/surf-0.4.1-togglejs.diff surf.suckless.org/patches/togglejs.md
description:
Add togglejs patch for surf


diff -r 2ae53d9f27d1 -r cb4e20793779 surf.suckless.org/patches/surf-0.4.1-togglejs.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/surf.suckless.org/patches/surf-0.4.1-togglejs.diff Mon Sep 26 23:25:37 2011 +0100
_AT_@ -0,0 +1,53 @@
+diff -r 71388899ac09 config.def.h
+--- a/config.def.h Tue Jun 08 09:06:10 2010 +0200
++++ b/config.def.h Mon Sep 26 23:23:29 2011 +0100
+_AT_@ -33,6 +33,7 @@
+ { MODKEY, GDK_k, scroll, { .i = -1 } },
+ { 0, GDK_Escape, stop, { 0 } },
+ { MODKEY, GDK_o, source, { 0 } },
++ { MODKEY, GDK_s, togglescript, { .b = FALSE } },
+ { MODKEY, GDK_g, spawn, SETPROP("_SURF_URI", "_SURF_GO") },
+ { MODKEY, GDK_slash, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
+ { MODKEY, GDK_n, find, { .b = TRUE } },
+diff -r 71388899ac09 surf.1
+--- a/surf.1 Tue Jun 08 09:06:10 2010 +0200
++++ b/surf.1 Mon Sep 26 23:23:29 2011 +0100
+_AT_@ -87,6 +87,9 @@
+ .B Ctrl\-y
+ Copies current URI to primary selection.
+ .TP
++.B Ctrl\-s
++Toggles javascript.
++.TP
+ .B Ctrl\-o
+ show the sourcecode of the current page.
+ .SH SEE ALSO
+diff -r 71388899ac09 surf.c
+--- a/surf.c Tue Jun 08 09:06:10 2010 +0200
++++ b/surf.c Mon Sep 26 23:23:29 2011 +0100
+_AT_@ -104,6 +104,7 @@
+ static void source(Client *c, const Arg *arg);
+ static void spawn(Client *c, const Arg *arg);
+ static void stop(Client *c, const Arg *arg);
++static void togglescript(Client *c, const Arg *arg);
+ static void titlechange(WebKitWebView *v, WebKitWebFrame* frame, const char* title, Client *c);
+ static void update(Client *c);
+ static void updatewinid(Client *c);
+_AT_@ -158,6 +159,17 @@
+ }
+
+ void
++togglescript(Client *c, const Arg *arg) {
++ WebKitWebSettings *settings;
++ gboolean script;
++
++ settings = webkit_web_view_get_settings(c->view);
++ g_object_get(G_OBJECT(settings), "enable-scripts", &script, NULL);
++ g_object_set(G_OBJECT(settings), "enable-scripts", !script, NULL);
++ reload(c, arg);
++}
++
++void
+ clipboard(Client *c, const Arg *arg) {
+ gboolean paste = *(gboolean *)arg;
+
diff -r 2ae53d9f27d1 -r cb4e20793779 surf.suckless.org/patches/togglejs.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/surf.suckless.org/patches/togglejs.md Mon Sep 26 23:25:37 2011 +0100
_AT_@ -0,0 +1,17 @@
+Toggle JavaScript
+=================
+
+Description
+-----------
+
+Adds a keybind (by default ^S) to toggle javascript on/off.
+
+Download
+--------
+
+* [surf-0.4.1-togglejs.diff](surf-0.4.1-togglejs.diff) (0.5k) (20110926)
+
+Author
+------
+
+* Nick White <[http://njw.me.uk](http://njw.me.uk)>
Received on Tue Sep 27 2011 - 00:10:13 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 19:31:52 CEST