remove unnecessary tabs
parent
b0fdd78d8b
commit
a395c18955
|
@ -102,7 +102,7 @@ function register_new_elements(e) {
|
||||||
for (const element of showmores) {
|
for (const element of showmores) {
|
||||||
element.onclick = () => {showmore(element)};
|
element.onclick = () => {showmore(element)};
|
||||||
}
|
}
|
||||||
|
|
||||||
const onclick = e.querySelectorAll('[data-onclick]');
|
const onclick = e.querySelectorAll('[data-onclick]');
|
||||||
for (const element of onclick) {
|
for (const element of onclick) {
|
||||||
element.onclick = () => {execute(element, 'onclick')};
|
element.onclick = () => {execute(element, 'onclick')};
|
||||||
|
|
|
@ -287,7 +287,7 @@ document.addEventListener('click', function (e) {
|
||||||
btn.previousElementSibling.classList.remove('d-none');
|
btn.previousElementSibling.classList.remove('d-none');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.target.id == "cancel") {
|
if (e.target.id == "cancel") {
|
||||||
document.getElementById("quotes").classList.add("d-none");
|
document.getElementById("quotes").classList.add("d-none");
|
||||||
document.getElementById('quotes_id').value = null;
|
document.getElementById('quotes_id').value = null;
|
||||||
|
|
|
@ -391,12 +391,12 @@ class User(Base):
|
||||||
date = time.strftime("%d %b", time.gmtime(self.created_utc))
|
date = time.strftime("%d %b", time.gmtime(self.created_utc))
|
||||||
now = time.strftime("%d %b", time.gmtime())
|
now = time.strftime("%d %b", time.gmtime())
|
||||||
if date == now: return True
|
if date == now: return True
|
||||||
|
|
||||||
if time.time() - self.created_utc > 365 * 86400 and not self.has_badge(134):
|
if time.time() - self.created_utc > 365 * 86400 and not self.has_badge(134):
|
||||||
new_badge = Badge(badge_id=134, user_id=self.id)
|
new_badge = Badge(badge_id=134, user_id=self.id)
|
||||||
g.db.add(new_badge)
|
g.db.add(new_badge)
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
|
@ -29,7 +29,7 @@ def process_files(files, v):
|
||||||
body = ''
|
body = ''
|
||||||
if g.is_tor or not files.get("file"): return body
|
if g.is_tor or not files.get("file"): return body
|
||||||
files = files.getlist('file')[:4]
|
files = files.getlist('file')[:4]
|
||||||
|
|
||||||
if files:
|
if files:
|
||||||
media_ratelimit(v)
|
media_ratelimit(v)
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ def process_audio(file, v):
|
||||||
|
|
||||||
media = g.db.query(Media).filter_by(filename=name, kind='audio').one_or_none()
|
media = g.db.query(Media).filter_by(filename=name, kind='audio').one_or_none()
|
||||||
if media: g.db.delete(media)
|
if media: g.db.delete(media)
|
||||||
|
|
||||||
media = Media(
|
media = Media(
|
||||||
kind='audio',
|
kind='audio',
|
||||||
filename=name,
|
filename=name,
|
||||||
|
@ -259,12 +259,12 @@ def process_dm_images(v, user):
|
||||||
).json()
|
).json()
|
||||||
except requests.Timeout:
|
except requests.Timeout:
|
||||||
abort(400, "Image upload timed out, please try again!")
|
abort(400, "Image upload timed out, please try again!")
|
||||||
|
|
||||||
try: url = req['files'][0]['url']
|
try: url = req['files'][0]['url']
|
||||||
except: abort(400, req['description'])
|
except: abort(400, req['description'])
|
||||||
|
|
||||||
body += f'\n\n{url}\n\n'
|
body += f'\n\n{url}\n\n'
|
||||||
|
|
||||||
if body:
|
if body:
|
||||||
with open(f"{LOG_DIRECTORY}/dm_images.log", "a+", encoding="utf-8") as f:
|
with open(f"{LOG_DIRECTORY}/dm_images.log", "a+", encoding="utf-8") as f:
|
||||||
if user:
|
if user:
|
||||||
|
|
|
@ -850,7 +850,7 @@ def admin_title_change(user_id, v):
|
||||||
message = f"@{v.username} (a site admin) has locked your flair to `{user.customtitleplain}`."
|
message = f"@{v.username} (a site admin) has locked your flair to `{user.customtitleplain}`."
|
||||||
else:
|
else:
|
||||||
message = f"@{v.username} (a site admin) has changed your flair to `{user.customtitleplain}`. You can change it back in the settings."
|
message = f"@{v.username} (a site admin) has changed your flair to `{user.customtitleplain}`. You can change it back in the settings."
|
||||||
|
|
||||||
send_repeatable_notification(user.id, message)
|
send_repeatable_notification(user.id, message)
|
||||||
|
|
||||||
return {"message": f"@{user.username}'s flair has been changed!"}
|
return {"message": f"@{user.username}'s flair has been changed!"}
|
||||||
|
|
|
@ -47,7 +47,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None):
|
||||||
post = NOTIFICATION_THREAD
|
post = NOTIFICATION_THREAD
|
||||||
|
|
||||||
post = get_post(post, v=v)
|
post = get_post(post, v=v)
|
||||||
|
|
||||||
if post.over_18 and not (v and v.over_18) and not session.get('over_18', 0) >= int(time.time()):
|
if post.over_18 and not (v and v.over_18) and not session.get('over_18', 0) >= int(time.time()):
|
||||||
if v and v.client: abort(403, "This content is not suitable for some users and situations!")
|
if v and v.client: abort(403, "This content is not suitable for some users and situations!")
|
||||||
else: return render_template("errors/nsfw.html", v=v), 403
|
else: return render_template("errors/nsfw.html", v=v), 403
|
||||||
|
@ -152,7 +152,7 @@ def comment(v:User):
|
||||||
|
|
||||||
if request.files.get("file") and not g.is_tor:
|
if request.files.get("file") and not g.is_tor:
|
||||||
files = request.files.getlist('file')[:4]
|
files = request.files.getlist('file')[:4]
|
||||||
|
|
||||||
if files:
|
if files:
|
||||||
media_ratelimit(v)
|
media_ratelimit(v)
|
||||||
|
|
||||||
|
|
|
@ -1364,7 +1364,7 @@ def gumroad():
|
||||||
type = data['recurrence']
|
type = data['recurrence']
|
||||||
amount = int(data['price']) / 100
|
amount = int(data['price']) / 100
|
||||||
email = data['email']
|
email = data['email']
|
||||||
|
|
||||||
transaction = Transaction(
|
transaction = Transaction(
|
||||||
id=id,
|
id=id,
|
||||||
created_utc=created_utc,
|
created_utc=created_utc,
|
||||||
|
|
|
@ -93,7 +93,7 @@ def vote_post_comment(target_id, new, v, cls, vote_cls):
|
||||||
|
|
||||||
if SITE_NAME == 'WPD':
|
if SITE_NAME == 'WPD':
|
||||||
coin_mult *= 2
|
coin_mult *= 2
|
||||||
|
|
||||||
if IS_FISTMAS():
|
if IS_FISTMAS():
|
||||||
coin_mult *= 2
|
coin_mult *= 2
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ def get_ID():
|
||||||
x = session.get("lo_user")
|
x = session.get("lo_user")
|
||||||
else:
|
else:
|
||||||
x = "logged_out"
|
x = "logged_out"
|
||||||
|
|
||||||
|
|
||||||
return f'{SITE}-{x}'
|
return f'{SITE}-{x}'
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
<span class="my-auto">
|
<span class="my-auto">
|
||||||
<i class="btn btn-secondary fas fa-smile-beam" style="font-size:1.3rem!important" data-nonce="{{g.nonce}}" data-onclick="loadEmojis('input-text')" data-bs-toggle="modal" data-bs-target="#emojiModal"></i>
|
<i class="btn btn-secondary fas fa-smile-beam" style="font-size:1.3rem!important" data-nonce="{{g.nonce}}" data-onclick="loadEmojis('input-text')" data-bs-toggle="modal" data-bs-target="#emojiModal"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="my-auto ml-1">
|
<span class="my-auto ml-1">
|
||||||
<label class="btn btn-secondary format mb-0">
|
<label class="btn btn-secondary format mb-0">
|
||||||
<div id="filename" class="mr-3" style="font-size:12px"><i class="fas fa-image" style="font-size:1.3rem!important"></i></div>
|
<div id="filename" class="mr-3" style="font-size:12px"><i class="fas fa-image" style="font-size:1.3rem!important"></i></div>
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
{% set rules = "rules_" ~ SITE_NAME ~ ".html" %}
|
{% set rules = "rules_" ~ SITE_NAME ~ ".html" %}
|
||||||
{% include rules %}
|
{% include rules %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
Live commit: <a href="https://fsdfsd.net/rDrama/rDrama/commit/{{gitref[0]}}">{{gitref[0]}}</a>
|
Live commit: <a href="https://fsdfsd.net/rDrama/rDrama/commit/{{gitref[0]}}">{{gitref[0]}}</a>
|
||||||
|
|
Loading…
Reference in New Issue