Class: TopNav

TopNav(window, document)

new TopNav(window, document)

Manage top (navigation) bar
Parameters:
Name Type Description
window object
document object
Source:

Members

(private, static) templateEmailBody

Template Email body.
Source:

(private, static) triggerEmailSend

Trigger Email send.
Source:

Methods

(private, static) changeBurnAfterReading()

when "burn after reading" is checked, disable discussion
Source:

(private, static) changeOpenDiscussion()

when discussion is checked, disable "burn after reading"
Source:

(static) clearAttachmentInput()

Clear the attachment input in the top navigation.
Source:

(static) clearPasswordInput()

Clear the password input in the top navigation
Source:

(private, static) clickNewPaste()

hides all messages and creates a new paste
Source:

(private, static) clickRetryButton(event)

retrys some callback registered before
Parameters:
Name Type Description
event Event
Source:

(static) collapseBar()

collapses the navigation bar, only if expanded
Source:

(private, static) displayQrCode()

Shows the QR code of the current paste (URL).
Source:

(private, static) downloadText()

download text
Source:

(static) getBurnAfterReading() → {bool}

returns the state of the burn after reading checkbox
Source:
Returns:
Type
bool

(static) getCustomAttachment() → {jQuery}

returns the element where custom attachments can be placed Used by AttachmentViewer when an attachment is cloned here.
Source:
Returns:
Type
jQuery

(static) getExpiration() → {int}

returns the currently set expiration time
Source:
Returns:
Type
int

(static) getFileList() → {FileList|null}

returns the currently selected file(s)
Source:
Returns:
Type
FileList | null

(static) getOpenDiscussion() → {bool}

returns the state of the discussion checkbox
Source:
Returns:
Type
bool

(static) getPassword() → {string}

returns the entered password
Source:
Returns:
Type
string

(static) hideAllButtons()

Hides all elements belonging to existing pastes
Source:

(static) hideBurnAfterReadingButtons()

hide all irrelevant buttons when viewing burn after reading paste
Source:

(static) hideCloneButton()

only hides the clone button
Source:

(static) hideCreateButtons()

shows all elements needed when creating a new paste
Source:

(static) hideCustomAttachment()

hides the custom attachment
Source:

(static) hideEmailButton()

hide the "email" button
Source:

(static) hideFileSelector()

hides the file selector in attachment
Source:

(static) hideQrCodeButton()

only hides the qr code button
Source:

(static) hideRawButton()

only hides the raw text button
Source:

(static) hideRawButton()

only hides the download text button
Source:

(static) hideRetryButton()

hides the "retry" button
Source:

(static) hideViewButtons()

Hides all navigation elements for viewing an existing paste
Source:

(static) highlightFileupload()

Highlight file upload
Source:

(static) init()

init navigation manager preloads jQuery elements
Source:

(static) isAttachmentReadonly() → {bool}

returns if attachment dropdown is readonly, not editable
Source:
Returns:
Type
bool

(private, static) rawText()

return raw text
Source:

(private, static) removeAttachment(event)

removes the existing attachment
Parameters:
Name Type Description
event Event
Source:

(static) resetInput()

Reset the top navigation back to it's default values.
Source:

(private, static) sendEmail(expirationDate, isBurnafterreading)

Send Email with current paste (URL).
Parameters:
Name Type Description
expirationDate Date | null date of expiration
isBurnafterreading bool whether it is burn after reading
Source:

(static) setFormat()

set the format on bootstrap templates in dropdown programmatically
Source:

(private, static) setLanguage(event)

saves the language in a cookie and reloads the page
Parameters:
Name Type Description
event Event
Source:

(static) setRetryCallback(callback)

Set a function to call when the retry button is clicked.
Parameters:
Name Type Description
callback function
Source:

(static) showCreateButtons()

shows all elements needed when creating a new paste
Source:

(static) showCustomAttachment()

shows the custom attachment
Source:

(static) showEmailbutton(optionalRemainingTimeInSeconds)

show the "email" button
Parameters:
Name Type Description
optionalRemainingTimeInSeconds int | undefined
Source:

(static) showNewPasteButton()

only shows the "new paste" button
Source:

(static) showRetryButton()

only shows the "retry" button
Source:

(static) showViewButtons()

Shows all navigation elements for viewing an existing paste
Source:

(private, static) updateExpiration(event)

set the expiration on bootstrap templates in dropdown
Parameters:
Name Type Description
event Event
Source:

(private, static) updateFormat(event)

set the format on bootstrap templates in dropdown from user interaction
Parameters:
Name Type Description
event Event
Source: