remove /old_chat (needless bloat)
parent
268e19bf00
commit
60eaa5d282
|
@ -1,7 +1,5 @@
|
|||
const SITE_FULL_IMAGES = document.getElementById('SITE_FULL_IMAGES').value
|
||||
|
||||
const is_chat = (location.pathname == '/chat' || location.pathname == '/old_chat')
|
||||
|
||||
function getMessageFromJsonData(success, json) {
|
||||
let message = success ? "Success!" : "Error, please try again later";
|
||||
let key = success ? "message" : "error";
|
||||
|
@ -508,7 +506,7 @@ function handle_files(input, newfiles) {
|
|||
return
|
||||
}
|
||||
|
||||
if (!is_chat) {
|
||||
if (location.pathname != '/chat') {
|
||||
for (const file of newfiles) {
|
||||
insertText(ta, `[${file.name}]`);
|
||||
}
|
||||
|
|
|
@ -420,7 +420,7 @@ function populate_speed_emoji_modal(results, textbox)
|
|||
close_inline_speed_emoji_modal()
|
||||
textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "gi"), `:${name}: `)
|
||||
textbox.focus()
|
||||
if (!is_chat){
|
||||
if (location.pathname != '/chat'){
|
||||
markdown(textbox)
|
||||
}
|
||||
});
|
||||
|
|
|
@ -66,18 +66,6 @@ def chat(v):
|
|||
else:
|
||||
return render_template("chat.html", v=v, messages=displayed_messages)
|
||||
|
||||
@app.get("/old_chat")
|
||||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
|
||||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@is_not_permabanned
|
||||
def old_chat(v):
|
||||
if not v.allowed_in_chat:
|
||||
abort(403, CHAT_ERROR_MESSAGE)
|
||||
|
||||
displayed_messages = {k: val for k, val in messages.items() if val["user_id"] not in v.userblocks}
|
||||
|
||||
return render_template("chat.html", v=v, messages=displayed_messages)
|
||||
|
||||
@socketio.on('speak')
|
||||
@is_not_banned_socketio
|
||||
def speak(data, v):
|
||||
|
|
|
@ -391,7 +391,7 @@
|
|||
</li>
|
||||
{% endif %}
|
||||
<li class="mt-3">
|
||||
{% if request.path.endswith("/chat") or request.path.endswith("/old_chat") %}
|
||||
{% if request.path.endswith("/chat") %}
|
||||
<h5 class="ml-3">Users Online</h5>
|
||||
<div id="online3" class="col text-left d-lg-none bg-white mb-6 pb-6" style="max-width:300px"></div>
|
||||
<br><br><br><br>
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if request.path.endswith('/chat') or request.path.endswith('/old_chat') %}
|
||||
{% if request.path.endswith('/chat') %}
|
||||
<link rel="stylesheet" href="{{'css/chat.css' | asset}}">
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -20,9 +20,6 @@ server {
|
|||
location /chat {
|
||||
proxy_pass http://localhost:5001/chat;
|
||||
}
|
||||
location /old_chat {
|
||||
proxy_pass http://localhost:5001/old_chat;
|
||||
}
|
||||
location =/offline.html {
|
||||
alias /d/files/templates/errors/offline.html;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue