From d8836bd6a084ff64a4e616aad78a4af54cbebb15 Mon Sep 17 00:00:00 2001 From: "Michael Ziminsky (Z)" Date: Sat, 3 Oct 2020 21:11:18 -0700 Subject: [PATCH] v1.8.10 - Fix some navigation issues Closes #44 --- CHANGELOG | 3 +++ manifest.json | 2 +- src/util.js | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index f8e4fbd..c158aff 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +v1.8.10 +- Fix some navigation issues with internal link cleaning enabled - closes #44 + v1.8.9 - Block additional background tracking and metrics submission - Fix video volume adjustment slider - closes #43 diff --git a/manifest.json b/manifest.json index 9912281..249545b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "__MSG_extensionName__", - "version": "1.8.9", + "version": "1.8.10", "description": "__MSG_extensionDescription__", "default_locale": "en", "icons": { "128": "src/icon.png" }, diff --git a/src/util.js b/src/util.js index 2aa9749..3b81f0a 100644 --- a/src/util.js +++ b/src/util.js @@ -27,8 +27,7 @@ function isAllowedTarget(e) { // Walk through event target and parents until the currentTarget looking for an element that clicks are allowed on while (e.currentTarget.parentNode !== checkTarget) { const role = checkTarget.attributes.role; - if (checkTarget.tagName === "A" && (!checkTarget.hasAttribute("href") || checkTarget.getAttribute("href") === "#")) { - e.preventDefault(); + if (checkTarget.tagName === "A" && checkTarget.hostname === location.hostname) { return true; } else if (role && config.roles.includes(role.value.toUpperCase())) { return true;