This commit is contained in:
Aevann1 2022-05-01 23:44:38 +02:00
parent de062c025d
commit 709a7fc4b5
31 changed files with 116 additions and 62 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Before After
Before After

View file

@ -69,10 +69,10 @@ document.onpaste = function(event) {
fileReader.addEventListener("load", function () {document.getElementById('image-preview').setAttribute('src', this.result);}); fileReader.addEventListener("load", function () {document.getElementById('image-preview').setAttribute('src', this.result);});
document.getElementById('file-upload').setAttribute('required', 'false'); document.getElementById('file-upload').setAttribute('required', 'false');
} }
checkForRequired();
document.getElementById('post-url').value = null; document.getElementById('post-url').value = null;
localStorage.setItem("post_url", "") localStorage.setItem("post_url", "")
} }
checkForRequired();
} }
} }
@ -86,8 +86,8 @@ document.getElementById('file-upload').addEventListener('change', function(){
var fileReader = new FileReader(); var fileReader = new FileReader();
fileReader.readAsDataURL(f.files[0]); fileReader.readAsDataURL(f.files[0]);
fileReader.addEventListener("load", function () {document.getElementById('image-preview').setAttribute('src', this.result);}); fileReader.addEventListener("load", function () {document.getElementById('image-preview').setAttribute('src', this.result);});
checkForRequired();
} }
checkForRequired();
}) })
function savetext() { function savetext() {

View file

@ -262,7 +262,7 @@ class User(Base):
return False return False
@cache.memoize(timeout=86400) @cache.memoize(timeout=86400)
def userpagelisting(self, v=None, page=1, sort="new", t="all"): def userpagelisting(self, site=None, v=None, page=1, sort="new", t="all"):
if self.shadowbanned and not (v and (v.admin_level > 1 or v.id == self.id)): return [] if self.shadowbanned and not (v and (v.admin_level > 1 or v.id == self.id)): return []

View file

@ -1228,7 +1228,7 @@ def unban_user(user_id, v):
user = g.db.query(User).filter_by(id=user_id).one_or_none() user = g.db.query(User).filter_by(id=user_id).one_or_none()
if not user: abort(400) if not user or not user.is_banned: abort(400)
user.is_banned = 0 user.is_banned = 0
user.unban_utc = 0 user.unban_utc = 0
@ -1238,11 +1238,11 @@ def unban_user(user_id, v):
g.db.add(user) g.db.add(user)
for x in user.alts: for x in user.alts:
if x.is_banned: send_repeatable_notification(x.id, f"@{v.username} has unbanned you!")
x.is_banned = 0 x.is_banned = 0
x.unban_utc = 0 x.unban_utc = 0
x.ban_evade = 0 x.ban_evade = 0
x.ban_reason = None x.ban_reason = None
send_repeatable_notification(x.id, f"@{v.username} has unbanned you!")
g.db.add(x) g.db.add(x)
ma=ModAction( ma=ModAction(

View file

@ -308,7 +308,10 @@ def api_comment(v):
try: req = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)], timeout=5).json()['data'] try: req = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)], timeout=5).json()['data']
except requests.Timeout: return {"error": "Video upload timed out, please try again!"} except requests.Timeout: return {"error": "Video upload timed out, please try again!"}
try: url = req['link'] try: url = req['link']
except: return {"error": req['error']}, 400 except:
error = req['error']
if error == 'File exceeds max duration': error += ' (60 seconds)'
return {"error": error}, 400
if url.endswith('.'): url += 'mp4' if url.endswith('.'): url += 'mp4'
body += f"\n\n{url}" body += f"\n\n{url}"
else: return {"error": "Image/Video files only"}, 400 else: return {"error": "Image/Video files only"}, 400
@ -771,7 +774,10 @@ def edit_comment(cid, v):
try: req = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)], timeout=5).json()['data'] try: req = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)], timeout=5).json()['data']
except requests.Timeout: return {"error": "Video upload timed out, please try again!"} except requests.Timeout: return {"error": "Video upload timed out, please try again!"}
try: url = req['link'] try: url = req['link']
except: return {"error": req['error']}, 400 except:
error = req['error']
if error == 'File exceeds max duration': error += ' (60 seconds)'
return {"error": error}, 400
if url.endswith('.'): url += 'mp4' if url.endswith('.'): url += 'mp4'
body += f"\n\n{url}" body += f"\n\n{url}"
else: return {"error": "Image/Video files only"}, 400 else: return {"error": "Image/Video files only"}, 400

