Skip to content

Commit 72b60c5

Browse files
committedOct 28, 2018
Remove 'ubEntry' class for compatibility with SearchPreview #2
1 parent 4a1eddb commit 72b60c5

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed
 

‎content.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ class UBlacklist {
7474
}
7575

7676
setupEntry({ base, pageUrl, actionParent, actionTag, actionClass }) {
77-
if (base.classList.contains('ubEntry')) { return; }
78-
base.classList.add('ubEntry');
77+
if (base.hasAttribute('data-ub-page-url')) { return; }
7978
base.setAttribute('data-ub-page-url', pageUrl);
8079

8180
const action = document.createElement(actionTag);
@@ -231,7 +230,7 @@ class UBlacklist {
231230

232231
rejudgeAllEntries() {
233232
this.blockedEntryCount = 0;
234-
for (const entry of document.getElementsByClassName('ubEntry')) {
233+
for (const entry of document.querySelectorAll('[data-ub-page-url]')) {
235234
entry.classList.remove('ubBlockedEntry');
236235
this.judgeEntry(entry);
237236
}

‎manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
"name": "__MSG_extensionName__",
77
"description": "__MSG_extensionDescription__",
8-
"version": "1.6.0",
8+
"version": "1.6.1",
99
"permissions": ["activeTab", "storage"],
1010

1111
"background": {

0 commit comments

Comments
 (0)
Please sign in to comment.