Merge branch 'hinttags' of https://github.com/haasn/qutebrowser into haasn-hinttags

This commit is contained in:
Florian Bruhin 2016-08-09 08:43:32 +02:00
commit c3690bce0d

View File

@ -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,8 @@ class WordHinter:
extractable_attrs = collections.defaultdict(list, {
"img": ["alt", "title", "src"],
"a": ["title", "href", "text"],
"input": ["name"]
"input": ["name", "placeholder"],
"button": ["text"]
})
return (attr_extractors[attr](elem)