1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-11-10 15:18:52 +01:00

Code simplification

This commit is contained in:
kkapsner 2024-08-15 16:59:20 +02:00
parent 91dd283b9a
commit cee0f75293

View File

@ -344,15 +344,11 @@
let changed;
if (type ==="value"){
if (changedFunction.fakeGenerator){
const generated = changedFunction.fakeGenerator(checker, original, windowToProcess);
if ((changedFunction.exportOptions || {}).allowCallbacks){
changed = extension.exportFunctionWithName(
changedFunction.fakeGenerator(checker, original, windowToProcess),
windowToProcess,
original.name
);
changed = extension.exportFunctionWithName(generated, windowToProcess, original.name);
}
else {
const generated = changedFunction.fakeGenerator(checker, original, windowToProcess);
changed = extension.createProxyFunction(windowToProcess, original, generated);
}
}