View file

@ -48,6 +48,9 @@ def error_405(e):
@app.errorhandler(413) @app.errorhandler(413)
def error_413(e): def error_413(e):
return {"error": "Max file size is 8 MB (16 MB for paypigs)"}, 413 return {"error": "Max file size is 8 MB (16 MB for paypigs)"}, 413
if request.headers.get("Authorization") or request.headers.get("xhr"):
return {"error": "Max image size is 8 MB (16 MB for paypigs)"}, 413
else: return render_template('errors/413.html', err=True), 413
@app.errorhandler(429) @app.errorhandler(429)
def error_429(e): def error_429(e):

View file

@ -346,7 +346,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
posts = posts.join(User, User.id == Submission.author_id).filter(User.shadowbanned == None) posts = posts.join(User, User.id == Submission.author_id).filter(User.shadowbanned == None)
if request.host == 'rdrama.net': num = 5 if request.host == 'rdrama.net': num = 5
else: num = 0.1 else: num = 0.5
if sort == "hot": if sort == "hot":
ti = int(time.time()) + 3600 ti = int(time.time()) + 3600

View file

@ -467,7 +467,10 @@ def edit_post(pid, v):
try: req = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)], timeout=5).json()['data'] try: req = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)], timeout=5).json()['data']
except requests.Timeout: return {"error": "Video upload timed out, please try again!"} except requests.Timeout: return {"error": "Video upload timed out, please try again!"}
try: url = req['link'] try: url = req['link']
except: return {"error": req['error']}, 400 except:
error = req['error']
if error == 'File exceeds max duration': error += ' (60 seconds)'
return {"error": error}, 400
if url.endswith('.'): url += 'mp4' if url.endswith('.'): url += 'mp4'
body += f"\n\n{url}" body += f"\n\n{url}"
else: return {"error": "Image/Video files only"}, 400 else: return {"error": "Image/Video files only"}, 400
@ -691,6 +694,11 @@ def thumbnail_thread(pid):
db.close() db.close()
return return
size = len(image.fp.read())
if size > 8 * 1024 * 1024:
db.close()
return
name = f'/images/{time.time()}'.replace('.','') + '.webp' name = f'/images/{time.time()}'.replace('.','') + '.webp'
with open(name, "wb") as file: with open(name, "wb") as file:
@ -1082,7 +1090,10 @@ def submit_post(v, sub=None):
try: req = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)], timeout=5).json()['data'] try: req = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)], timeout=5).json()['data']
except requests.Timeout: return {"error": "Video upload timed out, please try again!"} except requests.Timeout: return {"error": "Video upload timed out, please try again!"}
try: url = req['link'] try: url = req['link']
except: return {"error": req['error']}, 400 except:
error = req['error']
if error == 'File exceeds max duration': error += ' (60 seconds)'
return {"error": error}, 400
if url.endswith('.'): url += 'mp4' if url.endswith('.'): url += 'mp4'
body += f"\n\n{url}" body += f"\n\n{url}"
else: else:
@ -1188,7 +1199,10 @@ def submit_post(v, sub=None):
try: req = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)], timeout=5).json()['data'] try: req = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)], timeout=5).json()['data']
except requests.Timeout: return {"error": "Video upload timed out, please try again!"} except requests.Timeout: return {"error": "Video upload timed out, please try again!"}
try: url = req['link'] try: url = req['link']
except: return {"error": req['error']}, 400 except:
error = req['error']
if error == 'File exceeds max duration': error += ' (60 seconds)'
return {"error": error}, 400
if url.endswith('.'): url += 'mp4' if url.endswith('.'): url += 'mp4'
post.url = url post.url = url
else: else:

View file

@ -224,7 +224,10 @@ def settings_profile_post(v):
try: req = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)], timeout=5).json()['data'] try: req = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)], timeout=5).json()['data']
except requests.Timeout: return {"error": "Video upload timed out, please try again!"} except requests.Timeout: return {"error": "Video upload timed out, please try again!"}
try: url = req['link'] try: url = req['link']
except: return {"error": req['error']}, 400 except:
error = req['error']
if error == 'File exceeds max duration': error += ' (60 seconds)'
return {"error": error}, 400
if url.endswith('.'): url += 'mp4' if url.endswith('.'): url += 'mp4'
bio += f"\n\n{url}" bio += f"\n\n{url}"
else: else:

