Skip to content

Commit

Permalink
fix: content is hidden in Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
piquark6046 committed Sep 6, 2024
1 parent 221f211 commit 1470b49
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "namulink",
"version": "4.0.10",
"version": "4.0.11",
"description": "",
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion sources/banner.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// @downloadURL https://cdn.jsdelivr.net/gh/List-KR/NamuLink@latest/NamuLink.user.js
// @license MIT
//
// @version 4.0.10
// @version 4.0.11
// @author PiQuark6046 and contributors
//
// @match https://namu.wiki/*
Expand Down
5 changes: 4 additions & 1 deletion sources/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ const RemovePowerLinkAdWorker = (SearchedElements: HTMLElement[]): HTMLElement[]
}).length === 0
})
TargetedElements = TargetedElements.filter(SearchedElement => {
return Array.from(SearchedElement.querySelectorAll('*')).every(HTMLInElement => !//.test(getComputedStyle(HTMLInElement, 'before').getPropertyValue('content')))
return Array.from(SearchedElement.querySelectorAll('*')).every(HTMLInElement =>
!(//.test(getComputedStyle(HTMLInElement, 'before').getPropertyValue('content'))
|| //.test(getComputedStyle(HTMLInElement, '::before').getPropertyValue('content')))
)
})
return TargetedElements
}
Expand Down

0 comments on commit 1470b49

Please sign in to comment.