what a mess
This commit is contained in:
parent
12cacbada8
commit
4dd23f91ca
18 changed files with 333 additions and 287 deletions
|
@ -13,7 +13,7 @@ from sqlalchemy import *
|
|||
import gevent
|
||||
import redis
|
||||
import time
|
||||
from sys import stdout
|
||||
from sys import stdout, argv
|
||||
import faulthandler
|
||||
from json import loads
|
||||
|
||||
|
@ -116,4 +116,8 @@ def after_request(response):
|
|||
response.headers.add("X-Frame-Options", "deny")
|
||||
return response
|
||||
|
||||
if "load_chat" in argv or app.config["SERVER_NAME"] == 'localhost':
|
||||
from files.routes.chat import *
|
||||
|
||||
if "load_chat" not in argv:
|
||||
from files.routes import *
|
|
@ -7,6 +7,7 @@ const textbox = document.getElementById('input-text')
|
|||
const icon = document.getElementById('favicon')
|
||||
const vid = document.getElementById('vid').value
|
||||
const site_name = document.getElementById('site_name').value
|
||||
const slurreplacer = document.getElementById('slurreplacer').value
|
||||
|
||||
let notifs = 0;
|
||||
let scrolled_down = true;
|
||||
|
@ -38,7 +39,10 @@ function flash(){
|
|||
|
||||
socket.on('speak', function(json) {
|
||||
let text = json['text']
|
||||
let text_html = json['text_html']
|
||||
let text_html
|
||||
|
||||
if (slurreplacer == 'True') text_html = json['text_censored']
|
||||
else text_html = json['text_html']
|
||||
|
||||
if (text_html.includes(`<a href="/id/${vid}">`)){
|
||||
chatline.classList.add('chat-mention');
|
||||
|
@ -47,20 +51,30 @@ socket.on('speak', function(json) {
|
|||
chatline.classList.remove('chat-mention');
|
||||
};
|
||||
|
||||
notifs = notifs + 1;
|
||||
if (notifs == 1) {
|
||||
setTimeout(flash, 500);
|
||||
scrolled_down = (box.scrollHeight - box.scrollTop <= window.innerHeight-109)
|
||||
|
||||
let users = document.getElementsByClassName('userlink');
|
||||
let last_user = users[users.length-1].innerHTML;
|
||||
|
||||
if (last_user == json['username']) {
|
||||
document.getElementsByClassName('userlink')[0].classList.add('d-none')
|
||||
document.getElementsByClassName('avatar')[0].classList.add('d-none')
|
||||
document.getElementsByClassName('userlink')[0].href = '/@' + json['username']
|
||||
document.getElementsByClassName('userlink')[0].style.color = '#' + json['namecolor']
|
||||
document.getElementsByClassName('chat-line')[0].classList.remove('diff')
|
||||
}
|
||||
else {
|
||||
document.getElementsByClassName('avatar')[0].src = json['avatar']
|
||||
document.getElementsByClassName('chat-line')[0].classList.add('diff')
|
||||
}
|
||||
|
||||
scrolled_down = (box.scrollHeight - box.scrollTop <= window.innerHeight-109)
|
||||
document.getElementsByClassName('desktop-avatar')[0].src = json['avatar']
|
||||
document.getElementsByClassName('mobile-avatar')[0].src = json['avatar']
|
||||
document.getElementsByClassName('userlink')[0].href = '/@' + json['username']
|
||||
document.getElementsByClassName('userlink')[0].innerHTML = json['username']
|
||||
document.getElementsByClassName('userlink')[0].style.color = '#' + json['namecolor']
|
||||
document.getElementsByClassName('text')[0].innerHTML = text
|
||||
document.getElementsByClassName('chat-message')[0].innerHTML = text_html
|
||||
document.getElementById('chat-text').append(document.getElementsByClassName('chat-line')[0].cloneNode(true))
|
||||
document.getElementsByClassName('chat-message')[0].innerHTML = text_html.replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '')
|
||||
|
||||
let line = document.getElementsByClassName('chat-line')[0].cloneNode(true)
|
||||
bs_trigger(line)
|
||||
box.append(line)
|
||||
if (scrolled_down) box.scrollTo(0, box.scrollHeight)
|
||||
})
|
||||
|
||||
|
@ -78,7 +92,7 @@ function send() {
|
|||
}
|
||||
|
||||
function quote(t) {
|
||||
textbox.style.height = '80px'
|
||||
textbox.style.height = '50px'
|
||||
text = t.previousElementSibling.innerHTML.replace(/>/g, ">").replace(/\n/g, "\n>")
|
||||
textbox.value = '> ' + text + '\n\n@' + t.parentElement.previousElementSibling.innerHTML + ' '
|
||||
textbox.focus()
|
||||
|
|
|
@ -10,33 +10,6 @@ function pinned_timestamp(id) {
|
|||
if (!pintooltip.includes('until')) el.setAttribute("data-bs-original-title", `${pintooltip} until ${time}`)
|
||||
}
|
||||
|
||||
function expandDesktopImage(image) {
|
||||
document.getElementById("desktop-expanded-image").src = image.replace("200w_d.webp", "giphy.webp");
|
||||
document.getElementById("desktop-expanded-image-link").href = image;
|
||||
document.getElementById("desktop-expanded-image-wrap-link").href=image;
|
||||
};
|
||||
|
||||
function bs_trigger() {
|
||||
let tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
|
||||
tooltipTriggerList.map(function(element){
|
||||
return bootstrap.Tooltip.getOrCreateInstance(element);
|
||||
});
|
||||
|
||||
const popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));
|
||||
popoverTriggerList.map(function(popoverTriggerEl) {
|
||||
const popoverId = popoverTriggerEl.getAttribute('data-content-id');
|
||||
const contentEl = document.getElementById(popoverId);
|
||||
if (contentEl) {
|
||||
return bootstrap.Popover.getOrCreateInstance(popoverTriggerEl, {
|
||||
content: contentEl.innerHTML,
|
||||
html: true,
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
bs_trigger()
|
||||
|
||||
function popclick(author) {
|
||||
setTimeout(() => {
|
||||
let popover = document.getElementsByClassName("popover")
|
||||
|
|
|
@ -162,7 +162,7 @@ function post_reply(id){
|
|||
if (data && data["comment"]) {
|
||||
commentForm=document.getElementById('comment-form-space-'+id);
|
||||
commentForm.innerHTML = data["comment"].replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '').replace('comment-collapse-desktop d-none d-md-block','d-none').replace('border-left: 2px solid','padding-left:0;border-left: 0px solid');
|
||||
bs_trigger();
|
||||
bs_trigger(commentForm);
|
||||
}
|
||||
else {
|
||||
if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"];
|
||||
|
@ -200,6 +200,7 @@ function comment_edit(id){
|
|||
commentForm=document.getElementById('comment-text-'+id);
|
||||
commentForm.innerHTML = data["comment"].replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '')
|
||||
document.getElementById('cancel-edit-'+id).click()
|
||||
bs_trigger(commentForm);
|
||||
}
|
||||
else {
|
||||
if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"];
|
||||
|
@ -239,7 +240,7 @@ function post_comment(fullname){
|
|||
if (data && data["comment"]) {
|
||||
commentForm=document.getElementById('comment-form-space-'+fullname);
|
||||
commentForm.innerHTML = data["comment"].replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '');
|
||||
bs_trigger();
|
||||
bs_trigger(commentForm);
|
||||
}
|
||||
else {
|
||||
if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"];
|
||||
|
|
|
@ -29,12 +29,34 @@ function formkey() {
|
|||
else return null;
|
||||
}
|
||||
|
||||
if (typeof bs_trigger === 'undefined') {
|
||||
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
|
||||
|
||||
function bs_trigger(e) {
|
||||
let tooltipTriggerList = [].slice.call(e.querySelectorAll('[data-bs-toggle="tooltip"]'));
|
||||
tooltipTriggerList.map(function(element){
|
||||
return bootstrap.Tooltip.getOrCreateInstance(element);
|
||||
});
|
||||
|
||||
const popoverTriggerList = [].slice.call(e.querySelectorAll('[data-bs-toggle="popover"]'));
|
||||
popoverTriggerList.map(function(popoverTriggerEl) {
|
||||
const popoverId = popoverTriggerEl.getAttribute('data-content-id');
|
||||
const contentEl = e.getElementById(popoverId);
|
||||
if (contentEl) {
|
||||
return bootstrap.Popover.getOrCreateInstance(popoverTriggerEl, {
|
||||
content: contentEl.innerHTML,
|
||||
html: true,
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
bs_trigger(document)
|
||||
|
||||
|
||||
function expandDesktopImage(image) {
|
||||
document.getElementById("desktop-expanded-image").src = image.replace("200w_d.webp", "giphy.webp");
|
||||
document.getElementById("desktop-expanded-image-link").href = image;
|
||||
document.getElementById("desktop-expanded-image-wrap-link").href=image;
|
||||
};
|
||||
|
||||
function post_toast(t, url, reload, data) {
|
||||
t.disabled = true;
|
||||
|
|
|
@ -724,7 +724,7 @@ def sub_matcher_upper(match):
|
|||
return SLURS[match.group(0).lower()].upper()
|
||||
|
||||
def censor_slurs(body, logged_user):
|
||||
if not logged_user or logged_user.slurreplacer:
|
||||
if not logged_user or logged_user == 'chat' or logged_user.slurreplacer:
|
||||
body = slur_regex_upper.sub(sub_matcher_upper, body)
|
||||
body = slur_regex.sub(sub_matcher, body)
|
||||
return body
|
||||
|
|
|
@ -326,6 +326,10 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False):
|
|||
marsey.count += 1
|
||||
g.db.add(marsey)
|
||||
|
||||
if '#fortune' in sanitized:
|
||||
sanitized = sanitized.replace('#fortune', '')
|
||||
sanitized += '\n\n<p>' + random.choice(FORTUNE_REPLIES) + '</p>'
|
||||
|
||||
signal.alarm(0)
|
||||
|
||||
return sanitized
|
||||
|
|
|
@ -16,4 +16,3 @@ from .feeds import *
|
|||
from .awards import *
|
||||
from .giphy import *
|
||||
from .subs import *
|
||||
from .chat import *
|
|
@ -1,22 +1,23 @@
|
|||
import sys
|
||||
from files.helpers.const import SITE, SITE_FULL
|
||||
|
||||
if "load_chat" in sys.argv or SITE == 'localhost':
|
||||
import time
|
||||
from files.helpers.wrappers import auth_required
|
||||
from files.helpers.sanitize import sanitize
|
||||
from files.helpers.const import *
|
||||
from datetime import datetime
|
||||
from flask_socketio import SocketIO, emit
|
||||
from files.__main__ import app, limiter, cache
|
||||
from flask import render_template, make_response, send_from_directory, abort
|
||||
from flask import render_template, make_response, send_from_directory
|
||||
import sys
|
||||
import atexit
|
||||
|
||||
if SITE == 'localhost':
|
||||
socketio = SocketIO(app, async_mode='gevent', cors_allowed_origins=[SITE_FULL], logger=True, engineio_logger=True, debug=True)
|
||||
else:
|
||||
socketio = SocketIO(app, async_mode='gevent', cors_allowed_origins=[SITE_FULL])
|
||||
|
||||
typing = []
|
||||
online = []
|
||||
messages = cache.get('chat') or []
|
||||
|
||||
total = cache.get('total') or 0
|
||||
|
||||
@app.get("/chat")
|
||||
@auth_required
|
||||
|
@ -35,21 +36,24 @@ if "load_chat" in sys.argv or SITE == 'localhost':
|
|||
@limiter.limit("3/second;10/minute")
|
||||
@auth_required
|
||||
def speak(data, v):
|
||||
if v.is_banned: abort(403)
|
||||
global messages
|
||||
if v.is_banned: return '', 403
|
||||
global messages, total
|
||||
text = data[:1000].strip()
|
||||
if not text: abort(403)
|
||||
if not text: return '', 403
|
||||
text_html = sanitize(text)
|
||||
|
||||
data={
|
||||
"avatar": v.profile_url,
|
||||
"username":v.username,
|
||||
"namecolor":v.namecolor,
|
||||
"text":text,
|
||||
"text_html":sanitize(text),
|
||||
"text_html":text_html,
|
||||
"text_censored":censor_slurs(text_html, 'chat')
|
||||
}
|
||||
|
||||
messages.append(data)
|
||||
messages = messages[-500:]
|
||||
messages = messages[-20:]
|
||||
total += 1
|
||||
emit('speak', data, broadcast=True)
|
||||
return '', 204
|
||||
|
||||
|
@ -87,4 +91,5 @@ if "load_chat" in sys.argv or SITE == 'localhost':
|
|||
|
||||
def close_running_threads():
|
||||
cache.set('chat', messages)
|
||||
cache.set('total', total)
|
||||
atexit.register(close_running_threads)
|
|
@ -335,10 +335,6 @@ def api_comment(v):
|
|||
if v.agendaposter and not v.marseyawarded and parent_post.id not in ADMIGGERS:
|
||||
body = torture_ap(body, v.username)
|
||||
|
||||
if '#fortune' in body:
|
||||
body = body.replace('#fortune', '')
|
||||
body += '\n\n<p>' + random.choice(FORTUNE_REPLIES) + '</p>'
|
||||
|
||||
body_html = sanitize(body, comment=True)
|
||||
|
||||
if v.marseyawarded and parent_post.id not in ADMIGGERS and marseyaward_body_regex.search(body_html):
|
||||
|
|
|
@ -1034,10 +1034,6 @@ def submit_post(v, sub=None):
|
|||
else:
|
||||
return error("Image/Video files only.")
|
||||
|
||||
if '#fortune' in body:
|
||||
body = body.replace('#fortune', '')
|
||||
body += '\n\n<p>' + random.choice(FORTUNE_REPLIES) + '</p>'
|
||||
|
||||
body_html = sanitize(body)
|
||||
|
||||
if v.marseyawarded and marseyaward_body_regex.search(body_html):
|
||||
|
|
|
@ -1,95 +1,32 @@
|
|||
{% extends "default.html" %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta name="description" content="{{config('DESCRIPTION')}}">
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<meta name="author" content="">
|
||||
|
||||
<link id="favicon" rel="icon" type="image/png" href="/static/assets/images/{{SITE_NAME}}/icon.webp?v=1012">
|
||||
|
||||
{% block title %}
|
||||
<title>Chat</title>
|
||||
<meta name="description" content="Chat">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="border-right py-3 px-3">
|
||||
<span data-toggle="tooltip" data-placement="bottom" data-bs-title="Users online right now" title="Users online right now" class="text-muted">
|
||||
<i class="far fa-user fa-sm mr-1"></i>
|
||||
<span class="board-chat-count">0</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="chat-line-template" class="d-none">
|
||||
<div class="chat-line">
|
||||
<div class="d-flex align-items-center">
|
||||
<span class="rounded mb-auto d-none d-md-block chat-profile">
|
||||
<img class="desktop-avatar rounded-circle w-100">
|
||||
</span>
|
||||
<div class="pl-md-3 text-muted">
|
||||
<div>
|
||||
<img class="mobile-avatar profile-pic-30 mr-1 d-inline-block d-md-none" data-toggle="tooltip" data-placement="right">
|
||||
<a href="" class="font-weight-bold text-black userlink" target="_blank"></a>
|
||||
<div style="overflow:hidden">
|
||||
<span class="chat-message text-black text-break"></span>
|
||||
<span class="text d-none"></span>
|
||||
<button class="quote-btn btn d-inline-block pt-0" onclick="quote(this)"><i class="fas fa-reply" aria-hidden="true"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container py-0 chat-container">
|
||||
<div id="chat-window">
|
||||
<div id="chat-text" class="fullchat">
|
||||
{% for m in messages %}
|
||||
{% set text_html = m['text_html'] %}
|
||||
{% set link = '<a href="/id/' + v.id|string + '">' %}
|
||||
<div class="chat-line {% if link in text_html %}chat-mention{% endif %}">
|
||||
<div class="d-flex align-items-center">
|
||||
<span class="rounded mb-auto d-none d-md-block chat-profile">
|
||||
<img class="desktop-avatar rounded-circle w-100" src="{{m['avatar']}}">
|
||||
</span>
|
||||
<div class="pl-md-3 text-muted">
|
||||
<div>
|
||||
<img src="{{m['avatar']}}" class="mobile-avatar profile-pic-30 mr-1 d-inline-block d-md-none" data-toggle="tooltip" data-placement="right">
|
||||
<a class="font-weight-bold text-black userlink" style="color:#{{m['namecolor']}}" target="_blank" href="/@{{m['username']}}">{{m['username']}}</a>
|
||||
<div style="overflow:hidden">
|
||||
<span class="chat-message text-black text-break">{{text_html | safe}}</span>
|
||||
<span class="d-none">{{m['text']}}</span>
|
||||
<button class="btn d-inline-block pt-0" onclick="quote(this)"><i class="fas fa-reply" aria-hidden="true"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div id="system-template">
|
||||
<div class="system-line">
|
||||
<p class="message text-muted"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='message' class="d-none position-relative form-group d-flex pb-3">
|
||||
<div class="position-absolute text-muted text-small" style="bottom: -1.5rem; line-height: 1;">
|
||||
<span id="typing-indicator"></span>
|
||||
<span id="loading-indicator" class="d-none"></span>
|
||||
</div>
|
||||
<i class="btn btn-secondary mr-2 fas fa-smile-beam" style="padding-top:0.65rem" onclick="loadEmojis('input-text')" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-placement="bottom" title="Add Emoji"></i>
|
||||
<textarea id="input-text" minlength="1" maxlength="1000" type="text" class="form-control" placeholder="Message" autocomplete="off" autofocus rows="1"></textarea>
|
||||
<button id="chatsend" onclick="send()" class="btn btn-primary ml-3" type="submit">Send</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input id="vid" type="hidden" value="{{v.id}}">
|
||||
<input id="site_name" type="hidden" value="{{SITE_NAME}}">
|
||||
|
||||
<script data-cfasync="false" src="/chat.js?v=2"></script>
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=188">
|
||||
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=30">
|
||||
{% if v.css %}
|
||||
<link rel="stylesheet" href="/@{{v.username}}/css">
|
||||
{% endif %}
|
||||
|
||||
<style>
|
||||
#chat-window {
|
||||
max-height:calc(100vh - 300px);
|
||||
max-height:90vh;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.fullchat .chat-profile {
|
||||
#chat-window .chat-profile {
|
||||
min-width: 42px;
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
|
@ -109,24 +46,120 @@
|
|||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.profile-pic-30 {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.chat-message p {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.diff {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
* {
|
||||
#shrink * {
|
||||
font-size: 10px !important;
|
||||
}
|
||||
.fa-reply:before {
|
||||
font-size: 9px;
|
||||
}
|
||||
.diff {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
#input-text {
|
||||
max-height: 50px!important;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0!important;
|
||||
margin-left: 27px !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script src="/static/assets/js/bootstrap.js?v=245"></script>
|
||||
|
||||
{% include "header.html" %}
|
||||
|
||||
<div class="container {% if request.path=='/' or '/post/' in request.path or '/comment/' in request.path %}transparent{% endif %}">
|
||||
<div class="row justify-content-around" id="main-content-row">
|
||||
<div class="col h-100 {% block customPadding %}{% if request.path.startswith('/@') %}user-gutters{% else %}custom-gutters{% endif %}{% endblock %}" id="main-content-col">
|
||||
|
||||
<div class="border-right py-3 px-3">
|
||||
<span data-toggle="tooltip" data-placement="bottom" data-bs-title="Users online right now" title="Users online right now" class="text-muted">
|
||||
<i class="far fa-user fa-sm mr-1"></i>
|
||||
<span class="board-chat-count">0</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="chat-line-template" class="d-none">
|
||||
<div class="chat-line">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="pl-md-3 text-muted">
|
||||
<div>
|
||||
<img class="avatar pp20 mr-1" data-toggle="tooltip" data-placement="right">
|
||||
<a href="" class="font-weight-bold text-black userlink" target="_blank"></a>
|
||||
<div style="overflow:hidden">
|
||||
<span class="chat-message text-black text-break"></span>
|
||||
<span class="text d-none"></span>
|
||||
<button class="quote-btn btn d-inline-block py-0" onclick="quote(this)"><i class="fas fa-reply" aria-hidden="true"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="shrink">
|
||||
<div id="chat-window" class="container py-0">
|
||||
{% for m in messages %}
|
||||
{% set text_html = m['text_censored'] if v.slurreplacer else m['text_html'] %}
|
||||
{% set link = '<a href="/id/' + v.id|string + '">' %}
|
||||
{% set same = m['username'] == messages[loop.index-2]['username'] %}
|
||||
<div class="chat-line {% if link in text_html %}chat-mention{% endif %} {% if not same %}diff{% endif %}">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="pl-md-3 text-muted">
|
||||
<div>
|
||||
{% if not same %}<img src="{{m['avatar']}}" class="avatar pp20 mr-1" data-toggle="tooltip" data-placement="right">{% endif %}
|
||||
|
||||
<a class="{% if same %}d-none{% endif %} font-weight-bold text-black userlink" style="color:#{{m['namecolor']}}" target="_blank" href="/@{{m['username']}}">{{m['username']}}</a>
|
||||
|
||||
<div style="overflow:hidden">
|
||||
<span class="chat-message text-black text-break">{{text_html | safe}}</span>
|
||||
<span class="d-none">{{m['text']}}</span>
|
||||
<button class="btn d-inline-block py-0" onclick="quote(this)"><i class="fas fa-reply" aria-hidden="true"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div id='message' class="d-none position-relative form-group d-flex mt-4">
|
||||
<div class="position-absolute text-muted text-small" style="bottom: -1.5rem; line-height: 1;">
|
||||
<span id="typing-indicator"></span>
|
||||
<span id="loading-indicator" class="d-none"></span>
|
||||
</div>
|
||||
<i class="btn btn-secondary mr-2 fas fa-smile-beam" style="padding-top:0.65rem" onclick="loadEmojis('input-text')" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-placement="bottom" title="Add Emoji"></i>
|
||||
<textarea id="input-text" minlength="1" maxlength="1000" type="text" class="form-control" placeholder="Message" autocomplete="off" autofocus rows="1"></textarea>
|
||||
<button id="chatsend" onclick="send()" class="btn btn-primary ml-3" type="submit">Send</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="online" class="col sidebar text-left d-none d-lg-block pt-3 bg-white" style="max-width:300px">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="vid" type="hidden" value="{{v.id}}">
|
||||
<input id="site_name" type="hidden" value="{{SITE_NAME}}">
|
||||
<input id="slurreplacer" type="hidden" value="{{v.slurreplacer}}">
|
||||
|
||||
<script data-cfasync="false" src="/chat.js?v=4"></script>
|
||||
|
||||
<script>
|
||||
box.scrollTo(0, box.scrollHeight)
|
||||
|
@ -135,4 +168,6 @@
|
|||
{% include "emoji_modal.html" %}
|
||||
{% include "expanded_image_modal.html" %}
|
||||
|
||||
{% endblock %}
|
||||
<script src="/static/assets/js/lozad.js?v=240"></script>
|
||||
|
||||
</body>
|
|
@ -843,7 +843,7 @@
|
|||
|
||||
{% if v %}
|
||||
<script src="/static/assets/js/marked.js?v=249"></script>
|
||||
<script src="/static/assets/js/comments_v.js?v=262"></script>
|
||||
<script src="/static/assets/js/comments_v.js?v=263"></script>
|
||||
{% endif %}
|
||||
|
||||
<script src="/static/assets/js/clipboard.js?v=250"></script>
|
||||
|
@ -854,7 +854,7 @@
|
|||
|
||||
{% include "expanded_image_modal.html" %}
|
||||
|
||||
<script src="/static/assets/js/comments+submission_listing.js?v=253"></script>
|
||||
<script src="/static/assets/js/comments+submission_listing.js?v=254"></script>
|
||||
<script src="/static/assets/js/comments.js?v=253"></script>
|
||||
|
||||
<script>
|
||||
|
@ -885,8 +885,9 @@
|
|||
xhr.setRequestHeader('xhr', 'xhr');
|
||||
xhr.onload=function(){
|
||||
if (xhr.status==200) {
|
||||
document.getElementById(`morecomments-${cid}`).innerHTML = xhr.response.replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '');
|
||||
bs_trigger()
|
||||
let e = document.getElementById(`morecomments-${cid}`)
|
||||
e.innerHTML = xhr.response.replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '');
|
||||
bs_trigger(e)
|
||||
|
||||
{% if p %}
|
||||
comments = JSON.parse(localStorage.getItem("old-comment-counts")) || {}
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
<link rel="apple-touch-icon" sizes="180x180" href="/static/assets/images/{{SITE_NAME}}/icon.webp?v=1012">
|
||||
<link rel="manifest" href="/static/assets/manifest.json?v=1">
|
||||
<link rel="mask-icon" href="/static/assets/images/{{SITE_NAME}}/icon.webp?v=1012">
|
||||
<link id="favicon" rel="shortcut icon" href="/static/assets/images/{{SITE_NAME}}/icon.webp?v=1012">
|
||||
<link rel="shortcut icon" href="/static/assets/images/{{SITE_NAME}}/icon.webp?v=1012">
|
||||
<meta name="apple-mobile-web-app-title" content="{{SITE_NAME}}">
|
||||
<meta name="application-name" content="{{SITE_NAME}}">
|
||||
<meta name="msapplication-TileColor" content="#{{config('DEFAULT_COLOR')}}">
|
||||
|
@ -233,8 +233,6 @@
|
|||
{% block Banner %}
|
||||
{% if '@' not in request.path %}
|
||||
{% if v %}
|
||||
|
||||
{% if request.path != '/chat' %}
|
||||
{% if sub %}
|
||||
<img alt="/h/{{sub.name}} banner" role="button" data-bs-toggle="modal" data-bs-target="#expandImageModal" onclick="expandDesktopImage('{{sub.banner_url}}')" loading="lazy" src="{{sub.banner_url}}" width=100% style="object-fit:cover;max-height:25vw">
|
||||
{% elif SITE_NAME == 'Drama' %}
|
||||
|
@ -249,8 +247,6 @@
|
|||
<img alt="site banner" src="/static/assets/images/{{SITE_NAME}}/banner.webp?v=1042" width="100%">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
<a href="/login">
|
||||
<img class="banner" alt="site banner" src="/static/assets/images/{{SITE_NAME}}/cached.webp?v=1012" width="100%">
|
||||
|
@ -270,7 +266,7 @@
|
|||
{% block postNav %}
|
||||
{% endblock %}
|
||||
|
||||
<div class="container {% if request.path=='/' or '/post/' in request.path or '/comment/' in request.path %}transparent{% elif request.path == '/chat' %}pb-0{% endif %}">
|
||||
<div class="container {% if request.path=='/' or '/post/' in request.path or '/comment/' in request.path %}transparent{% endif %}">
|
||||
<div class="row justify-content-around" id="main-content-row">
|
||||
|
||||
<div class="col h-100 {% block customPadding %}{% if request.path.startswith('/@') %}user-gutters{% else %}custom-gutters{% endif %}{% endblock %}" id="main-content-col">
|
||||
|
@ -297,9 +293,6 @@
|
|||
{% block sidebar %}
|
||||
{% if home or sub and p %}
|
||||
{% include "sidebar_" + SITE_NAME + ".html" %}
|
||||
{% elif request.path == '/chat' %}
|
||||
<div id="online" class="col sidebar text-left d-none d-lg-block pt-3 bg-white" style="max-width:300px">
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
|
|
@ -256,7 +256,7 @@
|
|||
</div>
|
||||
</nav>
|
||||
|
||||
<script src="/static/assets/js/header.js?v=253"></script>
|
||||
<script src="/static/assets/js/header.js?v=254"></script>
|
||||
|
||||
{% if v and not err %}
|
||||
<div id="formkey" class="d-none">{{v.formkey}}</div>
|
||||
|
|
|
@ -999,8 +999,9 @@
|
|||
xhr.setRequestHeader('xhr', 'xhr');
|
||||
xhr.onload=function(){
|
||||
if (xhr.status==200) {
|
||||
document.getElementById(`viewmore-${offset}`).innerHTML = xhr.response.replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '');
|
||||
bs_trigger()
|
||||
let e = document.getElementById(`viewmore-${offset}`);
|
||||
e.innerHTML = xhr.response.replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '');
|
||||
bs_trigger(e)
|
||||
|
||||
comments = JSON.parse(localStorage.getItem("old-comment-counts")) || {}
|
||||
lastCount = comments['{{p.id}}']
|
||||
|
|
|
@ -445,5 +445,5 @@
|
|||
{% include "expanded_image_modal.html" %}
|
||||
|
||||
<script src="/static/assets/js/clipboard.js?v=240"></script>
|
||||
<script src="/static/assets/js/comments+submission_listing.js?v=253"></script>
|
||||
<script src="/static/assets/js/comments+submission_listing.js?v=254"></script>
|
||||
<script src="/static/assets/js/submission_listing.js?v=240"></script>
|
|
@ -3648,3 +3648,5 @@ down. I dont deserve to be shamed, im just a sad pathetic woman who cares about
|
|||
would.
|
||||
{[para]}
|
||||
My husband use to snore like a chainsaw then he got nose surgery and it was like white noise and then a cpap so nice and quiet. He farts so much and I HATE IT. He is so freaking proud of them, throws his leg in the air and pretends to kick start a bike while farting. Then he tries to crop dust me. Ive asked him to stop but Nada. Im am disgusted by it. We've both put on a lot of weight in the last few years and that doesn't repulse me but his hygiene and man funk do.
|
||||
{[para]}
|
||||
The only thing that is advanced from this thread is my stage 4 cancer from reading it.
|
Loading…
Add table
Add a link
Reference in a new issue