Get rid of prevnext_rel selector group
This commit is contained in:
parent
be460afc1c
commit
1f3b39eb75
@ -368,12 +368,12 @@ class HintManager(QObject):
|
||||
"""Find a prev/next element in frame."""
|
||||
# First check for <link rel="prev(ious)|next">
|
||||
elems = frame.findAllElements(
|
||||
webelem.SELECTORS[webelem.Group.prevnext_rel])
|
||||
webelem.SELECTORS[webelem.Group.links])
|
||||
rel_values = ('prev', 'previous') if prev else ('next')
|
||||
for e in elems:
|
||||
if e.attribute('rel') in rel_values:
|
||||
return e
|
||||
# Then check for regular links
|
||||
# Then check for regular links/buttons.
|
||||
elems = frame.findAllElements(
|
||||
webelem.SELECTORS[webelem.Group.prevnext])
|
||||
option = 'prev-regexes' if prev else 'next-regexes'
|
||||
|
@ -36,18 +36,16 @@ from qutebrowser.utils.usertypes import enum
|
||||
from qutebrowser.utils.misc import compact_text
|
||||
|
||||
|
||||
Group = enum('all', 'links', 'images', 'editable', 'url', 'prevnext_rel',
|
||||
'prevnext', 'focus')
|
||||
Group = enum('all', 'links', 'images', 'editable', 'url', 'prevnext', 'focus')
|
||||
|
||||
|
||||
SELECTORS = {
|
||||
Group.all: ('a, area, textarea, select, input:not([type=hidden]), button, '
|
||||
'frame, iframe, [onclick], [onmousedown], [role=link], '
|
||||
'[role=option], [role=button], img'),
|
||||
Group.links: 'a, area, link',
|
||||
Group.links: 'a, area, link, [role=link]',
|
||||
Group.images: 'img',
|
||||
Group.url: '[src], [href]',
|
||||
Group.prevnext_rel: 'a, area, link, [role=link]',
|
||||
Group.prevnext: 'a, area, button, [role=button]',
|
||||
Group.focus: '*:focus',
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user