mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-19 19:14:53 +00:00
Format URLs
This commit is contained in:
parent
e6a9e01089
commit
c63944aad2
@ -114,6 +114,8 @@ $(function() {
|
||||
|
||||
// Adds the visual chat message to the message list
|
||||
function addChatMessage (data, options) {
|
||||
if (!data.message.trim().length) return;
|
||||
|
||||
// Don't fade the message in if there is an 'X was typing'
|
||||
var $typingMessages = getTypingMessages(data);
|
||||
options = options || {};
|
||||
@ -126,7 +128,7 @@ $(function() {
|
||||
.text(data.username)
|
||||
.css('color', getUsernameColor(data.username));
|
||||
var $messageBodyDiv = $('<span class="messageBody">')
|
||||
.text(data.message);
|
||||
.html(data.message);
|
||||
|
||||
var typingClass = data.typing ? 'typing' : '';
|
||||
var $messageDiv = $('<li class="message"/>')
|
||||
@ -185,7 +187,9 @@ $(function() {
|
||||
|
||||
// Prevents input from having injected markup
|
||||
function cleanInput (input) {
|
||||
return $('<div/>').text(input).text();
|
||||
var message = $('<div/>').text(input).text();
|
||||
message = Autolinker.link(message);
|
||||
return message;
|
||||
}
|
||||
|
||||
// Updates the typing event
|
||||
|
10
src/public/vendor/autolinker.min.js
vendored
Normal file
10
src/public/vendor/autolinker.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -24,7 +24,7 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">FattyChat</a>
|
||||
<a class="navbar-brand" href="javascript:void(0)">FattyChat</a>
|
||||
<span class="participants">
|
||||
<span class="glyphicon glyphicon-user"></span> <span id="participants"></span>
|
||||
</span>
|
||||
@ -175,6 +175,7 @@
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.5.5/clipboard.min.js"></script>
|
||||
<script type="text/javascript" src="vendor/jquery.noty.packaged.min.js"></script>
|
||||
<script type="text/javascript" src="vendor/autolinker.min.js"></script>
|
||||
<script src="/main.js"></script>
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user