forked from MarseyWorld/MarseyWorld
fsd
parent
25f27acd05
commit
f65ff6a353
|
@ -525,7 +525,7 @@ def reported_comments(v):
|
|||
def admin_home(v):
|
||||
with open('disable_signups', 'r') as f: x = f.read()
|
||||
|
||||
if CF_ZONE == '3435tdfsdudebussylmaoxxt43': response = 'high'
|
||||
if CF_ZONE == 'blahblahblah': response = 'high'
|
||||
else: response = requests.get(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/settings/security_level', headers=CF_HEADERS, timeout=5).json()['result']['value']
|
||||
|
||||
x2 = response == 'under_attack'
|
||||
|
|
|
@ -25,7 +25,7 @@ d = Dict("en_US")
|
|||
|
||||
IMGUR_KEY = environ.get("IMGUR_KEY").strip()
|
||||
|
||||
if PUSHER_ID != '3435tdfsdudebussylmaoxxt43':
|
||||
if PUSHER_ID != 'blahblahblah':
|
||||
beams_client = PushNotifications(instance_id=PUSHER_ID, secret_key=PUSHER_KEY)
|
||||
|
||||
WORDLE_COLOR_MAPPINGS = {-1: "🟥", 0: "🟨", 1: "🟩"}
|
||||
|
@ -637,7 +637,7 @@ def api_comment(v):
|
|||
n = Notification(comment_id=c.id, user_id=x)
|
||||
g.db.add(n)
|
||||
|
||||
if parent.author.id != v.id and PUSHER_ID != '3435tdfsdudebussylmaoxxt43':
|
||||
if parent.author.id != v.id and PUSHER_ID != 'blahblahblah':
|
||||
gevent.spawn(pusher_thread, f'{request.host}{parent.author.id}', c)
|
||||
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ from collections import Counter
|
|||
import gevent
|
||||
from sys import stdout
|
||||
|
||||
if PUSHER_ID != '3435tdfsdudebussylmaoxxt43':
|
||||
if PUSHER_ID != 'blahblahblah':
|
||||
beams_client = PushNotifications(instance_id=PUSHER_ID, secret_key=PUSHER_KEY)
|
||||
|
||||
def pusher_thread2(interests, notifbody, username):
|
||||
|
@ -582,7 +582,7 @@ def message2(v, username):
|
|||
|
||||
message = request.values.get("message", "").strip()[:10000].strip()
|
||||
|
||||
if not message: return {"error": "message is empty"}
|
||||
if not message: return {"error": "Message is empty!"}
|
||||
|
||||
if 'linkedin.com' in message: return {"error": "This domain 'linkedin.com' is banned."}, 403
|
||||
|
||||
|
@ -611,7 +611,7 @@ def message2(v, username):
|
|||
notif = Notification(comment_id=c.id, user_id=user.id)
|
||||
g.db.add(notif)
|
||||
|
||||
if PUSHER_ID != '3435tdfsdudebussylmaoxxt43':
|
||||
if PUSHER_ID != 'blahblahblah':
|
||||
if len(message) > 500: notifbody = message[:500] + '...'
|
||||
else: notifbody = message
|
||||
|
||||
|
@ -629,7 +629,7 @@ def messagereply(v):
|
|||
|
||||
message = request.values.get("body", "").strip()[:10000].strip()
|
||||
|
||||
if not message: return {"error": "message is empty"}
|
||||
if not message: return {"error": "Message is empty!"}
|
||||
|
||||
if 'linkedin.com' in message: return {"error": "this domain 'linkedin.com' is banned"}
|
||||
|
||||
|
@ -659,7 +659,7 @@ def messagereply(v):
|
|||
notif = Notification(comment_id=new_comment.id, user_id=user_id)
|
||||
g.db.add(notif)
|
||||
|
||||
if PUSHER_ID != '3435tdfsdudebussylmaoxxt43':
|
||||
if PUSHER_ID != 'blahblahblah':
|
||||
if len(message) > 500: notifbody = message[:500] + '...'
|
||||
else: notifbody = message
|
||||
|
||||
|
|
|
@ -544,7 +544,7 @@
|
|||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
<input type="hidden" name="parent_fullname" value="{{c.fullname}}">
|
||||
<input autocomplete="off" id="reply-form-submission-{{c.fullname}}" type="hidden" name="submission" value="{{c.post.id}}">
|
||||
<textarea autocomplete="off" {% if v.longpost %}minlength="280"{% endif %} maxlength="{% if v.bird %}140{% else %}10000{% endif %}" oninput="markdown('reply-form-body-{{c.fullname}}', 'reply-edit-{{c.id}}');charLimit('reply-form-body-{{c.fullname}}','charcount-{{c.id}}')" id="reply-form-body-{{c.fullname}}" data-fullname="{{c.fullname}}" name="body" form="reply-to-t3_{{c.id}}" class="comment-box form-control rounded" aria-label="With textarea" placeholder="Add your comment..." rows="3"></textarea>
|
||||
<textarea autocomplete="off" {% if v.longpost %}minlength="280"{% endif %} maxlength="{% if v.bird %}140{% else %}10000{% endif %}" oninput="unlock('save-reply-to-{{c.fullname}}');markdown('reply-form-body-{{c.fullname}}', 'reply-edit-{{c.id}}');charLimit('reply-form-body-{{c.fullname}}','charcount-{{c.id}}')" id="reply-form-body-{{c.fullname}}" data-fullname="{{c.fullname}}" name="body" form="reply-to-t3_{{c.id}}" class="comment-box form-control rounded" aria-label="With textarea" placeholder="Add your comment..." rows="3"></textarea>
|
||||
|
||||
<div class="text-small font-weight-bold mt-1" id="charcount-{{c.id}}" style="right: 1rem; bottom: 0.5rem; z-index: 3;"></div>
|
||||
|
||||
|
@ -569,7 +569,7 @@
|
|||
<input autocomplete="off" id="file-upload-reply-{{c.fullname}}" type="file" multiple="multiple" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-show-reply-{{c.fullname}}','file-upload-reply-{{c.fullname}}')" hidden>
|
||||
</label>
|
||||
</div>
|
||||
<a id="save-reply-to-{{c.fullname}}" class="btn btn-primary ml-2 fl-r commentmob" onclick="post_comment('{{c.fullname}}', '{{c.post.id}}')"role="button">Comment</a>
|
||||
<a id="save-reply-to-{{c.fullname}}" class="disabled btn btn-primary ml-2 fl-r commentmob" onclick="post_comment('{{c.fullname}}', '{{c.post.id}}')"role="button">Comment</a>
|
||||
<a role="button" onclick="document.getElementById('reply-to-{{c.id}}').classList.add('d-none')" class="btn btn-link text-muted ml-auto cancel-form fl-r commentmob">Cancel</a>
|
||||
</form>
|
||||
<div id="reply-edit-{{c.id}}" class="preview mb-3 mt-5"></div>
|
||||
|
@ -599,7 +599,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 type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
<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>
|
||||
<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="unlock('save-reply-to-{{c.id}}');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}}" 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" title="Add Emoji">
|
||||
<i id="emoji-reply-btn-{{c.id}}" class="fas fa-smile-beam"></i>
|
||||
|
@ -607,7 +607,7 @@
|
|||
</div>
|
||||
|
||||
<a role="button" onclick="document.getElementById('reply-message-{{c.id}}').classList.add('d-none')" class="btn btn-link text-muted ml-auto cancel-form">Cancel</a>
|
||||
<a id="save-reply-to-{{c.id}}" class="btn btn-primary ml-2" onclick="post_reply('{{c.id}}') "role="button">Reply</a>
|
||||
<a id="save-reply-to-{{c.id}}" class="disabled btn btn-primary ml-2" onclick="post_reply('{{c.id}}') "role="button">Reply</a>
|
||||
</form>
|
||||
<div id="message-reply-{{c.id}}" class="preview mt-2"></div>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta name="description" content="{{config('DESCRIPTION')}}">
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' ajax.cloudflare.com; connect-src 'self' tls-use1.fpapi.io api.fpjs.io {% if PUSHER_ID != '3435tdfsdudebussylmaoxxt43' %}{{PUSHER_ID}}.pushnotifications.pusher.com{% endif %}; object-src 'none';">
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' ajax.cloudflare.com; connect-src 'self' tls-use1.fpapi.io api.fpjs.io {% if PUSHER_ID != 'blahblahblah' %}{{PUSHER_ID}}.pushnotifications.pusher.com{% endif %}; object-src 'none';">
|
||||
|
||||
<script src="/static/assets/js/bootstrap.js?v=245"></script>
|
||||
{% if v %}
|
||||
|
|
|
@ -256,7 +256,7 @@
|
|||
</div>
|
||||
</nav>
|
||||
|
||||
<script src="/static/assets/js/header.js?v=251"></script>
|
||||
<script src="/static/assets/js/header.js?v=252"></script>
|
||||
|
||||
{% if v and not err %}
|
||||
<div id="formkey" class="d-none">{{v.formkey}}</div>
|
||||
|
|
|
@ -241,7 +241,7 @@
|
|||
};
|
||||
</script>
|
||||
|
||||
{% if PUSHER_ID != '3435tdfsdudebussylmaoxxt43' and v %}
|
||||
{% if PUSHER_ID != 'blahblahblah' and v %}
|
||||
<div class="d-none" id="strid">{{request.host}}{{v.id}}</div>
|
||||
<div class="d-none" id="pusherid">{{PUSHER_ID}}</div>
|
||||
<script src="/static/assets/js/pusher.js?v=242"></script>
|
||||
|
|
|
@ -932,7 +932,7 @@
|
|||
<input type="hidden" name="parent_fullname" value="t2_{{p.id}}">
|
||||
<input autocomplete="off" id="reply-form-submission-{{p.fullname}}" type="hidden" name="submission" value="{{p.id}}">
|
||||
{% if v %}
|
||||
<textarea autocomplete="off" {% if not (p and p.id in ADMIGGERS) %}{% if v.longpost %}minlength="280"{% elif v.bird %}maxlength="140"{% endif %}{% endif %} maxlength="10000" oninput="markdown('reply-form-body-{{p.fullname}}', 'form-preview-{{p.id}}');charLimit('reply-form-body-{{p.fullname}}','charcount-reply')" id="reply-form-body-{{p.fullname}}" data-fullname="{{p.fullname}}" class="comment-box form-control rounded" id="comment-form" name="body" form="reply-to-{{p.fullname}}" aria-label="With textarea" placeholder="Add your comment..." rows="3"></textarea>
|
||||
<textarea autocomplete="off" {% if not (p and p.id in ADMIGGERS) %}{% if v.longpost %}minlength="280"{% elif v.bird %}maxlength="140"{% endif %}{% endif %} maxlength="10000" oninput="unlock('save-reply-to-{{p.fullname}}');markdown('reply-form-body-{{p.fullname}}', 'form-preview-{{p.id}}');charLimit('reply-form-body-{{p.fullname}}','charcount-reply')" id="reply-form-body-{{p.fullname}}" data-fullname="{{p.fullname}}" class="comment-box form-control rounded" id="comment-form" name="body" form="reply-to-{{p.fullname}}" aria-label="With textarea" placeholder="Add your comment..." rows="3"></textarea>
|
||||
{% endif %}
|
||||
|
||||
<div class="text-small font-weight-bold mt-1" id="charcount-reply" style="right: 1rem; bottom: 0.5rem; z-index: 3;"></div>
|
||||
|
@ -956,7 +956,7 @@
|
|||
<input autocomplete="off" id="file-upload-reply-{{p.fullname}}" type="file" multiple="multiple" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-show-reply-{{p.fullname}}','file-upload-reply-{{p.fullname}}')" hidden>
|
||||
</label>
|
||||
</div>
|
||||
<a id="save-reply-to-{{p.fullname}}" role="button" form="reply-to-{{p.fullname}}" class="btn btn-primary text-whitebtn ml-auto fl-r" onclick="post_comment('{{p.fullname}}', '{{p.id}}')">Comment</a>
|
||||
<a id="save-reply-to-{{p.fullname}}" role="button" form="reply-to-{{p.fullname}}" class="btn btn-primary text-whitebtn ml-auto fl-r disabled" onclick="post_comment('{{p.fullname}}', '{{p.id}}')">Comment</a>
|
||||
</form>
|
||||
<div id="form-preview-{{p.id}}" class="mb-3 mt-5"></div>
|
||||
<div class="form-text text-small p-0 m-0"><a href="/formatting" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>Formatting help</a></div>
|
||||
|
|
Loading…
Reference in New Issue