From e14d88de39e8ac0e3502e5f24d85d78d33962218 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 26 Mar 2012 21:10:15 -0400 Subject: Add code and bindings to follow the current search --- examples/data/scripts/follow.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'examples/data/scripts/follow.js') 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) +} -- cgit v1.2.3