Skip to content

Commit

Permalink
fix: powerlink expression variant
Browse files Browse the repository at this point in the history
  • Loading branch information
piquark6046 committed Dec 31, 2024
1 parent bd1de0c commit d4cd4f3
Show file tree
Hide file tree
Showing 3 changed files with 5 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": "@list-kr/namulink",
"version": "10.2.0",
"version": "10.3.0",
"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/npm/@list-kr/namulink@latest/dist/NamuLink.user.js
// @license MIT
//
// @version 10.2.0
// @version 10.3.0
// @author PiQuark6046 and contributors
//
// @match https://namu.wiki/*
Expand Down
4 changes: 3 additions & 1 deletion sources/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ Win.Object.defineProperty = new Proxy(Win.Object.defineProperty, {

setInterval(() => {
Array.from(document.querySelectorAll('div[class*=" "] div[class]')).filter(Filtered => Filtered instanceof HTMLElement &&
(Filtered.innerText.includes('파워링크') || Filtered.innerText === '' || Array.from(Filtered.querySelectorAll('img[src*="//i.namu.wiki/i/"]')).length > 2) && Number(getComputedStyle(Filtered).getPropertyValue('padding-top').replaceAll('px', '')) >= 8 &&
(Filtered.innerText.includes('파워링크') || Filtered.innerText === ''
|| Array.from(Filtered.querySelectorAll('img[src*="//i.namu.wiki/i/"]')).length > 2
|| Array.from(Filtered.querySelectorAll('span')).filter(Ele => getComputedStyle(Ele).getPropertyValue('background-image').startsWith('url(data:image/png;base64,'))) && Number(getComputedStyle(Filtered).getPropertyValue('padding-top').replaceAll('px', '')) >= 8 &&
Number(getComputedStyle(Filtered).getPropertyValue('min-height').replaceAll('px', '')) > 100 &&
Number(getComputedStyle(Filtered).getPropertyValue('height').replaceAll('px', '')) < 400
).forEach(Target => Target.setAttribute('style', 'display: none !important;'))
Expand Down

0 comments on commit d4cd4f3

Please sign in to comment.