Add pre-load content filtering to your Nightmare scripts.
Require the library and pass the Nightmare library as a reference to attach the plugin actions:
var Nightmare = ;Nightmare;
Adds a prerequest call to
fn filtered to the URLs specified in
fn parameter must be a function that accepts details and a callback. When complete, the callback must specify a response object, even if it is empty. Note that
filter is of the same form and works in the same way that the Electron filter does. See the
onBeforeRequest documentation in the Electron documentation for more information.