From 17cb08e869b6df6a8241d73925e2dc04d9cae04b Mon Sep 17 00:00:00 2001 From: Sascha Leib Date: Mon, 8 Sep 2025 21:00:47 +0200 Subject: [PATCH] Minor fix for the matchLang function --- script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script.js b/script.js index 42ebc71..e259338 100644 --- a/script.js +++ b/script.js @@ -984,8 +984,8 @@ BotMon.live = { // the parameter holds an array of exceptions, i.e. page languages that should be ignored. matchLang: function(visitor, ...exceptions) { - if (visitor.lang && visitor.accept && exceptions.indexOf(visitor.lang) >= 0) { - return !(visitor.accept.split(',').indexOf(visitor.lang) >= 0); + if (visitor.lang && visitor.accept && exceptions.indexOf(visitor.lang) < 0) { + return (visitor.accept.split(',').indexOf(visitor.lang) < 0); } return false; },