From a38ebe3d53a51a85940588ad65070ee20de0305b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zen=C3=A7=20Bilgili?= Date: Thu, 21 May 2020 02:17:53 +0300 Subject: [PATCH] Improve query handling for CommandsInfluencer --- js/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/script.js b/js/script.js index d4a07c8..8cbb149 100644 --- a/js/script.js +++ b/js/script.js @@ -493,7 +493,7 @@ class CommandsInfluencer extends Influencer { const commands = this._commands; commands.forEach(command => { - if(command.key.startsWith(rawQuery)){ + if(this._getDomain(command.url).startsWith(rawQuery)){ suggestions.push(command.url); } }); @@ -510,7 +510,7 @@ class CommandsInfluencer extends Influencer { else { return null; } -} + } _getDomain(url){ let hostName = this._getHostName(url);