forked from rDrama/rDrama
dfMerge branch 'frost' of https://github.com/Aevann1/Drama into frost
commit
18fd8e3335
|
@ -119,7 +119,7 @@ def after_request(response):
|
||||||
|
|
||||||
if app.config["SERVER_NAME"] == 'localhost':
|
if app.config["SERVER_NAME"] == 'localhost':
|
||||||
from files.routes import *
|
from files.routes import *
|
||||||
from files.routes.chat import *
|
# from files.routes.chat import *
|
||||||
elif "load_chat" in argv:
|
elif "load_chat" in argv:
|
||||||
from files.routes.chat import *
|
from files.routes.chat import *
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -327,7 +327,7 @@ def filter_emojis_only(title, edit=False, graceful=False):
|
||||||
|
|
||||||
title = strikethrough_regex.sub(r'<del>\1</del>', title)
|
title = strikethrough_regex.sub(r'<del>\1</del>', title)
|
||||||
|
|
||||||
sanitized = bleach.clean(title, tags=['img','del'], attributes=allowed_attributes_emojis, protocols=['http','https'])
|
title = bleach.clean(title, tags=['img','del'], attributes=allowed_attributes_emojis, protocols=['http','https'])
|
||||||
|
|
||||||
signal.alarm(0)
|
signal.alarm(0)
|
||||||
|
|
||||||
|
|
|
@ -324,6 +324,8 @@ def sign_up_post(v):
|
||||||
|
|
||||||
profileurl = '/e/' + random.choice(marseys_const) + '.webp'
|
profileurl = '/e/' + random.choice(marseys_const) + '.webp'
|
||||||
|
|
||||||
|
if SITE == "watchpeopledie.co": print(f'1: {username}')
|
||||||
|
|
||||||
new_user = User(
|
new_user = User(
|
||||||
username=username,
|
username=username,
|
||||||
original_username = username,
|
original_username = username,
|
||||||
|
@ -335,9 +337,13 @@ def sign_up_post(v):
|
||||||
profileurl=profileurl
|
profileurl=profileurl
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if SITE == "watchpeopledie.co": print(f'2: {username}')
|
||||||
|
|
||||||
g.db.add(new_user)
|
g.db.add(new_user)
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
|
|
||||||
|
if SITE == "watchpeopledie.co": print(f'3: {username}')
|
||||||
|
|
||||||
if ref_id:
|
if ref_id:
|
||||||
ref_user = g.db.query(User).filter_by(id=ref_id).one_or_none()
|
ref_user = g.db.query(User).filter_by(id=ref_id).one_or_none()
|
||||||
|
|
||||||
|
@ -368,8 +374,12 @@ def sign_up_post(v):
|
||||||
session["session_id"] = token_hex(49)
|
session["session_id"] = token_hex(49)
|
||||||
session["lo_user"] = new_user.id
|
session["lo_user"] = new_user.id
|
||||||
|
|
||||||
|
if SITE == "watchpeopledie.co": print(f'4: {username}')
|
||||||
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
|
if SITE == "watchpeopledie.co": print(f'5: {username}')
|
||||||
|
|
||||||
return redirect(SITE_FULL)
|
return redirect(SITE_FULL)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -816,7 +816,7 @@ def api_is_repost():
|
||||||
|
|
||||||
if "/i.imgur.com/" in url: url = url.replace(".png", ".webp").replace(".jpg", ".webp").replace(".jpeg", ".webp")
|
if "/i.imgur.com/" in url: url = url.replace(".png", ".webp").replace(".jpg", ".webp").replace(".jpeg", ".webp")
|
||||||
elif "/media.giphy.com/" in url or "/c.tenor.com/" in url: url = url.replace(".gif", ".webp")
|
elif "/media.giphy.com/" in url or "/c.tenor.com/" in url: url = url.replace(".gif", ".webp")
|
||||||
elif "/i.ibb.com/" in url: url = url.replace(".png", ".webp").replace(".jpg", ".webp").replace(".jpeg", ".webp").replace(".gif", ".webp")
|
elif "/i.ibb.co/" in url: url = url.replace(".png", ".webp").replace(".jpg", ".webp").replace(".jpeg", ".webp").replace(".gif", ".webp")
|
||||||
|
|
||||||
if url.startswith("https://streamable.com/") and not url.startswith("https://streamable.com/e/"): url = url.replace("https://streamable.com/", "https://streamable.com/e/")
|
if url.startswith("https://streamable.com/") and not url.startswith("https://streamable.com/e/"): url = url.replace("https://streamable.com/", "https://streamable.com/e/")
|
||||||
|
|
||||||
|
@ -912,7 +912,7 @@ def submit_post(v, sub=None):
|
||||||
|
|
||||||
if "/i.imgur.com/" in url: url = url.replace(".png", ".webp").replace(".jpg", ".webp").replace(".jpeg", ".webp")
|
if "/i.imgur.com/" in url: url = url.replace(".png", ".webp").replace(".jpg", ".webp").replace(".jpeg", ".webp")
|
||||||
elif "/media.giphy.com/" in url or "/c.tenor.com/" in url: url = url.replace(".gif", ".webp")
|
elif "/media.giphy.com/" in url or "/c.tenor.com/" in url: url = url.replace(".gif", ".webp")
|
||||||
elif "/i.ibb.com/" in url: url = url.replace(".png", ".webp").replace(".jpg", ".webp").replace(".jpeg", ".webp").replace(".gif", ".webp")
|
elif "/i.ibb.co/" in url: url = url.replace(".png", ".webp").replace(".jpg", ".webp").replace(".jpeg", ".webp").replace(".gif", ".webp")
|
||||||
|
|
||||||
if url.startswith("https://streamable.com/") and not url.startswith("https://streamable.com/e/"): url = url.replace("https://streamable.com/", "https://streamable.com/e/")
|
if url.startswith("https://streamable.com/") and not url.startswith("https://streamable.com/e/"): url = url.replace("https://streamable.com/", "https://streamable.com/e/")
|
||||||
|
|
||||||
|
@ -1355,7 +1355,7 @@ def submit_post(v, sub=None):
|
||||||
if body.startswith('!slots'):
|
if body.startswith('!slots'):
|
||||||
check_for_slots_command(body, snappy, c)
|
check_for_slots_command(body, snappy, c)
|
||||||
|
|
||||||
if body.startswith(':#marseypin:'):
|
if body.startswith(':#marseypin'):
|
||||||
post.stickied = "Snappy"
|
post.stickied = "Snappy"
|
||||||
post.stickied_utc = int(time.time()) + 3600
|
post.stickied_utc = int(time.time()) + 3600
|
||||||
|
|
||||||
|
|
|
@ -121,6 +121,11 @@ Text 2
|
||||||
<td>#fortune</td>
|
<td>#fortune</td>
|
||||||
<td>???</td>
|
<td>???</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Random Factcheck</td>
|
||||||
|
<td>#factcheck</td>
|
||||||
|
<td>???</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Poll Options (can select multiple options)</td>
|
<td>Poll Options (can select multiple options)</td>
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
{% extends "default.html" %}
|
{% extends "default.html" %}
|
||||||
|
|
||||||
|
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-html="true" title="<img src='/assets/images/chest.webp' width='20'>">
|
||||||
|
Tooltip with HTML
|
||||||
|
</button>
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
<title>Shop</title>
|
<title>Shop</title>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{% set image=sub.sidebar_url %}
|
{% set image=sub.sidebar_url %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set path = "assets/images/" + SITE_NAME + "/sidebar" %}
|
{% set path = "assets/images/" + SITE_NAME + "/sidebar" %}
|
||||||
{% set image = "/" + path + "/" + listdir('files/' + path)|random() + '?v=43' %}
|
{% set image = "/" + path + "/" + listdir('files/' + path)|random() + '?v=44' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and (v.is_banned or v.agendaposter) %}
|
{% if v and (v.is_banned or v.agendaposter) %}
|
||||||
|
|
Loading…
Reference in New Issue