Module: initializer

Methods

(inner) getInnerTextOrValue(element) → {string}

Gets the ``innerTextorvalue``` of an element.

Parameters:
NameTypeDescription
elementHTMLInputElement | HTMLElement

The element to get the string from.

Source:
Returns:

The string inside of the element

Type
string

(inner) initializer(cFig) → {void}

Initialization function used to automate the setup of inject passwords and registering events for various elements used by the program. This function is currently also needed to preform batch password generation.

Parameters:
NameTypeDescription
cFig

A simplePass configuration object

Source:
Requires:
Returns:
Type
void

(inner) injectSimplePass(passwordTarget, password, entropyTargetopt) → {void}

Injects the generated password and if necessary the corresponding password stats.

Parameters:
NameTypeAttributesDescription
passwordTargetHTMLElement | HTMLInputElement

The element that the password will be injected into.

passwordstring | strengthCheckedPassword

The password or Strength Check Password object to inject into the password target.

entropyTargetHTMLElement | HTMLInputElement | null<optional>

The element that the entropy calculation will be inserted into.

Source:
Requires:
  • module:setInnerTextOrValue
  • module:injectStrengthStats
Returns:
Type
void

(inner) injectStrengthStats(password, elements)

Injects password strength stats into provided elements.

Parameters:
NameTypeDescription
passwordstrengthCheckedPassword

The strength checked password object

elementsobject

An object defining the HTML Elements to inject the stats into.

Source:
Requires:
  • module:setInnerTextOrValue

(inner) setInnerTextOrValue(element, value) → {void}

Sets the innerText or value of an element.

Parameters:
NameTypeDescription
elementHTMLElement | HTMLInputElement

The element that the string will be set in

valuestring

The string to set inside of the element.

Source:
Returns:
Type
void