changeset 41:9cd17ff76e97

Added #proxy=
author unexist
date Sun, 24 Jan 2010 01:55:27 +0100
parents 61134827e004
children c6f35cf6c4f6
files bin/subtly subtly/browser.rb
diffstat 2 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bin/subtly	Sun Jan 24 01:55:13 2010 +0100
+++ b/bin/subtly	Sun Jan 24 01:55:27 2010 +0100
@@ -12,8 +12,9 @@
 require "subtly/browser"
 
 b = Subtly::Browser.new
+
+# Add keys
 b.add_keys({
-  # Keys
   "o"   => :SubtlyUriOpen,
   "O"   => :SubtlyUriEdit,
   "p"   => :SubtlyUriPaste,
@@ -37,7 +38,13 @@
   # Jumps
   "g_"  => "http://www.google.de/search?q=%s"
 })
+
+# Set proxy
+#b.proxy = "http://localhost:8118"
+
+# Set default page
 b.uri = ARGV[0] || "http://www.google.de"
+
 b.run
 
 # vim:ts=2:bs=2:sw=2:et:fdm=marker
--- a/subtly/browser.rb	Sun Jan 24 01:55:13 2010 +0100
+++ b/subtly/browser.rb	Sun Jan 24 01:55:27 2010 +0100
@@ -111,6 +111,16 @@
       @page.text  = "Top"
     end # }}}
 
+    ## proxy= {{{
+    # Set browser proxy
+    #
+    # @param [String, #read]  uri  Uri to proxy
+    ##
+    
+    def proxy=(uri)
+      @webkit.proxy = uri
+    end # }}}
+
     ## add_keys {{{
     # Add keys hash
     #