aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar Mason Larobina <mason.larobina@gmail.com>2010-03-05 14:21:15 +0800
committerGravatar Mason Larobina <mason.larobina@gmail.com>2010-03-05 14:21:15 +0800
commit930e69732ebb35bd862d33065befaa918229ffb9 (patch)
tree3c7ea900318665ede17b15cfb24ff0de7f60536c /examples
parent9b3b2e66df97cc49476924ab9eec47a4dde74eef (diff)
Strip whitespace.
Diffstat (limited to 'examples')
-rw-r--r--examples/data/scripts/follower.js26
-rwxr-xr-xexamples/data/scripts/instance-select-wmii.sh2
-rwxr-xr-xexamples/data/scripts/uzblcat1
3 files changed, 14 insertions, 15 deletions
diff --git a/examples/data/scripts/follower.js b/examples/data/scripts/follower.js
index 604b779..dc37b46 100644
--- a/examples/data/scripts/follower.js
+++ b/examples/data/scripts/follower.js
@@ -16,7 +16,7 @@
// be done with:
//
// @on_event LOAD_COMMIT script /path/to/follower.js
-//
+//
// Then you can bind it to a key:
//
// @bind f* = js follower.follow('%s', matchSpec, handler, hintStyler)
@@ -26,7 +26,7 @@
// set these to follower.genericMatchSpec, follower.genericHandler and
// follower.genericHintStyler respectively.
//
-// For example,
+// For example,
//
// @bind f* = js follower.follow('%s', follower.genericMatchSpec, follower.genericHandler, follower.genericHintStyler)
// @bind F* = js follower.follow('%s', follower.onlyLinksMatchSpec, follower.newPageHandler, follower.newPageHintStyler)
@@ -53,7 +53,7 @@
// * What elements are hinted.
// * The style of the hints displayed.
// * How the hints are handled.
-//
+//
// In order to customize behavior, write an alternative, and pass that in to
// follower.follow invocation. You _will_ have to modify this script, but only
// locally, it beats having to copy the entire script under a new name and
@@ -75,11 +75,11 @@ String.prototype.lpad = function(padding, length) {
return padded;
}
-function Follower() {
+function Follower() {
// Globals
- var uzblID = 'uzbl-follow'; // ID to apply to each hint.
- var uzblContainerID = 'uzbl-follow-container'; // ID to apply to the div containing hints.
+ var uzblID = 'uzbl-follow'; // ID to apply to each hint.
+ var uzblContainerID = 'uzbl-follow-container'; // ID to apply to the div containing hints.
// Translation table, used to display something other than numbers as hint
// labels. Typically set to the ten keys of the home row.
@@ -147,7 +147,7 @@ function Follower() {
}
Uzbl.run("event SET_KEYCMD");
}
-
+
// Handler to open links in a new page. The rest is the same as before.
this.newPageHandler = function(node) {
if (node) {
@@ -387,24 +387,24 @@ function Follower() {
// The main hinting function. I don't know how to do default values to
// functions, so all arguments must be specified. Use generics if you must.
this.follow = function(target, matchSpec, handler, hintStyler) {
- var container = generateHintContainer(); // Get a container to hold all hints.
+ var container = generateHintContainer(); // Get a container to hold all hints.
var allHintables = generateHintables(matchSpec); // Get all items that can be hinted.
- hintables = filterHintables(allHintables, target); // Filter them based on current input.
-
+ hintables = filterHintables(allHintables, target); // Filter them based on current input.
+
clearHints(); // Clear existing hints, if any.
if (hintables[0].length == 0) {
// Nothing was hinted, user pressed an unknown key, maybe?
// Do nothing.
} else if (hintables[0].length == 1) {
- handler(hintables[0][0]); // Only one hint remains, handle it.
+ handler(hintables[0][0]); // Only one hint remains, handle it.
} else {
- drawHints(container, hintables, hintStyler); // Draw whatever hints remain.
+ drawHints(container, hintables, hintStyler); // Draw whatever hints remain.
}
return;
};
-}
+}
// Make on-click links clickable.
try {
diff --git a/examples/data/scripts/instance-select-wmii.sh b/examples/data/scripts/instance-select-wmii.sh
index 2bf13ba..fdd27e6 100755
--- a/examples/data/scripts/instance-select-wmii.sh
+++ b/examples/data/scripts/instance-select-wmii.sh
@@ -6,7 +6,7 @@
# you can select one from a list, or go to the next/previous one
# It does not change the layout (stacked/tiled/floating) nor does it
# changes the size or viewing mode of a uzbl window
-# When your current uzbl window is maximized, the one you change to
+# When your current uzbl window is maximized, the one you change to
# will be maximized as well.
# See http://www.uzbl.org/wiki/wmii for more info
# $1 must be one of 'list', 'next', 'prev'
diff --git a/examples/data/scripts/uzblcat b/examples/data/scripts/uzblcat
index e955608..4aa4b9e 100755
--- a/examples/data/scripts/uzblcat
+++ b/examples/data/scripts/uzblcat
@@ -9,4 +9,3 @@ for line in stdin:
stdout.write(line[0:-1])
# vim: set noet ff=unix
-