Improvments for hints/page-prev/page-next
This commit is contained in:
parent
387ff8bbb6
commit
72b854049b
2
doc/BUGS
2
doc/BUGS
@ -5,8 +5,6 @@ Bugs
|
||||
e.g. loading a page and immediately yanking the (non-resolved) URL should
|
||||
work.
|
||||
|
||||
- page-forward clicks "Newest" on http://explosm.net/ instead of "Next".
|
||||
|
||||
- seir sometimes sees "-- COMMAND MODE --" even though that should never
|
||||
happen.
|
||||
|
||||
|
@ -375,7 +375,7 @@ class HintManager(QObject):
|
||||
return None
|
||||
for regex in config.get('hints', option):
|
||||
for e in elems:
|
||||
if regex.match(e.toPlainText()):
|
||||
if regex.search(e.toPlainText()):
|
||||
return e
|
||||
return None
|
||||
|
||||
|
@ -576,14 +576,13 @@ DATA = OrderedDict([
|
||||
|
||||
('next-regexes',
|
||||
SettingValue(types.RegexList(flags=re.IGNORECASE),
|
||||
r'\bnext\b,\bmore\b,\bnewer\b,^>$$,^(>>|»|→|≫)$$,'
|
||||
r'^(>|»|→|≫),(>|»|→|≫)$$'),
|
||||
r'\bnext\b,\bmore\b,\bnewer\b,\b[>→≫]\b,\b(>>|»)\b'),
|
||||
"A comma-separated list of regexes to use for 'next' links."),
|
||||
|
||||
('prev-regexes',
|
||||
SettingValue(types.RegexList(flags=re.IGNORECASE),
|
||||
r'\bprev(ious)\b,\bback\b,\bolder\b,^<$$,^(<<|«|←|≪)$$,'
|
||||
r'^(<|«|←|≪),(<|«|←|≪)$$'),
|
||||
r'\bprev(ious)?\b,\bback\b,\bolder\b,\b[<←≪]\b,'
|
||||
r'\b(<<|«)\b'),
|
||||
"A comma-separated list of regexes to use for 'prev' links."),
|
||||
)),
|
||||
|
||||
|
@ -40,10 +40,10 @@ Group = enum('all', 'links', 'images', 'editable', 'url', 'prevnext_rel',
|
||||
|
||||
|
||||
SELECTORS = {
|
||||
Group.all: ('a, textarea, select, input:not([type=hidden]), button, '
|
||||
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',
|
||||
Group.links: 'a, area, link',
|
||||
Group.images: 'img',
|
||||
# This doesn't contain all the groups where we should switch to insert mode
|
||||
# - it is just used when opening the external editor.
|
||||
@ -56,8 +56,8 @@ SELECTORS = {
|
||||
'input[type=search]:focus, '
|
||||
'textarea:focus'),
|
||||
Group.url: '[src], [href]',
|
||||
Group.prevnext_rel: 'link, [role=link]',
|
||||
Group.prevnext: 'a, button, [role=button]',
|
||||
Group.prevnext_rel: 'a, area, link, [role=link]',
|
||||
Group.prevnext: 'a, area, button, [role=button]',
|
||||
}
|
||||
|
||||
FILTERS = {
|
||||
|
Loading…
Reference in New Issue
Block a user