'use strict'
const { PuppeteerExtraPlugin } = require('puppeteer-extra-plugin')
const argsToIgnore = [
'--disable-extensions',
'--disable-default-apps',
'--disable-component-extensions-with-background-pages'
]
/**
* A CDP driver like puppeteer can make use of various browser launch arguments that are
* adversarial to mimicking a regular browser and need to be stripped when launching the browser.
*/
class Plugin extends PuppeteerExtraPlugin {
constructor(opts = {}) {
super(opts)
}
get name() {
return 'stealth/evasions/defaultArgs'
}
get requirements() {
return new Set(['runLast']) // So other plugins can modify launch options before
}
async beforeLaunch(options = {}) {
options.ignoreDefaultArgs = options.ignoreDefaultArgs || []
if (options.ignoreDefaultArgs === true) {
// that means the user explicitly wants to disable all default arguments
return
}
argsToIgnore.forEach(arg => {
if (options.ignoreDefaultArgs.includes(arg)) {
return
}
options.ignoreDefaultArgs.push(arg)
})
}
}
module.exports = function (pluginConfig) {
return new Plugin(pluginConfig)
}
module.exports.argsToIgnore = argsToIgnore
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ritesh-sudo/MCPJobSearch'
If you have feedback or need assistance with the MCP directory API, please join our Discord server