diff --git a/content.js b/content.js index fe9054a9c..6d5b95cf0 100644 --- a/content.js +++ b/content.js @@ -74,8 +74,7 @@ class UBlacklist { } setupEntry({ base, pageUrl, actionParent, actionTag, actionClass }) { - if (base.classList.contains('ubEntry')) { return; } - base.classList.add('ubEntry'); + if (base.hasAttribute('data-ub-page-url')) { return; } base.setAttribute('data-ub-page-url', pageUrl); const action = document.createElement(actionTag); @@ -231,7 +230,7 @@ class UBlacklist { rejudgeAllEntries() { this.blockedEntryCount = 0; - for (const entry of document.getElementsByClassName('ubEntry')) { + for (const entry of document.querySelectorAll('[data-ub-page-url]')) { entry.classList.remove('ubBlockedEntry'); this.judgeEntry(entry); } diff --git a/manifest.json b/manifest.json index 0749aa53a..94ad8b822 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "name": "__MSG_extensionName__", "description": "__MSG_extensionDescription__", - "version": "1.6.0", + "version": "1.6.1", "permissions": ["activeTab", "storage"], "background": {