100000000k

remotes/1693045480750635534/spooky-22
Aevann1 2022-01-19 08:20:05 +02:00
parent 7812ceb338
commit 0f58d70cce
14 changed files with 81 additions and 76 deletions

View File

@ -247,7 +247,7 @@ class Submission(Base):
@property
@lazy
def full_url(self):
if self.url.startswith('/'): return f'https://{site}' + self.url
if self.url and self.url.startswith('/'): return f'https://{site}' + self.url
return self.url
@property

View File

@ -702,7 +702,7 @@ AWARDS = {
"grass": {
"kind": "grass",
"title": "Grass",
"description": "Ban the recipient permanently (must provide a timestamped picture of them touching grass to the admins to get unbanned)",
"description": "Ban the recipient for 30 days (if they provide a timestamped picture of them touching grass/snow/sand/ass to the admins, they will get unbanned immediately)",
"icon": "fas fa-seedling",
"color": "text-success",
"price": 10000

View File

@ -100,7 +100,7 @@ allowed_protocols = ['http', 'https']
allowed_styles = ['color', 'background-color', 'font-weight', 'transform', '-webkit-transform']
def sanitize(sanitized, noimages=False, alert=False, comment=False):
def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False):
sanitized = markdown(sanitized)
@ -202,7 +202,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False):
classes = 'emoji-md'
remoji = emoji
if random() < 0.01 and 'marsey' in emoji: classes += ' golden'
if not edit and random() < 0.01 and 'marsey' in emoji: classes += ' golden'
if path.isfile(f'files/assets/images/emojis/{remoji}.webp'):
new = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" class="{classes}" src="/static/assets/images/emojis/{remoji}.webp" >', new, flags=re.I)
@ -216,14 +216,14 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False):
if emoji.startswith("!"):
emoji = emoji[1:]
classes = 'emoji mirrored'
if random() < 0.01 and 'marsey' in emoji: classes += ' golden'
if not edit and random() < 0.01 and 'marsey' in emoji: classes += ' golden'
if path.isfile(f'files/assets/images/emojis/{emoji}.webp'):
sanitized = re.sub(f'(?<!"):!{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{emoji}:" title=":!{emoji}:" delay="0" class="{classes}" src="/static/assets/images/emojis/{emoji}.webp">', sanitized, flags=re.I)
if comment: marseys_used.add(emoji)
elif path.isfile(f'files/assets/images/emojis/{emoji}.webp'):
classes = 'emoji'
if random() < 0.01 and 'marsey' in emoji: classes += ' golden'
if not edit and random() < 0.01 and 'marsey' in emoji: classes += ' golden'
sanitized = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" class="{classes}" src="/static/assets/images/emojis/{emoji}.webp">', sanitized, flags=re.I)
if comment: marseys_used.add(emoji)
@ -266,6 +266,8 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False):
return sanitized
def filter_emojis_only(title):
title = title.replace('<','').replace('>','').replace("\n", "").replace("\r", "").replace("\t", "").strip()

View File

@ -372,9 +372,11 @@ def award_post(pid, v):
g.db.add(post.author)
g.db.commit()
if request.referrer and len(request.referrer) > 1 and (request.referrer.startswith('/') or request.referrer.startswith(request.host_url)):
return redirect(request.referrer)
else: return redirect("/")
if request.referrer and len(request.referrer) > 1:
if request.referrer == f'{request.host_url}submit': return redirect(post.permalink)
elif request.referrer.startswith('/') or request.referrer.startswith(request.host_url):
return redirect(request.referrer)
return redirect("/")
@app.get("/comment/<cid>/awards")

View File

@ -581,7 +581,7 @@ def edit_comment(cid, v):
)
g.db.add(c_option)
body_html = sanitize(body)
body_html = sanitize(body, edit=True)
if v.marseyawarded and len(list(re.finditer('>[^<\s+]|[^>\s+]<', body_html))): return {"error":"You can only type marseys!"}, 403
@ -656,7 +656,7 @@ def edit_comment(cid, v):
body += f"\n\n{url}"
else: return {"error": "Image/Video files only"}, 400
body_html = sanitize(body)
body_html = sanitize(body, edit=True)
if len(body_html) > 20000: abort(400)

