From 86bc75a590b6bf84841ace231051d4e29eb4eed1 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 3 Feb 2022 14:43:40 +0530 Subject: [PATCH] lint compliance --- www/bounce/main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/bounce/main.js b/www/bounce/main.js index 3b955efc0..9dbeedcc4 100644 --- a/www/bounce/main.js +++ b/www/bounce/main.js @@ -66,7 +66,9 @@ define(['/api/config'], function (ApiConfig) { ], function (Messages) { // The provided URL seems to be a malicious or invalid payload. // Inform the user that we won't navigate and that the 'bounce tab' will be closed. - if (['javascript:', 'vbscript:', 'data:', 'blob:'].includes(target.protocol)) { + // our linter warns when it sees 'javascript:' because it doesn't distinguish between + // detecting this pattern and using it, so we ignore this line + if (['javascript:', 'vbscript:', 'data:', 'blob:'].includes(target.protocol)) { // jshint ignore:line window.alert(Messages._getKey('bounce_danger', [target.href])); return void reject(); }