diff options
author | Brendan Taylor <whateley@gmail.com> | 2012-04-22 11:22:37 -0600 |
---|---|---|
committer | Brendan Taylor <whateley@gmail.com> | 2012-04-22 11:22:37 -0600 |
commit | c268a34b67cf485e3998a4d351eaec7cf2f5f1b4 (patch) | |
tree | 76d11bdd94aecc5c11cceabb8f4b538da8db2fa9 /examples/data/scripts/follow.js | |
parent | 9d6c51053ec466b286b40f1852b207ea81fffdbb (diff) | |
parent | e14d88de39e8ac0e3502e5f24d85d78d33962218 (diff) |
Merge remote-tracking branch 'mathstuf/dev/follow-selection'
Diffstat (limited to 'examples/data/scripts/follow.js')
-rw-r--r-- | examples/data/scripts/follow.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/data/scripts/follow.js b/examples/data/scripts/follow.js index 88f80f2..83bbf55 100644 --- a/examples/data/scripts/follow.js +++ b/examples/data/scripts/follow.js @@ -326,3 +326,19 @@ uzbl.follow.followLinks = function(str) { this.reDrawHints(leftover, len); } } + +uzbl.follow.followSelection = function(mode) { + var selection = window.getSelection() + if (!selection) + return + + var node = selection.anchorNode + if (!node) + return + + var el = node.parentElement + if (!el) + return + + this.elementSelected(el) +} |