Skip to content

Commit fdb073c

Browse files
committed
1 parent 23bac84 commit fdb073c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

chromium/rules.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,10 @@ function RuleSets() {
9797
RuleSets.prototype = {
9898

9999
localPlatformRegexp: (function() {
100-
if (/(OPR|Opera)[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {
101-
log(DBUG, 'Detected that we are running Opera');
100+
let isOpera = navigator.userAgent.match(/(?:OPR|Opera)[\/\s](\d+)(?:\.\d+)/);
101+
if (isOpera && isOpera.length === 2 && parseInt(isOpera[1]) < 23) {
102+
// Opera <23 does not have mixed content blocking
103+
log(DBUG, 'Detected that we are running Opera < 23');
102104
return new RegExp("chromium|mixedcontent");
103105
} else {
104106
log(DBUG, 'Detected that we are running Chrome/Chromium');

0 commit comments

Comments
 (0)