pull/124/head
Aevann 2023-02-17 16:21:16 +02:00
commit fa836ee549
13 changed files with 103 additions and 27 deletions

View File

@ -3014,9 +3014,6 @@ pre {
a.dropdown-toggle:hover {
text-decoration: none;
}
.comment-text ul li ul {
padding-left: 0;
}
ul.no-bullets {
list-style-type: none;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -196,6 +196,7 @@ textbox.addEventListener("keyup", function(e) {
socket.on('online', function(data){
document.getElementsByClassName('board-chat-count')[0].innerHTML = data[0].length
document.getElementById('chat-count-header-bar').innerHTML = data[0].length
const admin_level = parseInt(document.getElementById('admin_level').value)
let online = ''
let online2 = '<b>Users Online</b>'

View File

@ -444,7 +444,9 @@ function populate_speed_emoji_modal(results, textbox)
speed_carot_modal.style.display = "none";
textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "g"), `:${result}:`)
textbox.focus()
markdown(textbox)
if (document.location.pathname != '/chat'){
markdown(textbox)
}
});
// Pack
emoji_option.appendChild(emoji_option_img);

View File

@ -0,0 +1,37 @@
/* addFormattingCopyButtons(): creates a button in the first column of each row of a table
that copies the text in the second column of that row */
function addFormattingCopyButtons() {
var allTablesGenerateCopyButtons = document.getElementsByClassName('generate-copy-buttons')
for (let table = 0; table < allTablesGenerateCopyButtons.length; table++) {
if(allTablesGenerateCopyButtons[table].tagName != 'TABLE') {
continue;
}
for (var i = 1, row; row = allTablesGenerateCopyButtons[table].rows[i]; i++) {
let textCopyButton = document.createElement("button");
textCopyButton.setAttribute("type", "button");
textCopyButton.className = "btn caction py-0 nobackground px-1 text-muted copy-link";
/* replace HTML newlines with text newlines */
var cleanedText = row.cells[1].cloneNode(true)
cleanedText.innerHTML = cleanedText.innerHTML.replace(/<br>/gi, "\n")
/* remove lots of extraneous tabs */
cleanedText = cleanedText.textContent.replace(/\t/g,'');
textCopyButton.setAttribute("data-clipboard-text", cleanedText);
copyIcon = document.createElement("i");
copyIcon.className = "fas fa-copy";
textCopyButton.insertAdjacentElement('afterbegin', copyIcon)
row.cells[0].appendChild(textCopyButton);
}
}
}
addFormattingCopyButtons();

View File

@ -3,6 +3,7 @@ import time
import uuid
from flask_socketio import SocketIO, emit
from flask import request
from files.helpers.actions import *
from files.helpers.alerts import *
@ -22,6 +23,7 @@ socketio = SocketIO(
typing = []
online = []
sessions = []
cache.set(CHAT_ONLINE_CACHE_KEY, len(online), timeout=0)
muted = cache.get(f'muted') or {}
messages = cache.get(f'messages') or {}
@ -132,6 +134,13 @@ def refresh_online():
@admin_level_required(PERMS['CHAT'])
def connect(v):
if any(v.id in session for session in sessions) and [v.username, v.id, v.name_color] not in online:
# user has previous running sessions with a different username or name_color
for chat_user in online:
if(v.id == chat_user[1]):
online.remove(chat_user)
sessions.append([v.id, request.sid])
if [v.username, v.id, v.name_color] not in online:
online.append([v.username, v.id, v.name_color])
@ -143,13 +152,20 @@ def connect(v):
@socketio.on('disconnect')
@admin_level_required(PERMS['CHAT'])
def disconnect(v):
if [v.username, v.id, v.name_color] in online:
online.remove([v.username, v.id, v.name_color])
refresh_online()
if ([v.id, request.sid]) in sessions:
sessions.remove([v.id, request.sid])
if any(v.id in session for session in sessions):
# user has other running sessions
return '', 204
for chat_user in online:
if(v.id == chat_user[1]):
online.remove(chat_user)
if chat_user[0] in typing:
typing.remove(chat_user[0])
refresh_online()
if v.username in typing:
typing.remove(v.username)
return '', 204
@socketio.on('typing')

View File

@ -193,25 +193,31 @@
{% endif %}
{% if c.notif_utc %}
<span id="timestamp-{{c.id}}" data-nonce="{{g.nonce}}" data-onmouseover="timestamp(this, '{{c.notif_utc}}')" data-bs-toggle="tooltip" data-bs-placement="bottom" class="time-stamp">&nbsp;{{c.age_string}}</span>
<span id="timestamp-{{c.id}}" data-nonce="{{g.nonce}}" data-onmouseover="timestamp(this, '{{c.notif_utc}}')" data-bs-toggle="tooltip" data-bs-placement="bottom" class="time-stamp d-inline-block">&nbsp;{{c.age_string}}</span>
{% elif c.created_utc %}
<span id="timestamp-{{c.id}}" data-nonce="{{g.nonce}}" data-onmouseover="timestamp(this, '{{c.created_utc}}')" data-bs-toggle="tooltip" data-bs-placement="bottom" class="time-stamp">&nbsp;{{c.age_string}}</span>
<span id="timestamp-{{c.id}}" data-nonce="{{g.nonce}}" data-onmouseover="timestamp(this, '{{c.created_utc}}')" data-bs-toggle="tooltip" data-bs-placement="bottom" class="time-stamp d-inline-block">&nbsp;{{c.age_string}}</span>
{% endif %}
{% if c.edited_utc %}
<span class="time-edited" id="time-edit-{{c.id}}" data-nonce="{{g.nonce}}" data-onmouseover="timestamp(this, '{{c.edited_utc}}')"><span>&#183;</span> <span class="font-italic">Edited {{c.edited_string}}</span></span>
<span class="time-edited" id="time-edit-{{c.id}}" data-nonce="{{g.nonce}}" data-onmouseover="timestamp(this, '{{c.edited_utc}}')"><span>&#183;</span> <span class="font-italic d-inline-block">Edited {{c.edited_string}}</span></span>
{% endif %}
{% if c.treasure_amount and c.treasure_amount != '0' %}
{% if c.treasure_amount.startswith('l') %}
<img class="treasure" loading="lazy" alt="treasure" src="/i/treasure_tickets.webp" width="20" height="20">
<em>Found {{c.treasure_amount.replace('l', '')}} Lottershe Tickets!</em>
<span class="d-inline-block">
<img class="treasure" loading="lazy" alt="treasure" src="/i/treasure_tickets.webp" width="20" height="20">
<em>Found {{c.treasure_amount.replace('l', '')}} Lottershe Tickets!</em>
</span>
{% elif '-' in c.treasure_amount %}
<img class="treasure" loading="lazy" alt="treasure" src="/i/treasure_mimic.webp" width="20" height="20">
<em>A Mimic Ate {{c.treasure_amount.replace('-', '')}} Coins!</em>
<span class="d-inline-block">
<img class="treasure" loading="lazy" alt="treasure" src="/i/treasure_mimic.webp" width="20" height="20">
<em>A Mimic Ate {{c.treasure_amount.replace('-', '')}} Coins!</em>
</span>
{% else %}
<img class="treasure" loading="lazy" alt="treasure" src="/i/treasure_coins.webp" width="20" height="20">
<em>Found {{c.treasure_amount}} Coins!</em>
<span class="d-inline-block">
<img class="treasure" loading="lazy" alt="treasure" src="/i/treasure_coins.webp" width="20" height="20">
<em>Found {{c.treasure_amount}} Coins!</em>
</span>
{% endif %}
{% endif %}

View File

@ -5,7 +5,7 @@
<div class="ml-2">You can use Markdown formatting:</div>
<div class="overflow-x-auto mt-3"><table class="table table-striped mb-5">
<div class="overflow-x-auto mt-3"><table class="table table-striped mb-5 generate-copy-buttons">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
@ -237,7 +237,7 @@ And we allow custom HTML in most places:
<h4 class="mt-2">Allowed Tags</h4>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<div class="overflow-x-auto"><table class="table table-striped mb-5 generate-copy-buttons">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
@ -626,4 +626,12 @@ line breaks
</tbody>
</table></div>
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Text copied to clipboard
</div>
</div>
<script defer src="{{'js/vendor/clipboard.js' | asset}}"></script>
<script defer src="{{'js/formatting.js' | asset}}"></script>
{% endblock %}

View File

@ -157,7 +157,7 @@
<li class="nav-item d-none d-lg-flex align-items-center justify-content-center text-center mx-1">
<a class="nav-link position-relative" href="/chat">
<i class="fas fa-messages" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Chat"></i>
<b class="text-lg" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Users in chat right now">
<b id="chat-count-header-bar" class="text-lg" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Users in chat right now">
{{loggedin_chat}}
</b>
</a>

View File

@ -33,14 +33,14 @@
<li>Also no reposts of famous videos (unless you have a more HQ version, have a different POV, or are doing a writeup on it). These are listed below.</li>
</ul>
<h3>FAMOUS VIDEOS:</h3>
<p><a href="https://watchpeopledie.tv/h/suicide/post/14428/ronnie-mcnutt-suicide-no-watermark">Ronnie McNutt's suicide</a></p>
<p><a href="https://watchpeopledie.tv/h/suicide/post/23814/ronnie-mcnutts-suicide-6-minutes-no">Ronnie McNutt's suicide</a></p>
<p><a href="https://watchpeopledie.tv/h/shooting/post/5/ima-just-leave-this-post-that">The Christchurch shooting</a></p>
<p><a href="https://watchpeopledie.tv/h/shooting/post/22653/buffalo-mass-shooting-full-livestream-video">The Buffalo shooting</a></p>
<p><a href="https://watchpeopledie.tv/h/bladed/post/17212/murders-of-louisa-vesterager-jespersen-and">The beheadings of Louisa Vesterager Jespersen and Maren Ueland</a></p>
<p><a href="https://watchpeopledie.tv/h/suicide/post/21780/budd-dwyer-full-video">Budd Dwyer's live TV suicide</a></p>
<p><a href="https://watchpeopledie.tv/h/suicide/post/16839/1444-korablev-gleb-vyacheslavovich-suicide-video">1444 (Russian man shoots himself on his couch)</a></p>
<p><a href="https://watchpeopledie.tv/h/shooting/post/22696/gary-plauch-shoots-his-sons-rapist">Gary Plauché shoots his son's rapist</a></p>
<p><a href="https://watchpeopledie.tv/h/bladed/post/10157/another-classic-the-infamous-ms-pacman">Ms. Pacman (woman with her head split open)</a></p>
<p><a href="https://watchpeopledie.tv/h/bladed/post/23600/ms-pacman-video">Ms. Pacman (woman with her head split open)</a></p>
<p><a href="https://watchpeopledie.tv/h/accident/post/12701/the-russian-brick-video">The Russian brick video</a></p>
<p><a href="https://watchpeopledie.tv/h/cartel/post/1774/funkytown-in-all-its-glory">Funky Town (cartel flaying+torturing)</a></p>
<p><a href="https://watchpeopledie.tv/h/beheading/post/11788/chechclear-no-watermarks">Chechclear</a></p>

View File

@ -2,7 +2,7 @@
-- PostgreSQL database dump
--
-- Dumped from database version 14.5
-- Dumped from database version 14.6
-- Dumped by pg_dump version 14.6 (Ubuntu 14.6-1.pgdg20.04+1)
SET statement_timeout = 0;

View File

@ -25,7 +25,7 @@ INSERT INTO public.users (
-- PostgreSQL database dump
--
-- Dumped from database version 14.5
-- Dumped from database version 14.6
-- Dumped by pg_dump version 14.6 (Ubuntu 14.6-1.pgdg20.04+1)
SET statement_timeout = 0;
@ -231,7 +231,7 @@ SELECT pg_catalog.setval('public.badge_defs_id_seq', 230, true);
-- PostgreSQL database dump
--
-- Dumped from database version 14.5
-- Dumped from database version 14.6
-- Dumped by pg_dump version 14.6 (Ubuntu 14.6-1.pgdg20.04+1)
SET statement_timeout = 0;

View File

@ -3384,3 +3384,12 @@ Woman have to be literally perfect or be condemned to stripped of their last nam
They have totally forsaken any level of introspection and understanding because it would be politically inconvenient, they want to live within a simplistic world of good and evil with all grey causing a mental breakdown. They're complete mongrels of the soul, choosing to refuse anything which could allow for emotional development because it would be mildly uncomfortable.
{[para]}
![](/images/16758166234569614.webp)
{[para]}
![](/images/16763687631229467.webp)
{[para]}
Hehehe you think you've escaped... But then you stumble upon a random interracial commercial (like all of them are 🤣) and BOOM your thoughts go right there! To that tasty BBC he must have 😏 in second you are feeding yourself porn and end up cumming like a fountain 🖤🤍 BBC WINS!
{[para]}
Kill Soren. Behead Soren. Roundhouse kick Soren into the concrete. Slam dunk a baby Soren into the trashcan. Crucify filthy Soren. Defecate in Soren's food. Launch Soren into the sun. Stir fry Soren in a wok. Toss Soren into active volcanoes. Urinate into Soren's gas tank. Judo throw Soren into a wood chipper. Twist Soren's head off. Report Soren to the IRS. Karate chop Soren in half. Curb stomp pregnant Soren. Trap Soren in quicksand. Crush Soren in the trash compactor. Liquify Soren in a vat of acid. Eat Soren. Dissect Soren. Exterminate Soren in the gas chamber. Stomp Soren's skull with steel toed boots. Cremate Soren in the oven. Lobotomize Soren. Mandatory abortions for Soren. Grind Soren fetuses in the garbage disposal. Drown Soren in fried chicken grease. Vaporize Soren with a ray gun. Kick old Soren down the stairs. Feed Soren to alligators. Slice Soren with a katana.
{[para]}
https://rdrama.net/videos/16766137166070707.mov