840a50e54b
Insert copyright statements Implemented CRUD for connections Refactor C++ connection side, create debugview and connect C++ to UI Implement SSL verification, reconnection, import moment.js, refactor UI logic Storing SSL certificate for later use now works Add missing comments Follow the end of a TextListComponent if view was already at bottom Initial protocol stubs for WeeChat protocol Add README
13 lines
384 B
JavaScript
13 lines
384 B
JavaScript
// Miscellaneous functions for generic use
|
|
|
|
// Escape strings for Text.StyledText
|
|
function escapeStyled(string) {
|
|
string = string.replace('&', '&');
|
|
string = string.replace('<', '<');
|
|
return string.replace('>', '>');
|
|
}
|
|
|
|
// Return StyledText in a specified color
|
|
function colored(color, string) {
|
|
return '<font color="' + color + '">' + string + '</font>';
|
|
}
|