mirror of
https://github.com/KevinMidboe/zoff.git
synced 2026-02-13 04:49:36 +00:00
Namechanges
This commit is contained in:
4
static/dist/main.min.js
vendored
4
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -4,7 +4,10 @@ var Chat = {
|
|||||||
{
|
{
|
||||||
if(data.value.length > 150)
|
if(data.value.length > 150)
|
||||||
return;
|
return;
|
||||||
if($(".tab a.active").attr("href") == "#all_chat")
|
if(data.value.startsWith("/name ")){
|
||||||
|
socket.emit("namechange", data.value.substring(6));
|
||||||
|
}
|
||||||
|
else if($(".tab a.active").attr("href") == "#all_chat")
|
||||||
socket.emit("all,chat", data.value);
|
socket.emit("all,chat", data.value);
|
||||||
else
|
else
|
||||||
socket.emit("chat", data.value);
|
socket.emit("chat", data.value);
|
||||||
|
|||||||
@@ -181,3 +181,9 @@ var Helper = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
String.prototype.startsWith = function(searchString, position) {
|
||||||
|
position = position || 0;
|
||||||
|
return this.indexOf(searchString, position) === position;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user