View File

@ -300,13 +300,13 @@ def sign_up_post(v):
ref_user = g.db.query(User).filter_by(id=ref_id).one_or_none()
if ref_user:
if ref_user.referral_count:
if ref_user.referral_count and not ref_user.has_badge(10):
new_badge = Badge(user_id=ref_user.id, badge_id=10)
g.db.add(new_badge)
if ref_user.referral_count > 9:
if ref_user.referral_count > 9 and not ref_user.has_badge(11):
new_badge = Badge(user_id=ref_user.id, badge_id=11)
g.db.add(new_badge)
if ref_user.referral_count > 99:
if ref_user.referral_count > 99 and not ref_user.has_badge(12):
new_badge = Badge(user_id=ref_user.id, badge_id=12)
g.db.add(new_badge)

View File

@ -453,7 +453,7 @@ def edit_post(pid, v):
)
g.db.add(c)
body_html = sanitize(body)
body_html = sanitize(body, edit=True)
bans = filter_comment_html(body_html)
if bans:

View File

@ -331,7 +331,7 @@ def settings_profile_post(v):
theme = request.values.get("theme")
if theme:
if theme in ["classic","transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"]:
if theme in ["drambler","classic","transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"]:
if theme == "transparent" and not v.background:
return {"error": "You need to set a background to use the transparent theme!"}
v.theme = theme

View File

@ -91,7 +91,6 @@ def leaderboard_thread():
db.close()
gevent.spawn(leaderboard_thread())
@app.get("/grassed")
@auth_required
def grassed(v):
@ -350,6 +349,8 @@ def transfer_bux(v, username):
@app.get("/leaderboard")
@auth_required
def leaderboard(v):
gevent.spawn(leaderboard_thread())
sq = g.db.query(User.id, func.rank().over(order_by=User.coins.desc()).label("rank")).subquery()
pos1 = g.db.query(sq.c.id, sq.c.rank).filter(sq.c.id == v.id).limit(1).one()[1]
@ -472,7 +473,7 @@ def message2(v, username):
if v.shadowbanned: return {"message": "Message sent!"}
message = request.values.get("message", "").strip()[:1000].strip()
message = request.values.get("message", "").strip()[:10000].strip()
if not message: return {"error": "message is empty"}
@ -540,7 +541,7 @@ def message2(v, username):
@auth_required
def messagereply(v):
message = request.values.get("body", "").strip()[:1000].strip()
message = request.values.get("body", "").strip()[:10000].strip()
if not message: return {"error": "message is empty"}

View File

@ -207,7 +207,7 @@
<i id='pinned-{{c.id}}'class="fas fa-thumbtack fa-rotate--45 text-admin" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Pinned by @{{c.is_pinned}}" {% if c.is_pinned_utc %}onmouseover="pinned_timestamp('pinned-{{c.id}}')" data-timestamp={{c.is_pinned_utc}} {% endif %}></i>
{% endif %}
{% if c.distinguish_level %}<i class="fas fa-broom text-admin" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="{{SITE_NAME}} Admin, speaking officially"></i>{% endif %}
{% if c.is_op %}<i class="fas fa-microphone-stand text-info" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="OP"></i>{% endif %}
{% if c.is_op and c.author_name != '👻' %}<i class="fas fa-microphone-stand text-info" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="OP"></i>{% endif %}
{% if c.is_bot %}<i class="fad fa-robot text-info" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Bot"></i>{% endif %}
{% if c.is_blocking %}<i class="fas fa-user-minus text-warning" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="You're blocking this user, but you can see this comment because you're an admin"></i>{% endif %}
{% if c.is_blocked %}<i class="fas fa-user-minus text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="This user is blocking you."></i>{% endif %}
@ -541,7 +541,7 @@
<div id="comment-form-space-{{c.id}}" class="comment-write collapsed child">
<form id="reply-to-message-{{c.id}}" action="/reply" method="post" class="input-group" enctype="multipart/form-data">
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
<textarea autocomplete="off" minlength="1" maxlength="1000" name="body" form="reply-to-t3_{{c.id}}" data-id="{{c.id}}" class="comment-box form-control rounded" id="reply-form-body-{{c.id}}" aria-label="With textarea" rows="3" oninput="markdown('reply-form-body-{{c.id}}', 'message-reply-{{c.id}}')"></textarea>
<textarea autocomplete="off" minlength="1" maxlength="10000" name="body" form="reply-to-t3_{{c.id}}" data-id="{{c.id}}" class="comment-box form-control rounded" id="reply-form-body-{{c.id}}" aria-label="With textarea" rows="3" oninput="markdown('reply-form-body-{{c.id}}', 'message-reply-{{c.id}}')"></textarea>
<div class="comment-format" id="comment-format-bar-{{c.id}}">
<label class="btn btn-secondary format m-0" for="gif-reply-btn-{{c.id}}">
<i id="emoji-reply-btn-{{c.id}}" class="fas fa-smile-beam" onclick="loadEmojis('reply-form-body-{{c.id}}')" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Add Emoji"></i>

