BlockerRunner

BlockerRunner

Blocker's command runner.

Constructor

new BlockerRunner(notifier)

Source:
Parameters:
Name Type Description
notifier BlockerNotifier_ notification sender.

Classes

BlockerRunner

Members

_notifier :BlockerNotifier_

Source:
Type:
  • BlockerNotifier_

Methods

(protected) _hblockNotifyException(state, e) → {boolean}

Description:
  • Helper for notifying exceptions that may occur while running hBlock.
Source:
Parameters:
Name Type Description
state BlockerState_ either State.ENABLING or State.DISABLING.
e Error exception to notify.
Returns:
true if hBlock is available, false otherwise.
Type
boolean

(async, protected) _runCommand(command) → {boolean}

Description:
  • Helper for running shell commands
Source:
Parameters:
Name Type Description
command string shell command to run.
Returns:
true if command ran successfully, false otherwise.
Type
boolean

destroy() → {void}

Description:
  • Destroys the object.
Source:
Returns:
Type
void

hblockAvailable() → {boolean}

Description:
  • Checks whether the hBlock executable is available or not. Notifies the user with a helpful message if it isn't.
Source:
Returns:
true if hBlock is available, false otherwise.
Type
boolean

(async) hblockDisable() → {boolean}

Description:
  • Disables hBlock.
Source:
Returns:
true if hBlock was disabled successfully, false otherwise.
Type
boolean

(async) hblockEnable() → {boolean}

Description:
  • Enables hBlock.
Source:
Returns:
true if hBlock was enabled successfully, false otherwise.
Type
boolean