View file

@ -372,7 +372,10 @@ def submit_contact(v):
try: req = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)], timeout=5).json()['data'] try: req = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)], timeout=5).json()['data']
except requests.Timeout: return {"error": "Video upload timed out, please try again!"} except requests.Timeout: return {"error": "Video upload timed out, please try again!"}
try: url = req['link'] try: url = req['link']
except: return {"error": req['error']}, 400 except:
error = req['error']
if error == 'File exceeds max duration': error += ' (60 seconds)'
return {"error": error}, 400
if url.endswith('.'): url += 'mp4' if url.endswith('.'): url += 'mp4'
body_html += f"<p>{url}</p>" body_html += f"<p>{url}</p>"
else: return {"error": "Image/Video files only"}, 400 else: return {"error": "Image/Video files only"}, 400

View file

@ -686,7 +686,10 @@ def messagereply(v):
try: req = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)], timeout=5).json()['data'] try: req = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)], timeout=5).json()['data']
except requests.Timeout: return {"error": "Video upload timed out, please try again!"} except requests.Timeout: return {"error": "Video upload timed out, please try again!"}
try: url = req['link'] try: url = req['link']
except: return {"error": req['error']}, 400 except:
error = req['error']
if error == 'File exceeds max duration': error += ' (60 seconds)'
return {"error": error}, 400
if url.endswith('.'): url += 'mp4' if url.endswith('.'): url += 'mp4'
body_html += f"<p>{url}</p>" body_html += f"<p>{url}</p>"
else: return {"error": "Image/Video files only"}, 400 else: return {"error": "Image/Video files only"}, 400
@ -887,7 +890,7 @@ def u_username(username, v=None):
try: page = max(int(request.values.get("page", 1)), 1) try: page = max(int(request.values.get("page", 1)), 1)
except: page = 1 except: page = 1
ids = u.userpagelisting(v=v, page=page, sort=sort, t=t) ids = u.userpagelisting(site=SITE, v=v, page=page, sort=sort, t=t)
next_exists = (len(ids) > 25) next_exists = (len(ids) > 25)
ids = ids[:25] ids = ids[:25]

View file