View File

@ -4,26 +4,26 @@
{% block content %}
<pre class="d-none d-md-inline-block"></pre>
<h5 style="font-weight:bold;text-align: center;">Top 25 by {{'COINS_NAME' | app_config}}</h5>
<h5 style="font-weight:bold;text-align: center">Top 25 by {{'COINS_NAME' | app_config}}</h5>
<pre></pre>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th style="font-weight:bold;">#</th>
<th style="font-weight:bold;">Name</th>
<th style="font-weight:bold">#</th>
<th style="font-weight:bold">Name</th>
<th style="font-weight:bold">Coins</th>
</tr>
</thead>
{% for user in users1 %}
<tr>
<td style="font-weight:bold;">{{loop.index}}</td>
<td style="font-weight:bold">{{loop.index}}</td>
<td><a style="color:#{{user.namecolor}};font-weight:bold" href="/@{{user.username}}"><img alt="@{{user.username}}'s profile picture" loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}}"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold">{{user.coins}}</td>
</tr>
{% endfor %}
{% if pos1 > 25 %}
<tr style="border-top:2px solid var(--primary)">
<td style="font-weight:bold;">{{pos1}}</td>
<td style="font-weight:bold">{{pos1}}</td>
<td><a style="color:#{{v.namecolor}};font-weight:bold" href="/@{{v.username}}"><img alt="@{{v.username}}'s profile picture" loading="lazy" src="{{v.profile_url}}" class="pp20"><span {% if v.patron %}class="patron" style="background-color:#{{v.namecolor}}"{% endif %}>{{v.username}}</span></a></td>
<td style="font-weight:bold">{{v.coins}}</td>
</tr>
@ -35,7 +35,7 @@
</pre>
<h5 style="font-weight:bold;text-align: center;">Top 25 by coins spent in shop</h5>
<h5 style="font-weight:bold;text-align: center">Top 25 by coins spent in shop</h5>
<pre>
@ -43,22 +43,22 @@
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th style="font-weight:bold;">#</th>
<th style="font-weight:bold;">Name</th>
<th style="font-weight:bold">#</th>
<th style="font-weight:bold">Name</th>
<th style="font-weight:bold">Coins</th>
</tr>
</thead>
{% for user in users7 %}
<tr>
<td style="font-weight:bold;">{{loop.index}}</td>
<td><a style="color:#{{user.namecolor}};font-weight:bold fonts" href="/@{{user.username}}"><img alt="@{{user.username}}'s profile picture" loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}}"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold">{{loop.index}}</td>
<td><a style="color:#{{user.namecolor}};font-weight:bold" href="/@{{user.username}}"><img alt="@{{user.username}}'s profile picture" loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}}"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold">{{user.coins_spent}}</td>
</tr>
{% endfor %}
{% if pos7 > 25 %}
<tr style="border-top:2px solid var(--primary)">
<td style="font-weight:bold;">{{pos7}}</td>
<td style="font-weight:bold">{{pos7}}</td>
<td><a style="color:#{{v.namecolor}};font-weight:bold" href="/@{{v.username}}"><img alt="@{{v.username}}'s profile picture" loading="lazy" src="{{v.profile_url}}" class="pp20"><span {% if v.patron %}class="patron" style="background-color:#{{v.namecolor}}"{% endif %}>{{v.username}}</span></a></td>
<td style="font-weight:bold">{{v.coins_spent}}</td>
</tr>
@ -70,7 +70,7 @@
</pre>
<h5 style="font-weight:bold;text-align: center;">Top 25 by truescore</h5>
<h5 style="font-weight:bold;text-align: center">Top 25 by truescore</h5>
<pre>
@ -86,14 +86,14 @@
<tbody id="followers-table">
{% for user in users10 %}
<tr>
<td style="font-weight:bold;">{{loop.index}}</td>
<td><a style="color:#{{user.namecolor}};font-weight:bold fonts" href="/@{{user.username}}"><img alt="@{{user.username}}'s profile picture" loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}}"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold">{{loop.index}}</td>
<td><a style="color:#{{user.namecolor}};font-weight:bold" href="/@{{user.username}}"><img alt="@{{user.username}}'s profile picture" loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}}"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold">{{user.truecoins}}</td>
</tr>
{% endfor %}
{% if pos10 > 25 %}
<tr style="border-top:2px solid var(--primary)">
<td style="font-weight:bold;">{{pos10}}</td>
<td style="font-weight:bold">{{pos10}}</td>
<td><a style="color:#{{v.namecolor}};font-weight:bold" href="/@{{v.username}}"><img alt="@{{v.username}}'s profile picture" loading="lazy" src="{{v.profile_url}}" class="pp20"><span {% if v.patron %}class="patron" style="background-color:#{{v.namecolor}}"{% endif %}>{{v.username}}</span></a></td>
<td style="font-weight:bold">{{v.truecoins}}</td>
</tr>
@ -105,7 +105,7 @@
</pre>
<h5 style="font-weight:bold;text-align: center;">Top 25 by followers</h5>
<h5 style="font-weight:bold;text-align: center">Top 25 by followers</h5>
<pre>
@ -113,21 +113,21 @@
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th style="font-weight:bold;">#</th>
<th style="font-weight:bold;">Name</th>
<th style="font-weight:bold">#</th>
<th style="font-weight:bold">Name</th>
<th style="font-weight:bold">Followers</th>
</tr>
</thead>
{% for user in users2 %}
<tr>
<td style="font-weight:bold;">{{loop.index}}</td>
<td style="font-weight:bold">{{loop.index}}</td>
<td><a style="color:#{{user.namecolor}};font-weight:bold" href="/@{{user.username}}"><img alt="@{{user.username}}'s profile picture" loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}}"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold">{{user.stored_subscriber_count}}</td>
</tr>
{% endfor %}
{% if pos2 > 25 %}
<tr style="border-top:2px solid var(--primary)">
<td style="font-weight:bold;">{{pos2}}</td>
<td style="font-weight:bold">{{pos2}}</td>
<td><a style="color:#{{v.namecolor}};font-weight:bold" href="/@{{v.username}}"><img alt="@{{v.username}}'s profile picture" loading="lazy" src="{{v.profile_url}}" class="pp20"><span {% if v.patron %}class="patron" style="background-color:#{{v.namecolor}}"{% endif %}>{{v.username}}</span></a></td>
<td style="font-weight:bold">{{v.stored_subscriber_count}}</td>
</tr>
@ -137,7 +137,7 @@
</pre>
<h5 style="font-weight:bold;text-align: center;">Top 25 by post count</h5>
<h5 style="font-weight:bold;text-align: center">Top 25 by post count</h5>
<pre>
@ -145,21 +145,21 @@
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th style="font-weight:bold;">#</th>
<th style="font-weight:bold;">Name</th>
<th style="font-weight:bold">#</th>
<th style="font-weight:bold">Name</th>
<th style="font-weight:bold">Posts</th>
</tr>
</thead>
{% for user in users3 %}
<tr>
<td style="font-weight:bold;">{{loop.index}}</td>
<td style="font-weight:bold">{{loop.index}}</td>
<td><a style="color:#{{user.namecolor}};font-weight:bold" href="/@{{user.username}}"><img alt="@{{user.username}}'s profile picture" loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}}"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold">{{user.post_count}}</td>
</tr>
{% endfor %}
{% if pos3 > 25 %}
<tr style="border-top:2px solid var(--primary)">
<td style="font-weight:bold;">{{pos3}}</td>
<td style="font-weight:bold">{{pos3}}</td>
<td><a style="color:#{{v.namecolor}};font-weight:bold" href="/@{{v.username}}"><img alt="@{{v.username}}'s profile picture" loading="lazy" src="{{v.profile_url}}" class="pp20"><span {% if v.patron %}class="patron" style="background-color:#{{v.namecolor}}"{% endif %}>{{v.username}}</span></a></td>
<td style="font-weight:bold">{{v.post_count}}</td>
</tr>
@ -169,7 +169,7 @@
</pre>
<h5 style="font-weight:bold;text-align: center;">Top 25 by comment count</h5>
<h5 style="font-weight:bold;text-align: center">Top 25 by comment count</h5>
<pre>
@ -177,21 +177,21 @@
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th style="font-weight:bold;">#</th>
<th style="font-weight:bold;">Name</th>
<th style="font-weight:bold">#</th>
<th style="font-weight:bold">Name</th>
<th style="font-weight:bold">Comments</th>
</tr>
</thead>
{% for user in users4 %}
<tr>
<td style="font-weight:bold;">{{loop.index}}</td>
<td><a style="color:#{{user.namecolor}};font-weight:bold fonts" href="/@{{user.username}}"><img alt="@{{user.username}}'s profile picture" loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}}"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold">{{loop.index}}</td>
<td><a style="color:#{{user.namecolor}};font-weight:bold" href="/@{{user.username}}"><img alt="@{{user.username}}'s profile picture" loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}}"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold">{{user.comment_count}}</td>
</tr>
{% endfor %}
{% if pos4 > 25 %}
<tr style="border-top:2px solid var(--primary)">
<td style="font-weight:bold;">{{pos4}}</td>
<td style="font-weight:bold">{{pos4}}</td>
<td><a style="color:#{{v.namecolor}};font-weight:bold" href="/@{{v.username}}"><img alt="@{{v.username}}'s profile picture" loading="lazy" src="{{v.profile_url}}" class="pp20"><span {% if v.patron %}class="patron" style="background-color:#{{v.namecolor}}"{% endif %}>{{v.username}}</span></a></td>
<td style="font-weight:bold">{{v.comment_count}}</td>
</tr>
@ -203,7 +203,7 @@
</pre>
<h5 style="font-weight:bold;text-align: center;">Top 25 by received awards</h5>
<h5 style="font-weight:bold;text-align: center">Top 25 by received awards</h5>
<pre>
@ -211,21 +211,21 @@
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th style="font-weight:bold;">#</th>
<th style="font-weight:bold;">Name</th>
<th style="font-weight:bold">#</th>
<th style="font-weight:bold">Name</th>
<th style="font-weight:bold">Awards</th>
</tr>
</thead>
{% for user in users5 %}
<tr>
<td style="font-weight:bold;">{{loop.index}}</td>
<td><a style="color:#{{user.namecolor}};font-weight:bold fonts" href="/@{{user.username}}"><img alt="@{{user.username}}'s profile picture" loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}}"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold">{{loop.index}}</td>
<td><a style="color:#{{user.namecolor}};font-weight:bold" href="/@{{user.username}}"><img alt="@{{user.username}}'s profile picture" loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}}"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold">{{user.received_award_count}}</td>
</tr>
{% endfor %}
{% if pos5 > 25 %}
<tr style="border-top:2px solid var(--primary)">
<td style="font-weight:bold;">{{pos5}}</td>
<td style="font-weight:bold">{{pos5}}</td>
<td><a style="color:#{{v.namecolor}};font-weight:bold" href="/@{{v.username}}"><img alt="@{{v.username}}'s profile picture" loading="lazy" src="{{v.profile_url}}" class="pp20"><span {% if v.patron %}class="patron" style="background-color:#{{v.namecolor}}"{% endif %}>{{v.username}}</span></a></td>
<td style="font-weight:bold">{{v.received_award_count}}</td>
</tr>
@ -237,7 +237,7 @@
</pre>
<h5 style="font-weight:bold;text-align: center;">Top 25 by received downvotes</h5>
<h5 style="font-weight:bold;text-align: center">Top 25 by received downvotes</h5>
<pre>
@ -261,7 +261,7 @@
{% endfor %}
{% if pos9 and pos9[0] > 25 %}
<tr style="border-top:2px solid var(--primary)">
<td style="font-weight:bold;">{{pos9[0]}}</td>
<td style="font-weight:bold">{{pos9[0]}}</td>
<td><a style="color:#{{v.namecolor}};font-weight:bold" href="/@{{v.username}}"><img alt="@{{v.username}}'s profile picture" loading="lazy" src="{{v.profile_url}}" class="pp20"><span {% if v.patron %}class="patron" style="background-color:#{{v.namecolor}}"{% endif %}>{{v.username}}</span></a></td>
<td style="font-weight:bold">{{pos9[1]}}</td>
</tr>
@ -274,7 +274,7 @@
</pre>
<h5 style="font-weight:bold;text-align: center;">Top 25 by badges</h5>
<h5 style="font-weight:bold;text-align: center">Top 25 by badges</h5>
<pre>
@ -298,7 +298,7 @@
{% endfor %}
{% if pos12 and pos12[0] > 25 %}
<tr style="border-top:2px solid var(--primary)">
<td style="font-weight:bold;">{{pos12[0]}}</td>
<td style="font-weight:bold">{{pos12[0]}}</td>
<td><a style="color:#{{v.namecolor}};font-weight:bold" href="/@{{v.username}}"><img alt="@{{v.username}}'s profile picture" loading="lazy" src="{{v.profile_url}}" class="pp20"><span {% if v.patron %}class="patron" style="background-color:#{{v.namecolor}}"{% endif %}>{{v.username}}</span></a></td>
<td style="font-weight:bold">{{pos12[1]}}</td>
</tr>
@ -313,7 +313,7 @@
</pre>
<h5 style="font-weight:bold;text-align: center;">Top 25 by based count</h5>
<h5 style="font-weight:bold;text-align: center">Top 25 by based count</h5>
<pre>
@ -321,21 +321,21 @@
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th style="font-weight:bold;">#</th>
<th style="font-weight:bold;">Name</th>
<th style="font-weight:bold">#</th>
<th style="font-weight:bold">Name</th>
<th style="font-weight:bold">Based count</th>
</tr>
</thead>
{% for user in users6 %}
<tr>
<td style="font-weight:bold;">{{loop.index}}</td>
<td><a style="color:#{{user.namecolor}};font-weight:bold fonts" href="/@{{user.username}}"><img alt="@{{user.username}}'s profile picture" loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}}"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold">{{loop.index}}</td>
<td><a style="color:#{{user.namecolor}};font-weight:bold" href="/@{{user.username}}"><img alt="@{{user.username}}'s profile picture" loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}}"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold">{{user.basedcount}}</td>
</tr>
{% endfor %}
{% if pos6 > 25 %}
<tr style="border-top:2px solid var(--primary)">
<td style="font-weight:bold;">{{pos6}}</td>
<td style="font-weight:bold">{{pos6}}</td>
<td><a style="color:#{{v.namecolor}};font-weight:bold" href="/@{{v.username}}"><img alt="@{{v.username}}'s profile picture" loading="lazy" src="{{v.profile_url}}" class="pp20"><span {% if v.patron %}class="patron" style="background-color:#{{v.namecolor}}"{% endif %}>{{v.username}}</span></a></td>
<td style="font-weight:bold">{{v.basedcount}}</td>
</tr>
@ -348,7 +348,7 @@
</pre>
<h5 style="font-weight:bold;text-align: center;">Top 25 by marseys made</h5>
<h5 style="font-weight:bold;text-align: center">Top 25 by marseys made</h5>
<pre>
@ -372,7 +372,7 @@
{% endfor %}
{% if pos13 and pos13[0] > 25 %}
<tr style="border-top:2px solid var(--primary)">
<td style="font-weight:bold;">{{pos13[0]}}</td>
<td style="font-weight:bold">{{pos13[0]}}</td>
<td><a style="color:#{{v.namecolor}};font-weight:bold" href="/@{{v.username}}"><img alt="@{{v.username}}'s profile picture" loading="lazy" src="{{v.profile_url}}" class="pp20"><span {% if v.patron %}class="patron" style="background-color:#{{v.namecolor}}"{% endif %}>{{v.username}}</span></a></td>
<td style="font-weight:bold">{{pos13[1]}}</td>
</tr>
@ -386,7 +386,7 @@
</pre>
<h5 style="font-weight:bold;text-align: center;">Top 25 by upvotes given</h5>
<h5 style="font-weight:bold;text-align: center">Top 25 by upvotes given</h5>
<pre>
@ -410,7 +410,7 @@
{% endfor %}
{% if pos15 and pos15[0] > 25 %}
<tr style="border-top:2px solid var(--primary)">
<td style="font-weight:bold;">{{pos15[0]}}</td>
<td style="font-weight:bold">{{pos15[0]}}</td>
<td><a style="color:#{{v.namecolor}};font-weight:bold" href="/@{{v.username}}"><img alt="@{{v.username}}'s profile picture" loading="lazy" src="{{v.profile_url}}" class="pp20"><span {% if v.patron %}class="patron" style="background-color:#{{v.namecolor}}"{% endif %}>{{v.username}}</span></a></td>
<td style="font-weight:bold">{{pos15[1]}}</td>
</tr>

