ulixee / hero

The web browser built for scraping
MIT License
647 stars 32 forks source link

Feat configure plugins #281

Closed soundofspace closed 6 days ago

soundofspace commented 6 days ago

Support configuring core plugins and unblocked plugins. This is done through an object which uses plugin.id as key to index. Each plugin can have a custom config in there of type object. Config can also be true or false: true will always activate the plugin and skip shouldActivateCheck, false will always disable the plugin and skip shouldActivateCheck. Implementation in hero core is almost exact same as in https://github.com/ulixee/unblocked/pull/101 except some minor type differences. The options are passed in through hero constructor. Constructor now also has support to configure Unblocked plugin classes per hero session.