@ -15,7 +15,7 @@
{% if v %} {% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style> <style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=244"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=56"> <link rel="stylesheet" href="/assets/css/main.css?v=246"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=56">
{% if v.agendaposter %} {% if v.agendaposter %}
<style> <style>
html { html {

View file

@ -14,7 +14,7 @@
<title>Chat</title> <title>Chat</title>
<style>:root{--primary:#{{v.themecolor}}}</style> <style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=244"> <link rel="stylesheet" href="/assets/css/main.css?v=246">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=56"> <link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=56">
{% if v.css %} {% if v.css %}
<link rel="stylesheet" href="/@{{v.username}}/css"> <link rel="stylesheet" href="/@{{v.username}}/css">

View file

@ -847,7 +847,7 @@
{% endif %} {% endif %}
{% if v %} {% if v %}
<script src="/assets/js/marked.js?v=250"></script> <script src="/assets/js/marked.js?v=251"></script>
<script src="/assets/js/comments_v.js?v=266"></script> <script src="/assets/js/comments_v.js?v=266"></script>
{% endif %} {% endif %}

View file

@ -7,7 +7,7 @@
<script src="/assets/js/bootstrap.js?v=245"></script> <script src="/assets/js/bootstrap.js?v=245"></script>
{% if v %} {% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style> <style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=244"> <link rel="stylesheet" href="/assets/css/main.css?v=246">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=56"> <link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=56">
{% if v.agendaposter %} {% if v.agendaposter %}
<style> <style>
@ -32,7 +32,7 @@
{% endif %} {% endif %}
{% else %} {% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style> <style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=244"> <link rel="stylesheet" href="/assets/css/main.css?v=246">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=56"> <link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=56">
{% endif %} {% endif %}

View file

@ -0,0 +1,20 @@
{% extends "default.html" %}
{% block title %}
<title>Max image size is 8 MB (16 MB for paypigs)</title>
{% endblock %}
{% block pagetype %}error-413{% endblock %}
{% block content %}
<div class="row justify-content-center">
<div class="col-10 col-md-5">
<div class="text-center px-3 my-8">
<img alt=":#marseyretard:" loading="lazy" src="/e/marseyretard.webp">
<pre></pre>
<h1 class="h5">Max image size is 8 MB (16 MB for paypigs)</h1>
<div><a href="/" class="btn btn-primary">Go to frontpage</a></div>
</div>
</div>
</div>
{% endblock %}

View file

@ -161,7 +161,7 @@
<div class="px-2"> <div class="px-2">
<a class="dropdown-item" href="/assets/{{config('SITE_NAME')}}_v2.2.apk?v=1"><i class="fab fa-android fa-fw mr-3"></i>Android app</a> <a class="dropdown-item" href="/assets/{{config('SITE_NAME')}}_v2.2.apk?v=1"><i class="fab fa-android fa-fw mr-3"></i>Android app</a>
<a class="dropdown-item" href="/changelog"><i class="fas fa-clipboard fa-fw mr-3"></i>Changelog</a> <a class="dropdown-item" href="https://rdrama.net/changelog"><i class="fas fa-clipboard fa-fw mr-3"></i>Changelog</a>
<a class="dropdown-item" rel="nofollow noopener noreferrer" href="https://github.com/Aevann1/rDrama"><i class="fab fa-github fa-fw mr-3"></i>Source code</a> <a class="dropdown-item" rel="nofollow noopener noreferrer" href="https://github.com/Aevann1/rDrama"><i class="fab fa-github fa-fw mr-3"></i>Source code</a>

View file

@ -6,7 +6,7 @@
{% block content %} {% block content %}
{% if v %} {% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style> <style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=244"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=56"> <link rel="stylesheet" href="/assets/css/main.css?v=246"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=56">
{% if v.agendaposter %} {% if v.agendaposter %}
<style> <style>
html { html {
@ -30,7 +30,7 @@
{% endif %} {% endif %}
{% else %} {% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style> <style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=244"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=56"> <link rel="stylesheet" href="/assets/css/main.css?v=246"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=56">
{% endif %} {% endif %}
<div class="row justify-content-around"> <div class="row justify-content-around">

View file

@ -18,7 +18,7 @@
{% endblock %} {% endblock %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style> <style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=244"> <link rel="stylesheet" href="/assets/css/main.css?v=246">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=56"> <link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=56">
</head> </head>

View file

@ -14,7 +14,7 @@
<title>2-Step Login - {{SITE_NAME}}</title> <title>2-Step Login - {{SITE_NAME}}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style> <style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=244"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=56"> <link rel="stylesheet" href="/assets/css/main.css?v=246"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=56">
</head> </head>

View file

@ -34,7 +34,7 @@
<style>:root{--primary:#{{v.themecolor}}}</style> <style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=244"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=56"> <link rel="stylesheet" href="/assets/css/main.css?v=246"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=56">
{% if v.agendaposter %} {% if v.agendaposter %}
<style> <style>
html { html {

View file

@ -39,10 +39,10 @@
{% if v %} {% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style> <style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=244"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=56"> <link rel="stylesheet" href="/assets/css/main.css?v=246"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=56">
{% else %} {% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style> <style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=244"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=56"> <link rel="stylesheet" href="/assets/css/main.css?v=246"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=56">
{% endif %} {% endif %}
</head> </head>
@ -77,7 +77,7 @@
<a class="nav-link{% if request.path.endswith('/blocks') %} active{% endif %}" href="/blocks"><i class="fas fa-user-slash pr-2"></i>Blocks</a> <a class="nav-link{% if request.path.endswith('/blocks') %} active{% endif %}" href="/blocks"><i class="fas fa-user-slash pr-2"></i>Blocks</a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link{% if request.path.endswith('/changelog') %} active{% endif %}" href="/changelog"><i class="fas fa-clipboard pr-2"></i>Changelog</a> <a class="nav-link{% if request.path.endswith('/changelog') %} active{% endif %}" href="https://rdrama.net/changelog"><i class="fas fa-clipboard pr-2"></i>Changelog</a>
</li> </li>
</ul> </ul>
</div> </div>
@ -108,7 +108,7 @@
<a style="padding: 0.75rem 1rem"class="nav-link{% if request.path.endswith('/blocks') %} active{% endif %}" href="/blocks"><i class="fas fa-eye-slash text-lg mr-0"></i></a> <a style="padding: 0.75rem 1rem"class="nav-link{% if request.path.endswith('/blocks') %} active{% endif %}" href="/blocks"><i class="fas fa-eye-slash text-lg mr-0"></i></a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a style="padding: 0.75rem 1rem"class="nav-link{% if request.path.endswith('/changelog') %} active{% endif %}" href="/changelog"><i class="fas fa-clipboard text-lg mr-0"></i></a> <a style="padding: 0.75rem 1rem"class="nav-link{% if request.path.endswith('/changelog') %} active{% endif %}" href="https://rdrama.net/changelog"><i class="fas fa-clipboard text-lg mr-0"></i></a>
</li> </li>
</ul> </ul>
</div> </div>

View file

@ -14,8 +14,8 @@
{% endif %} {% endif %}
{% if v %} {% if v %}
<div class="d-lg-block d-none btn-block"> <div class="d-lg-block d-none btn-block">
<a class="btn btn-primary btn-block mb-3 {% if v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/block','block-sub','unblock-sub');this.classList.toggle('d-none');nextElementSibling.classList.toggle('d-none')">BLOCK HOLE</a> <a class="btn btn-primary btn-block mb-3 {% if v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/block','block-sub','unblock-sub');this.classList.toggle('d-none');nextElementSibling.classList.toggle('d-none')">Block /h/{{sub.name}}</a>
<a class="btn btn-primary btn-block mb-3 {% if not v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/unblock','block-sub','unblock-sub');this.classList.toggle('d-none');previousElementSibling.classList.toggle('d-none')">UNBLOCK HOLE</a> <a class="btn btn-primary btn-block mb-3 {% if not v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/unblock','block-sub','unblock-sub');this.classList.toggle('d-none');previousElementSibling.classList.toggle('d-none')">Unblock /h/{{sub.name}}</a>
</div> </div>
<a class="btn btn-primary btn-block mb-3" href="/create_sub">CREATE HOLE</a> <a class="btn btn-primary btn-block mb-3" href="/create_sub">CREATE HOLE</a>

View file

@ -9,8 +9,8 @@
{% endif %} {% endif %}
{% if v %} {% if v %}
<div class="d-lg-block d-none btn-block"> <div class="d-lg-block d-none btn-block">
<a class="btn btn-primary btn-block {% if v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/block','block-sub','unblock-sub');this.classList.toggle('d-none');nextElementSibling.classList.toggle('d-none')">BLOCK HOLE</a> <a class="btn btn-primary btn-block {% if v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/block','block-sub','unblock-sub');this.classList.toggle('d-none');nextElementSibling.classList.toggle('d-none')">Block /h/{{sub.name}}</a>
<a class="btn btn-primary btn-block {% if not v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/unblock','block-sub','unblock-sub');this.classList.toggle('d-none');previousElementSibling.classList.toggle('d-none')">UNBLOCK HOLE</a> <a class="btn btn-primary btn-block {% if not v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/unblock','block-sub','unblock-sub');this.classList.toggle('d-none');previousElementSibling.classList.toggle('d-none')">Unblock /h/{{sub.name}}</a>
</div> </div>
{% endif %} {% endif %}
<a class="btn btn-primary btn-block" href="/h/{{sub.name}}/mods">HOLE MODS</a> <a class="btn btn-primary btn-block" href="/h/{{sub.name}}/mods">HOLE MODS</a>

View file

@ -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=41' %} {% set image = "/" + path + "/" + listdir('files/' + path)|random() + '?v=42' %}
{% endif %} {% endif %}
{% if v and (v.is_banned or v.agendaposter) %} {% if v and (v.is_banned or v.agendaposter) %}
@ -19,8 +19,8 @@
{% endif %} {% endif %}
{% if v %} {% if v %}
<div class="d-lg-block d-none btn-block"> <div class="d-lg-block d-none btn-block">
<a class="btn btn-primary btn-block mb-3 {% if v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/block','block-sub','unblock-sub');this.classList.toggle('d-none');nextElementSibling.classList.toggle('d-none')">BLOCK HOLE</a> <a class="btn btn-primary btn-block mb-3 {% if v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/block','block-sub','unblock-sub');this.classList.toggle('d-none');nextElementSibling.classList.toggle('d-none')">Block /h/{{sub.name}}</a>
<a class="btn btn-primary btn-block mb-3 {% if not v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/unblock','block-sub','unblock-sub');this.classList.toggle('d-none');previousElementSibling.classList.toggle('d-none')">UNBLOCK HOLE</a> <a class="btn btn-primary btn-block mb-3 {% if not v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/unblock','block-sub','unblock-sub');this.classList.toggle('d-none');previousElementSibling.classList.toggle('d-none')">Unblock /h/{{sub.name}}</a>
</div> </div>
{% if v.admin_level > 2 %} {% if v.admin_level > 2 %}

View file

@ -31,7 +31,7 @@
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %}</title> <title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style> <style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=244"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=56"> <link rel="stylesheet" href="/assets/css/main.css?v=246"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=56">
</head> </head>

View file

@ -32,7 +32,7 @@
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title> <title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style> <style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=244"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=56"> <link rel="stylesheet" href="/assets/css/main.css?v=246"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=56">
</head> </head>

View file

@ -113,7 +113,7 @@
<input autocomplete="off" id="file-upload" type="file" name="file" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} accept="image/*, video/*" hidden> <input autocomplete="off" id="file-upload" type="file" name="file" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} accept="image/*, video/*" hidden>
</label> </label>
<small class="form-text text-muted">Optional if you have text.</small> <small class="form-text text-muted">Optional if you have text.</small>
<small class="form-text text-muted">You can upload images or videos.</small> <small class="form-text text-muted">You can upload images or videos up to 60 seconds.</small>
</div> </div>
</div> </div>
@ -227,9 +227,9 @@
</script> </script>
{% endif %} {% endif %}
<script src="/assets/js/marked.js?v=250"></script> <script src="/assets/js/marked.js?v=251"></script>
<script src="/assets/js/formatting.js?v=240"></script> <script src="/assets/js/formatting.js?v=240"></script>
<script src="/assets/js/submit.js?v=254"></script> <script src="/assets/js/submit.js?v=255"></script>
{% include "emoji_modal.html" %} {% include "emoji_modal.html" %}
{% include "gif_modal.html" %} {% include "gif_modal.html" %}

View file

@ -769,7 +769,7 @@
</nav> </nav>
{% endif %} {% endif %}
<script src="/assets/js/marked.js?v=250"></script> <script src="/assets/js/marked.js?v=251"></script>
{% if v and v.id != u.id and '/comments' not in request.path %} {% if v and v.id != u.id and '/comments' not in request.path %}

View file

@ -1,39 +1,39 @@
INSERT INTO public.users (username, passhash, created_utc, admin_level, over_18, is_activated, bio, bio_html, login_nonce, is_private, INSERT INTO public.users (username, passhash, created_utc, admin_level, over_18, is_activated, bio, bio_html, login_nonce, is_private,
unban_utc, original_username, customtitle, defaultsorting, defaultsortingcomments, defaulttime, namecolor, titlecolor, unban_utc, original_username, customtitle, defaultsorting, defaultsortingcomments, defaulttime, namecolor, titlecolor,
customtitleplain, theme, themecolor, changelogsub, reddit, css, profilecss, coins, agendaposter, customtitleplain, theme, themecolor, changelogsub, reddit, css, profilecss, coins, agendaposter,
post_count, comment_count, background, verified, truecoins, cardview, subs post_count, comment_count, background, verified, truecoins, cardview
) VALUES ('System', '', 0, 0, true, true, '', '', 0, false, ) VALUES ('System', '', extract(epoch from now()), 0, true, true, '', '', 0, false,
0, 'System', '', 'hot', 'top', 'day', 'ff66ac', 'ff66ac', 0, 'System', '', 'hot', 'top', 'day', 'ff66ac', 'ff66ac',
'', 'dark', 'ff66ac', false, 'old.reddit.com', '', '', 0, 0, '', 'dark', 'ff66ac', false, 'old.reddit.com', '', '', 0, 0,
0, 0, '', 'Verified', 0, false, 2), 0, 0, '', 'Verified', 0, false),
('AutoJanny', '', 0, 0, true, true, '', '', 0, false, ('AutoJanny', '', extract(epoch from now()), 0, true, true, '', '', 0, false,
0, 'AutoJanny', '', 'hot', 'top', 'day', 'ff66ac', 'ff66ac', 0, 'AutoJanny', '', 'hot', 'top', 'day', 'ff66ac', 'ff66ac',
'', 'dark', 'ff66ac', false, 'old.reddit.com', '', '', 0, 0, '', 'dark', 'ff66ac', false, 'old.reddit.com', '', '', 0, 0,
0, 0, '', 'Verified', 0, false, 2), 0, 0, '', 'Verified', 0, false),
('Snappy', '', 0, 0, true, true, '', '', 0, false, ('Snappy', '', extract(epoch from now()), 0, true, true, '', '', 0, false,
0, 'Snappy', '', 'hot', 'top', 'day', '62ca56', 'e4432d', 0, 'Snappy', '', 'hot', 'top', 'day', '62ca56', 'e4432d',
'', 'dark', '30409f', false, 'old.reddit.com', '', '', 0, 0, '', 'dark', '30409f', false, 'old.reddit.com', '', '', 0, 0,
0, 0, '', 'Verified', 0, false, 2), 0, 0, '', 'Verified', 0, false),
('longpostbot', '', 0, 0, true, true, '', '', 0, false, ('longpostbot', '', extract(epoch from now()), 0, true, true, '', '', 0, false,
0, 'longpostbot', '', 'hot', 'top', 'day', '62ca56', 'e4432d', 0, 'longpostbot', '', 'hot', 'top', 'day', '62ca56', 'e4432d',
'', 'dark', '30409f', false, 'old.reddit.com', '', '', 0, 0, '', 'dark', '30409f', false, 'old.reddit.com', '', '', 0, 0,
0, 0, '', 'Verified', 0, false, 2), 0, 0, '', 'Verified', 0, false),
('zozbot', '', 0, 0, true, true, '', '', 0, false, ('zozbot', '', extract(epoch from now()), 0, true, true, '', '', 0, false,
0, 'zozbot', '', 'hot', 'top', 'day', '62ca56', 'e4432d', 0, 'zozbot', '', 'hot', 'top', 'day', '62ca56', 'e4432d',
'', 'dark', '30409f', false, 'old.reddit.com', '', '', 0, 0, '', 'dark', '30409f', false, 'old.reddit.com', '', '', 0, 0,
0, 0, '', 'Verified', 0, false, 2), 0, 0, '', 'Verified', 0, false),
('AutoPoller', '', 0, 0, true, true, '', '', 0, false, ('AutoPoller', '', extract(epoch from now()), 0, true, true, '', '', 0, false,
0, 'AutoPoller', '', 'hot', 'top', 'day', '62ca56', 'e4432d', 0, 'AutoPoller', '', 'hot', 'top', 'day', '62ca56', 'e4432d',
'', 'dark', '30409f', false, 'old.reddit.com', '', '', 0, 0, '', 'dark', '30409f', false, 'old.reddit.com', '', '', 0, 0,
0, 0, '', 'Verified', 0, false, 2), 0, 0, '', 'Verified', 0, false),
('AutoBetter', '', 0, 0, true, true, '', '', 0, false, ('AutoBetter', '', extract(epoch from now()), 0, true, true, '', '', 0, false,
0, 'AutoBetter', '', 'hot', 'top', 'day', '62ca56', 'e4432d', 0, 'AutoBetter', '', 'hot', 'top', 'day', '62ca56', 'e4432d',
'', 'dark', '30409f', false, 'old.reddit.com', '', '', 0, 0, '', 'dark', '30409f', false, 'old.reddit.com', '', '', 0, 0,
0, 0, '', 'Verified', 0, false, 2), 0, 0, '', 'Verified', 0, false),
('AutoChoice', '', 0, 0, true, true, '', '', 0, false, ('AutoChoice', '', extract(epoch from now()), 0, true, true, '', '', 0, false,
0, 'AutoChoice', '', 'hot', 'top', 'day', '62ca56', 'e4432d', 0, 'AutoChoice', '', 'hot', 'top', 'day', '62ca56', 'e4432d',
'', 'dark', '30409f', false, 'old.reddit.com', '', '', 0, 0, '', 'dark', '30409f', false, 'old.reddit.com', '', '', 0, 0,
0, 0, '', 'Verified', 0, false, 2); 0, 0, '', 'Verified', 0, false);
INSERT INTO public.badge_defs VALUES INSERT INTO public.badge_defs VALUES
(1,'Alpha User','Joined during open alpha'), (1,'Alpha User','Joined during open alpha'),

View file

@ -3766,3 +3766,5 @@ DUDE i just LOVE the calm relaxation of the Midwest town, it's so PEACEFUL and m
Thats not the point, its about ethics in games journalism. Thats not the point, its about ethics in games journalism.
{[para]} {[para]}
![](/images/16512452037737622.webp) ![](/images/16512452037737622.webp)
{[para]}
It's too bad @carpathianflorist is dead. He would have loved this