feat: inject cookie remover script
This commit is contained in:
@@ -15,6 +15,7 @@ import { InterpreterSettings, RemoteBrowserOptions } from "../../types";
|
|||||||
import { WorkflowGenerator } from "../../workflow-management/classes/Generator";
|
import { WorkflowGenerator } from "../../workflow-management/classes/Generator";
|
||||||
import { WorkflowInterpreter } from "../../workflow-management/classes/Interpreter";
|
import { WorkflowInterpreter } from "../../workflow-management/classes/Interpreter";
|
||||||
import { getDecryptedProxyConfig } from '../../routes/proxy';
|
import { getDecryptedProxyConfig } from '../../routes/proxy';
|
||||||
|
import { getInjectableScript } from 'idcac-playwright';
|
||||||
chromium.use(stealthPlugin());
|
chromium.use(stealthPlugin());
|
||||||
|
|
||||||
|
|
||||||
@@ -168,6 +169,7 @@ export class RemoteBrowser {
|
|||||||
|
|
||||||
this.currentPage.on('framenavigated', (frame) => {
|
this.currentPage.on('framenavigated', (frame) => {
|
||||||
if (frame === this.currentPage?.mainFrame()) {
|
if (frame === this.currentPage?.mainFrame()) {
|
||||||
|
this.currentPage.evaluate(getInjectableScript())
|
||||||
this.socket.emit('urlChanged', this.currentPage.url());
|
this.socket.emit('urlChanged', this.currentPage.url());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user