summaryrefslogtreecommitdiff
path: root/qutebrowser/browser/greasemonkey.py
diff options
context:
space:
mode:
authorJimmy <jimmy@spalge.com>2018-01-17 18:17:14 +1300
committerJimmy <jimmy@spalge.com>2018-01-20 13:40:47 +1300
commit971b41399160c26335b7a364348ca8b929e6538a (patch)
tree1a8915c2e5dfb9774ec2f9bcaf135dfb7d164f99 /qutebrowser/browser/greasemonkey.py
parentb2f95339ce3f42f8724fdf524004b41abcfa793a (diff)
downloadqutebrowser-971b41399160c26335b7a364348ca8b929e6538a.tar.gz
qutebrowser-971b41399160c26335b7a364348ca8b929e6538a.zip
Greasemonkey: make *clude regexes case insensitive
Sometimes I don't read specs so good.
Diffstat (limited to 'qutebrowser/browser/greasemonkey.py')
-rw-r--r--qutebrowser/browser/greasemonkey.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/qutebrowser/browser/greasemonkey.py b/qutebrowser/browser/greasemonkey.py
index 579cca82b..753d13c56 100644
--- a/qutebrowser/browser/greasemonkey.py
+++ b/qutebrowser/browser/greasemonkey.py
@@ -201,7 +201,8 @@ class GreasemonkeyManager(QObject):
# should be treated as a (ecma syntax) regular expression.
string_url = url.toString(QUrl.FullyEncoded)
if pattern.startswith('/') and pattern.endswith('/'):
- return re.search(pattern[1:-1], string_url) is not None
+ matches = re.search(pattern[1:-1], string_url, flags=re.I)
+ return matches is not None
# Otherwise they are glob expressions.
return fnmatch.fnmatch(string_url, pattern)