From 04aa67964f9058305471d5fc8a3fac637f6ad6b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=AA=E5=BF=83=E7=A6=BE?= Date: Mon, 20 Jul 2020 22:03:32 +0800 Subject: [PATCH 1/3] yarn add languagedetect Fix `Error: Cannot find module languagedetect` --- package.json | 3 ++- yarn.lock | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f998d553d..1fb93d26b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,8 @@ "dependencies": { "@prantlf/jsonlint": "^10.2.0", "adm-zip": "^0.4.14", - "convert-svg-to-png": "^0.5.0" + "convert-svg-to-png": "^0.5.0", + "languagedetect": "^2.0.0" }, "devDependencies": { "@nuxtjs/eslint-config": "^1.0.1", diff --git a/yarn.lock b/yarn.lock index f011f2b21..a83b36b5a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1242,6 +1242,11 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" +languagedetect@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/languagedetect/-/languagedetect-2.0.0.tgz#4b8fa2b7593b2a3a02fb1100891041c53238936c" + integrity sha512-AZb/liiQ+6ZoTj4f1J0aE6OkzhCo8fyH+tuSaPfSo8YHCWLFJrdSixhtO2TYdIkjcDQNaR4RmGaV2A5FJklDMQ== + levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" From 9a53d48f4155ada54d7838ad7800277bee85a93d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=AA=E5=BF=83=E7=A6=BE?= Date: Mon, 20 Jul 2020 22:09:11 +0800 Subject: [PATCH 2/3] WebExtension: Remove hash from url Fix the bug of not showing popup when the url contains hash --- src/drivers/webextension/js/content.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/webextension/js/content.js b/src/drivers/webextension/js/content.js index 71dfbd994..3b031d84b 100644 --- a/src/drivers/webextension/js/content.js +++ b/src/drivers/webextension/js/content.js @@ -111,7 +111,7 @@ const Content = { chrome.runtime.sendMessage({ source: 'content.js', func: 'analyzeJs', - args: [location.href, data.wappalyzer.js] + args: [location.href.split('#')[0], data.wappalyzer.js] }) script.remove() From b132d3b3cf203a2a8d5c369b104b97b0b5685d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=AA=E5=BF=83=E7=A6=BE?= Date: Mon, 20 Jul 2020 23:05:36 +0800 Subject: [PATCH 3/3] Remove hash from url url.split(#)[0] --- src/drivers/npm/driver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/npm/driver.js b/src/drivers/npm/driver.js index 7b7fc079e..bce3bf326 100644 --- a/src/drivers/npm/driver.js +++ b/src/drivers/npm/driver.js @@ -137,7 +137,7 @@ class Driver { } open(url) { - return new Site(url, this) + return new Site(url.split('#')[0], this) } log(message, source = 'driver') {