diff options
author | Sylvester Johansson <scj@archlinux.us> | 2009-05-28 22:13:24 +0200 |
---|---|---|
committer | Sylvester Johansson <scj@archlinux.us> | 2009-05-28 22:16:34 +0200 |
commit | afce27422a221c718958a06a1e7f804f0a59003d (patch) | |
tree | ec0eb812a98552cea31ca9c082209593d33bc0ea /examples | |
parent | 09ae8e31a84ef94e82ccecae2196bad9ba12c538 (diff) |
OH GOD I DON'T KNOW WHAT I AM DOING
Diffstat (limited to 'examples')
-rw-r--r-- | examples/configs/sampleconfig-dev | 5 | ||||
-rw-r--r-- | examples/data/style.css | 4 | ||||
-rw-r--r-- | examples/scripts/linkfollow.js | 22 |
3 files changed, 20 insertions, 11 deletions
diff --git a/examples/configs/sampleconfig-dev b/examples/configs/sampleconfig-dev index 3deeac1..0dcc0d2 100644 --- a/examples/configs/sampleconfig-dev +++ b/examples/configs/sampleconfig-dev @@ -60,7 +60,7 @@ set shell_cmd = sh -c set show_status = 1 # you can optionally use this setting to override the background color of the statusbar from your GTK theme. set status_background = #303030 -set status_format = <span font_family="monospace"><span background="khaki" foreground="black">MODE</span> [<span weight="bold" foreground="red">KEYCMD</span>] <span foreground="#606060"> LOAD_PROGRESSBAR </span><span foreground="#99FF66">URI</span> <span foreground="khaki">NAME</span> <span foreground="orange">MSG</span><span foreground="#606060">SELECTED_URI</span></span> +set status_format = <span font_family="monospace"><span background="khaki" foreground="black">[MODE]</span> [<span weight="bold" foreground="red">KEYCMD</span>] <span foreground="#606060"> LOAD_PROGRESSBAR </span><span foreground="#99FF66">URI</span> <span foreground="khaki">NAME</span> <span foreground="orange">MSG</span><span foreground="#606060">SELECTED_URI</span></span> set status_top = 0 # define how your titlebar should look like. (short = statusbar is also shown, long = show everything you must see if statusbar is off) set title_format_short = TITLE - Uzbl browser <NAME> @@ -69,7 +69,8 @@ set title_format_long = KEYCMD MODE TITLE - Uzbl browser <NAME> > SELECTED_URI set status_pbar_done = * set status_pbar_pending = - set status_pbar_width = 12 - +set insert_indicator = I +set command_indicator = C set modkey = Mod1 # reset to command mode when new page is loaded set reset_command_mode = 1 diff --git a/examples/data/style.css b/examples/data/style.css index 9789e6f..de0a38b 100644 --- a/examples/data/style.css +++ b/examples/data/style.css @@ -1,6 +1,10 @@ .uzbl_highlight { background-color: yellow;} .uzbl_h_first { background-color: lightgreen;} +.uzbl_follow { border-style: dotted; + border-width: thin; +} + #uzbl_hint > div { display: inline; border: 2px solid #4a6600; diff --git a/examples/scripts/linkfollow.js b/examples/scripts/linkfollow.js index e77219c..aad7353 100644 --- a/examples/scripts/linkfollow.js +++ b/examples/scripts/linkfollow.js @@ -10,7 +10,7 @@ // bind f_ = js hints.follow("%s",hints.open) // // At the moment, it may be useful to have way of forcing uzbl to load the script -// bind :lf = script /usr/share/examples/scripts/linkfollow.js +// bind :lf = script /usr/share/uzbl/examples/scripts/linkfollow.js // // The default style for the hints are pretty ugly, so it is recommended to add the following // to config file @@ -25,11 +25,20 @@ function Hints(){ + // Settings + //////////////////////////////////////////////////////////////////////////// // if set to true, you must explicitly call hints.follow(), otherwise it will // follow the link if there is only one matching result var requireReturn = true; + // Case sensitivity flag + var matchCase = "i"; + + // For case sensitive matching, uncomment: + // var matchCase = ""; + + var uzblid = 'uzbl_hint'; var uzblclass = 'uzbl_highlight'; var uzblclassfirst = 'uzbl_h_first'; @@ -81,7 +90,7 @@ function Hints(){ function Matcher(str){ var numbers = str.replace(/[^\d]/g,""); - var words = str.replace(/\d/g,"").split(/\s+/).map(function (n) { return new RegExp(n,"i")}); + var words = str.replace(/\d/g,"").split(/\s+/).map(function (n) { return new RegExp(n,matchCase)}); this.test = test; this.toString = toString; this.numbers = numbers; @@ -195,10 +204,12 @@ function Hints(){ this.openNewWindow = function(item){ // TODO: this doesn't work yet + item.className += " uzbl_follow"; window.open(item.href,"uzblnew",""); } this.open = function(item){ simulateMouseOver(item); + item.className += " uzbl_follow"; window.location = item.href; } @@ -222,13 +233,6 @@ function Hints(){ var item = items[0].node; } if (item) { - // This causes some elements to move around. Guess it should only be applied to - // links - item.style.margin -= 3; - item.style.padding -= 3; - item.style.borderStyle = "dotted"; - item.style.borderWidth = "thin"; - var name = item.tagName; if (name == 'A') { if(item.click) {item.click()}; |