Files
vps-management-bot/node_modules/puppeteer-extra-plugin-stealth/evasions/navigator.plugins/plugins.js

19 lines
538 B
JavaScript
Raw Normal View History

2026-03-21 01:10:53 +08:00
/* global Plugin PluginArray */
/**
* Generate a convincing and functional PluginArray (with plugins) from scratch.
*
* Note: This is meant to be run in the context of the page.
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/NavigatorPlugins/plugins
* @see https://developer.mozilla.org/en-US/docs/Web/API/PluginArray
*/
module.exports.generatePluginArray = (utils, fns) => pluginsData => {
return fns.generateMagicArray(utils, fns)(
pluginsData,
PluginArray.prototype,
Plugin.prototype,
'name'
)
}