Skip to main content
Glama
by Ritesh-sudo
index.js1.16 kB
'use strict' const { PuppeteerExtraPlugin } = require('puppeteer-extra-plugin') const withUtils = require('../_utils/withUtils') /** * Set the hardwareConcurrency to 4 (optionally configurable with `hardwareConcurrency`) * * @see https://arh.antoinevastel.com/reports/stats/osName_hardwareConcurrency_report.html * * @param {Object} [opts] - Options * @param {number} [opts.hardwareConcurrency] - The value to use in `navigator.hardwareConcurrency` (default: `4`) */ class Plugin extends PuppeteerExtraPlugin { constructor(opts = {}) { super(opts) } get name() { return 'stealth/evasions/navigator.hardwareConcurrency' } get defaults() { return { hardwareConcurrency: 4 } } async onPageCreated(page) { await withUtils(page).evaluateOnNewDocument( (utils, { opts }) => { utils.replaceGetterWithProxy( Object.getPrototypeOf(navigator), 'hardwareConcurrency', utils.makeHandler().getterValue(opts.hardwareConcurrency) ) }, { opts: this.opts } ) } } module.exports = function (pluginConfig) { return new Plugin(pluginConfig) }

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