diff --git a/package.json b/package.json index 4d6da98..e025493 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@list-kr/namulink", - "version": "10.0.0", + "version": "10.1.0", "description": "", "type": "module", "scripts": { diff --git a/sources/banner.txt b/sources/banner.txt index ad35450..d1763ed 100644 --- a/sources/banner.txt +++ b/sources/banner.txt @@ -8,7 +8,7 @@ // @downloadURL https://cdn.jsdelivr.net/npm/@list-kr/namulink@latest/dist/NamuLink.user.js // @license MIT // -// @version 10.0.0 +// @version 10.1.0 // @author PiQuark6046 and contributors // // @match https://namu.wiki/* diff --git a/sources/src/index.ts b/sources/src/index.ts index c6ec771..f23f0c8 100644 --- a/sources/src/index.ts +++ b/sources/src/index.ts @@ -12,6 +12,13 @@ Win.Object.defineProperty = new Proxy(Win.Object.defineProperty, { && /^\/[0-9]+\/namuwiki\/(?!sidebar-box)/.test((Args[0] as TPowerLink).unitPath)) { return } + if (Args[1] === '__v_skip' && typeof Args[0] === 'object' && Args[0] !== null && 'render' in Args[0] + // eslint-disable-next-line @typescript-eslint/naming-convention + && typeof (Args[0] as { render: unknown }).render === 'function' && + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + ((Args[0].render as Function).toString().includes('head__link') || (Args[0].render as Function).toString().includes('head__badge'))) { + throw new Error() + } return Reflect.apply(Target, ThisArg, Args) } })