From cf26201e86e6e53d0ef4240935be7faffc32bd49 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Mon, 8 Aug 2016 17:28:13 +0200 Subject: [PATCH 1/3] Extract hint tags from This is useful for very many input fields, especially prominent on GitHub itself. --- qutebrowser/browser/hints.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 278ad7d0d..045c8456a 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -1021,6 +1021,7 @@ class WordHinter: "alt": lambda elem: elem["alt"], "name": lambda elem: elem["name"], "title": lambda elem: elem["title"], + "placeholder": lambda elem: elem["placeholder"], "src": lambda elem: elem["src"].split('/')[-1], "href": lambda elem: elem["href"].split('/')[-1], "text": str, @@ -1029,7 +1030,7 @@ class WordHinter: extractable_attrs = collections.defaultdict(list, { "img": ["alt", "title", "src"], "a": ["title", "href", "text"], - "input": ["name"] + "input": ["name", "placeholder"] }) return (attr_extractors[attr](elem) From 6e279f1b1e36fdc6013eef27c028773aedbf0548 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Mon, 8 Aug 2016 17:49:35 +0200 Subject: [PATCH 2/3] Extract hint tags from