Skip to content

Commit 7016584

Browse files
committed
fix: remove ProxySetHandlerTargetCheckAndReplace
1 parent a5c3f66 commit 7016584

1 file changed

Lines changed: 0 additions & 30 deletions

File tree

userscript/source/index.ts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -317,33 +317,6 @@ export function RunNamuLinkUserscript(BrowserWindow: typeof window, UserscriptNa
317317
return false
318318
}
319319

320-
function ProxySetHandlerTargetCheckAndReplace(Target: object, NewValue: string): boolean {
321-
const Record = Target as Record<string, unknown>
322-
323-
for (const PropertyName of Object.keys(Record)) {
324-
const Value = Record[PropertyName]
325-
const Descriptor = OriginalObjectGetOwnPropertyDescriptor(Target, PropertyName)
326-
327-
if (
328-
typeof Value === 'object' &&
329-
Value !== null &&
330-
typeof Descriptor?.get !== 'function'
331-
) {
332-
if (ProxySetHandlerTargetCheckAndReplace(Value, NewValue)) {
333-
return true
334-
}
335-
} else if (
336-
typeof Value === 'string' &&
337-
Value.includes('ader.naver.com')
338-
) {
339-
Record[PropertyName] = NewValue
340-
return true
341-
}
342-
}
343-
344-
return false
345-
}
346-
347320
function MatchesShape(Schema: unknown, Target: unknown): boolean {
348321
if (Schema === null || Target === null) {
349322
return Schema === Target
@@ -446,9 +419,6 @@ export function RunNamuLinkUserscript(BrowserWindow: typeof window, UserscriptNa
446419
BrowserWindow.document.dispatchEvent(new CustomEvent('PL2PlaceHolderProxy'))
447420
return
448421
}
449-
else if (ProxySetHandlerTargetCheckAndReplace(SetArgs[0], '')) {
450-
console.debug(`[${UserscriptName}]: Proxy set called for PowerLink Skeleton (target check and replace):`, SetArgs)
451-
}
452422
return OriginalReflectApply(OriginalSet, this, SetArgs)
453423
}
454424
}

0 commit comments

Comments
 (0)