Skip to content

Commit

Permalink
v3.1.5 update google parser
Browse files Browse the repository at this point in the history
  • Loading branch information
ik9999 committed Jun 9, 2021
1 parent a579d5a commit 79184a6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "popupsearch",
"version": "3.1.4",
"version": "3.1.5",
"description": "Chrome extension for searching",
"author": "[email protected]",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "PopupSearch",
"description": "Chrome extension for searching in google™ using popup window with keyboard navigation support",
"version": "3.1.4",
"version": "3.1.5",
"manifest_version": 2,
"icons": {
"48": "icons/icon_48.png",
Expand Down
8 changes: 6 additions & 2 deletions src/popup/search/googleHTML.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,12 @@ export default async function(query, start) {
return false;
}
if (childNodeDomEl.nodeName === 'A') {
let hostname = _.trimStart((new URL(childNodeDomEl.href)).host, 'www.');
if (hostname !== itemHrefHost) {
let hostname = undefined;
try {
hostname = _.trimStart((new URL(childNodeDomEl.href)).host, 'www.');
} catch (e) {
}
if (hostname && hostname !== itemHrefHost) {
isValid = false;
return false;
}
Expand Down

0 comments on commit 79184a6

Please sign in to comment.