fix(observer): function declaration → var expression — strict mode 크래시 수정 (v0.5.86)

This commit is contained in:
Variet Worker
2026-04-19 07:41:04 +09:00
parent 498683c977
commit 12095f36a4
3 changed files with 6 additions and 6 deletions

View File

@@ -1081,11 +1081,11 @@ export function generateApprovalObserverScript(_port: number): string {
_sent[groupKey]={rid:rid,ts:now};
for(var mk=0;mk<bidList.length;mk++)_sent[bidList[mk]]={rid:rid,ts:now};
// v26: Deferred context (string match, not regex — avoids template literal escaping issues)
function _isGenericDesc(d) {
// v26: Deferred context (string match, not regex)
var _isGenericDesc = function(d) {
var t = d.trim().toLowerCase();
return t === 'always run' || t === 'run' || t === 'allow' || t === 'accept' || t === 'retry' || t === txt.toLowerCase();
}
};
// v26: Deferred context ??if desc is generic ("Always run", button text only),
// delay 500ms and re-extract to allow DOM rendering to complete
var isGenericDesc = _isGenericDesc(desc);