Skip to content

fauna.ts

github-actions[bot] edited this page Feb 4, 2024 · 5 revisions

Functions

genusDropdown()void

Sets the genus dropdown based on creature data and current ecosystem.

albumDropdown()void

Generates dropdowns for album names

addInfo()void

Generates an additional information sentence based on selected criteria and displays it in a specified HTML element.

pageName()string

Generates a name to use for a wikilink.

genusProduces()

Populates the 'Produces' dropdown or text field based on the current genus and ecosystem.

hideSecGenderProps()void

Hides the weight and height of the second gender if none is given or if it is equal to the first gender.

specialNotes()void

Syncs the notes value to the discovery menu notes input or makes it visible for certain keywords.

specialNotesTextFunc()void

Handles additional observations that don't have the additional observations text.

hideCreaturePrio()

Shows or hides the creature priority radio buttons.

creaturePrio()string

Returns the selected value from the 'creature priority' radio buttons.

genderProps(property1Name, property2Name)void

Provides creature height and weight formatting.

bundlePropFunctions()void

Bundles property functions for gender, height, and weight.

hideAlbumEntry()void

Hides the album entry code and album actions buttons if pageData.catalogue is falsy, or shows them otherwise.

albumOtherExternal()string

This function puts the primary height of an album into the album entry.

noLineBreak()

Replaces line breaks in an input element's value with a single space. Then passes it to wikiCode function to generate wiki code.

generateGalleryArray()Array.<string>

Generates an array of strings representing the different pages in the gallery. If pageData.gender2 is defined, the function sets the genders according to the creaturePrio() system.

redirectPage()string | undefined

Gives the pagename of the redirect if it is not equal the real pagename.

genusDropdown() ⇒ void

Sets the genus dropdown based on creature data and current ecosystem.

Kind: global function

albumDropdown() ⇒ void

Generates dropdowns for album names

Kind: global function

addInfo() ⇒ void

Generates an additional information sentence based on selected criteria and displays it in a specified HTML element.

Kind: global function

pageName() ⇒ string

Generates a name to use for a wikilink.

Kind: global function
Returns: string -

  • The name generated for the wikilink.

genusProduces()

Populates the 'Produces' dropdown or text field based on the current genus and ecosystem.

Kind: global function

hideSecGenderProps() ⇒ void

Hides the weight and height of the second gender if none is given or if it is equal to the first gender.

Kind: global function

specialNotes() ⇒ void

Syncs the notes value to the discovery menu notes input or makes it visible for certain keywords.

Kind: global function
Example

// Example usage:
specialNotes();

specialNotesTextFunc() ⇒ void

Handles additional observations that don't have the additional observations text.

Kind: global function

hideCreaturePrio()

Shows or hides the creature priority radio buttons.

Kind: global function

creaturePrio() ⇒ string

Returns the selected value from the 'creature priority' radio buttons.

Kind: global function
Returns: string -

The value of the checked radio button.


genderProps(property1Name, property2Name) ⇒ void

Provides creature height and weight formatting.

Kind: global function

Param Type Description
property1Name string

The name of the first property to format.

property2Name string

The name of the second property to format.

bundlePropFunctions() ⇒ void

Bundles property functions for gender, height, and weight.

Kind: global function

hideAlbumEntry() ⇒ void

Hides the album entry code and album actions buttons if pageData.catalogue is falsy, or shows them otherwise.

Kind: global function

albumOtherExternal() ⇒ string

This function puts the primary height of an album into the album entry.

Kind: global function
Returns: string -

Returns the primary height with an "m" appended to it.


noLineBreak()

Replaces line breaks in an input element's value with a single space. Then passes it to wikiCode function to generate wiki code.

Kind: global function

generateGalleryArray() ⇒ Array.<string>

Generates an array of strings representing the different pages in the gallery. If pageData.gender2 is defined, the function sets the genders according to the creaturePrio() system.

Kind: global function
Returns: Array.<string> -

An array of strings representing the different pages in the gallery.


redirectPage() ⇒ string | undefined

Gives the pagename of the redirect if it is not equal the real pagename.

Kind: global function
Returns: string | undefined -

Returns the updated page name if the page has been renamed, otherwise returns undefined.