View File

@ -42,7 +42,7 @@
</div>
<a class="btn btn-primary mt-3 ml-3" role="button" onclick="post_toast('/clear')">Clear all notifications</a>
<a class="btn btn-primary mt-3 ml-3" role="button" onclick="post_toast('/clear', '1')">Clear all notifications</a>
<div class="notifs p-3 p-md-0">

View File

@ -92,7 +92,7 @@
<p>Change the theme for the website.</p>
<div class="input-group mb2">
<select autocomplete="off" id='theme' class="form-control" form="profile-settings" name="theme" onchange="post_toast('/settings/profile?theme='+document.getElementById('theme').value, '1')">
{% for entry in ["classic","transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"] %}
{% for entry in ["drambler","classic","transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"] %}
<option value="{{entry}}" {% if v.theme==entry %} selected {% endif %}>
{{entry}}
</option>

View File

@ -174,7 +174,7 @@
<form class="d-none profile-toggleable" id="message" action="/@{{u.username}}/message" onsubmit="submitFormAjax(event)">
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
<pre></pre>
<textarea autocomplete="off" id="input-message" form="message" name="message" rows="3" minlength="1" maxlength="1000" class="form-control b2" oninput="markdown('input-message', 'message-preview')" required></textarea>
<textarea autocomplete="off" id="input-message" form="message" name="message" rows="3" minlength="1" maxlength="10000" class="form-control b2" oninput="markdown('input-message', 'message-preview')" required></textarea>
<pre></pre>
<pre class="btn btn-secondary format d-inline-block m-0 fas fa-bold" aria-hidden="true" onclick="makeBold('input-message')" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Bold"></pre>
&nbsp;
@ -462,7 +462,7 @@
<form class="d-none profile-toggleable-mobile" id='message-mobile' action="/@{{u.username}}/message" onsubmit="submitFormAjax(event)">
<pre></pre>
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
<textarea autocomplete="off" id="input-message-mobile" form="message-mobile" name="message" rows="3" minlength="1" maxlength="1000" class="form-control" oninput="markdown('input-message-mobile', 'message-preview-mobile')" required></textarea>
<textarea autocomplete="off" id="input-message-mobile" form="message-mobile" name="message" rows="3" minlength="1" maxlength="10000" class="form-control" oninput="markdown('input-message-mobile', 'message-preview-mobile')" required></textarea>
<pre></pre>
<pre class="btn btn-secondary format d-inline-block m-0 fas fa-bold" aria-hidden="true" onclick="makeBold('input-message-mobile')" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Bold"></pre>
&nbsp;