harbour-weechatrelay/qml/js/utils.js
Mikko Ahlroth 840a50e54b Add licence details
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
2014-06-27 09:08:53 +03:00

13 lines
384 B
JavaScript

// Miscellaneous functions for generic use
// Escape strings for Text.StyledText
function escapeStyled(string) {
string = string.replace('&', '&');
string = string.replace('<', '&lt;');
return string.replace('>', '&gt;');
}
// Return StyledText in a specified color
function colored(color, string) {
return '<font color="' + color + '">' + string + '</font>';
}