Class: chatPostprocessor

chatPostprocessor(client)

Class contianing client-side message post-processing code

Constructor

new chatPostprocessor(client)

Instantiates a new Chat Post-Processor object
Parameters:
Name Type Description
client channel Parent client Management Object
Source:

Members

client

Parent Client Management Object
Source:

Methods

addWhitespace()

Injects invisible whitespace in long-ass words to prevent fucking up the chat buffer size
Source:

handleChatType()

Marks chat nodes in-case of non-standard chat types
Source:

injectBody()

Injects word objects into chat-entry as proper DOM Nodes
Source:

postprocess(chatEntry, rawData) → {Node}

Post-Processes a single message from the server and returns a presntable DOM Node
Parameters:
Name Type Description
chatEntry Node Chat entry generated by initial chatBox method
rawData Object Raw data from server
Source:
Returns:
Post-Processed Chat Entry
Type
Node

processBold()

Processes in-line Bold/Strong text
Source:

processChannelNames()

Processes clickable channel names in chat
Source:

processCommandExamples()

Processes clickable command examples in chat
Source:

processFilter(delimiter, cb) → {Array}

Searches for text in-between a specific delimiter and runs a given callback against it Internal command used by several text filters to prevent code re-writes
Parameters:
Name Type Description
delimiter String delimiter to search string by
cb function Callback function to run against found strings
Source:
Returns:
- list of found instances of filter
Type
Array

processItalics()

Processes in-line Italics
Source:
Processes clickable links and embedded media
Source:

processQoute()

Processes qouted text in chat
Source:

processSpoilers()

Processes in-line spoilers
Source:

processStrikethrough()

Processes in-line Strike-through
Source:

processUsernames()

Processes clickable username callouts in chat
Source:

splitMessage()

Splits message into an array of Word Objects for further processing
Source: