canopy/www/doc/client/chatPostprocessor.html

1803 lines
18 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: chatPostprocessor</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: chatPostprocessor</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>chatPostprocessor<span class="signature">(client)</span><span class="type-signature"></span></h2>
<div class="class-description">Class contianing client-side message post-processing code</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="chatPostprocessor"><span class="type-signature"></span>new chatPostprocessor<span class="signature">(client)</span><span class="type-signature"></span></h4>
<div class="description">
Instantiates a new Chat Post-Processor object
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>client</code></td>
<td class="type">
<span class="param-type"><a href="channel.html">channel</a></span>
</td>
<td class="description last">Parent client Management Object</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line20">line 20</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="client"><span class="type-signature"></span>client<span class="type-signature"></span></h4>
<div class="description">
Parent Client Management Object
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line29">line 29</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="addWhitespace"><span class="type-signature"></span>addWhitespace<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Injects invisible whitespace in long-ass words to prevent fucking up the chat buffer size
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line417">line 417</a>
</li></ul></dd>
</dl>
<h4 class="name" id="handleChatType"><span class="type-signature"></span>handleChatType<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Marks chat nodes in-case of non-standard chat types
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line581">line 581</a>
</li></ul></dd>
</dl>
<h4 class="name" id="injectBody"><span class="type-signature"></span>injectBody<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Injects word objects into chat-entry as proper DOM Nodes
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line120">line 120</a>
</li></ul></dd>
</dl>
<h4 class="name" id="postprocess"><span class="type-signature"></span>postprocess<span class="signature">(chatEntry, rawData)</span><span class="type-signature"> &rarr; {Node}</span></h4>
<div class="description">
Post-Processes a single message from the server and returns a presntable DOM Node
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>chatEntry</code></td>
<td class="type">
<span class="param-type">Node</span>
</td>
<td class="description last">Chat entry generated by initial chatBox method</td>
</tr>
<tr>
<td class="name"><code>rawData</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Raw data from server</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line38">line 38</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Post-Processed Chat Entry
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Node</span>
</dd>
</dl>
<h4 class="name" id="processBold"><span class="type-signature"></span>processBold<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Processes in-line Bold/Strong text
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line527">line 527</a>
</li></ul></dd>
</dl>
<h4 class="name" id="processChannelNames"><span class="type-signature"></span>processChannelNames<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Processes clickable channel names in chat
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line360">line 360</a>
</li></ul></dd>
</dl>
<h4 class="name" id="processCommandExamples"><span class="type-signature"></span>processCommandExamples<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Processes clickable command examples in chat
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line325">line 325</a>
</li></ul></dd>
</dl>
<h4 class="name" id="processFilter"><span class="type-signature"></span>processFilter<span class="signature">(delimiter, cb)</span><span class="type-signature"> &rarr; {Array}</span></h4>
<div class="description">
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
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>delimiter</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">delimiter to search string by</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback function to run against found strings</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line450">line 450</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
- list of found instances of filter
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
</dd>
</dl>
<h4 class="name" id="processItalics"><span class="type-signature"></span>processItalics<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Processes in-line Italics
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line539">line 539</a>
</li></ul></dd>
</dl>
<h4 class="name" id="processLinks"><span class="type-signature"></span>processLinks<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Processes clickable links and embedded media
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line551">line 551</a>
</li></ul></dd>
</dl>
<h4 class="name" id="processQoute"><span class="type-signature"></span>processQoute<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Processes qouted text in chat
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line315">line 315</a>
</li></ul></dd>
</dl>
<h4 class="name" id="processSpoilers"><span class="type-signature"></span>processSpoilers<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Processes in-line spoilers
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line504">line 504</a>
</li></ul></dd>
</dl>
<h4 class="name" id="processStrikethrough"><span class="type-signature"></span>processStrikethrough<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Processes in-line Strike-through
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line515">line 515</a>
</li></ul></dd>
</dl>
<h4 class="name" id="processUsernames"><span class="type-signature"></span>processUsernames<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Processes clickable username callouts in chat
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line395">line 395</a>
</li></ul></dd>
</dl>
<h4 class="name" id="splitMessage"><span class="type-signature"></span>splitMessage<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Splits message into an array of Word Objects for further processing
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chatPostprocessor.js.html">chatPostprocessor.js</a>, <a href="chatPostprocessor.js.html#line93">line 93</a>
</li></ul></dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="addURLPopup.html">addURLPopup</a></li><li><a href="cPanel.html">cPanel</a></li><li><a href="channel.html">channel</a></li><li><a href="chatBox.html">chatBox</a></li><li><a href="chatPostprocessor.html">chatPostprocessor</a></li><li><a href="clearPopup.html">clearPopup</a></li><li><a href="commandPreprocessor.html">commandPreprocessor</a></li><li><a href="commandProcessor.html">commandProcessor</a></li><li><a href="defaultTitlesPopup.html">defaultTitlesPopup</a></li><li><a href="emotePanel.html">emotePanel</a></li><li><a href="hlsBase.html">hlsBase</a></li><li><a href="hlsLiveStreamHandler.html">hlsLiveStreamHandler</a></li><li><a href="mediaHandler.html">mediaHandler</a></li><li><a href="newPlaylistPopup.html">newPlaylistPopup</a></li><li><a href="nullHandler.html">nullHandler</a></li><li><a href="panelObj.html">panelObj</a></li><li><a href="player.html">player</a></li><li><a href="playlistManager.html">playlistManager</a></li><li><a href="poppedPanel.html">poppedPanel</a></li><li><a href="queuePanel.html">queuePanel</a></li><li><a href="rawFileBase.html">rawFileBase</a></li><li><a href="rawFileHandler.html">rawFileHandler</a></li><li><a href="renamePopup.html">renamePopup</a></li><li><a href="reschedulePopup.html">reschedulePopup</a></li><li><a href="schedulePopup.html">schedulePopup</a></li><li><a href="settingsPanel.html">settingsPanel</a></li><li><a href="userList.html">userList</a></li><li><a href="youtubeEmbedHandler.html">youtubeEmbedHandler</a></li></ul><h3>Global</h3><ul><li><a href="global.html#onYouTubeIframeAPIReady">onYouTubeIframeAPIReady</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> on Sat Sep 06 2025 01:36:01 GMT-0400 (Eastern Daylight Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>