remove the code i added for rdrama.com

remotes/1693176582716663532/tmp_refs/heads/watchparty
Aevann1 2022-11-11 15:52:18 +02:00
parent 1b4856e20f
commit 05b7e79b76
15 changed files with 20 additions and 20 deletions

View File

@ -90,7 +90,7 @@ class Comment(Base):
@lazy
def can_see(self, v):
if not SITE.startswith('rdrama.'): return True
if SITE != 'rdrama.net': return True
if not self.parent_submission: return True
if self.post.sub != 'chudrama': return True
if v:

View File

@ -80,7 +80,7 @@ class Submission(Base):
@lazy
def can_see(self, v):
if not SITE.startswith('rdrama.'): return True
if SITE != 'rdrama.net': return True
if self.sub != 'chudrama': return True
if v:
if v.can_see_chudrama: return True

View File

@ -455,7 +455,7 @@ TIERS_ID_TO_NAME = {
6: "Rich Bich"
}
if SITE.startswith('rdrama.'):
if SITE == 'rdrama.net':
FEATURES['PRONOUNS'] = True
FEATURES['HOUSES'] = True
FEATURES['USERS_PERMANENT_WORD_FILTERS'] = True
@ -1379,7 +1379,7 @@ if len(SITE_NAME) > 5:
if SITE != 'localhost':
REDDIT_NOTIFS_SITE.add(SITE)
if SITE.startswith('rdrama.'):
if SITE == 'rdrama.net':
REDDIT_NOTIFS_SITE.add('marsey')
REDDIT_NOTIFS_SITE.add('"r/Drama"')
REDDIT_NOTIFS_SITE.add('justice4darrell')

View File

@ -24,7 +24,7 @@ def chart(kind, site):
now.tm_wday, now.tm_yday, 0))
today_cutoff = calendar.timegm(midnight_this_morning)
if SITE.startswith('rdrama.'):
if SITE == 'rdrama.net':
time_diff = time.time() - 1619827200
num_of_weeks = int(time_diff / 604800)
chart_width = int(num_of_weeks/1.4)

View File

@ -159,7 +159,7 @@ def merge_all(v, id):
@app.post("/@<username>/make_admin")
@admin_level_required(PERMS['ADMIN_ADD'])
def make_admin(v, username):
if SITE.startswith('rdrama.'): abort(403)
if SITE == 'rdrama.net': abort(403)
user = get_user(username)

View File

@ -158,7 +158,7 @@ def award_thing(v, thing_type, id):
author = thing.author
if author.shadowbanned: abort(404)
if SITE.startswith('rdrama.') and author.id in (PIZZASHILL_ID, CARP_ID):
if SITE == 'rdrama.net' and author.id in (PIZZASHILL_ID, CARP_ID):
abort(403, "This user is immune to awards.")
if kind == "benefactor" and author.id == v.id:

View File

@ -56,7 +56,7 @@ def speak(data, v):
global messages, total
if SITE.startswith('rdrama.'): text = data['message'][:200].strip()
if SITE == 'rdrama.net': text = data['message'][:200].strip()
else: text = data['message'][:1000].strip()
if not text: return '', 403

View File

@ -22,7 +22,7 @@ def rdrama(id, title):
@app.get("/marseys")
@auth_required
def marseys(v):
if SITE.startswith('rdrama.'):
if SITE == 'rdrama.net':
marseys = g.db.query(Marsey, User).join(User, Marsey.author_id == User.id).filter(Marsey.submitter_id==None)
sort = request.values.get("sort", "usage")
if sort == "usage":
@ -52,7 +52,7 @@ def marsey_list():
if EMOJI_MARSEYS:
emojis = [{
"name": emoji.name,
"author": author if SITE.startswith('rdrama.') or author == "anton-d" else None,
"author": author if SITE == 'rdrama.net' or author == "anton-d" else None,
# yikes, I don't really like this DB schema. Next time be better
"tags": emoji.tags.split(" ") + [emoji.name[len("marsey"):] \
if emoji.name.startswith("marsey") else emoji.name],

View File

@ -433,7 +433,7 @@ def message2(v, username):
body_html = sanitize(message)
if not (SITE.startswith('rdrama.') and user.id == BLACKJACKBTZ_ID):
if not (SITE == 'rdrama.net' and user.id == BLACKJACKBTZ_ID):
existing = g.db.query(Comment.id).filter(Comment.author_id == v.id,
Comment.sentto == user.id,
Comment.body_html == body_html,

View File

@ -404,7 +404,7 @@
<a class="btn caction nobackground px-1 text-muted" href="{{c.permalink}}"><i class="fas fa-book-open"></i>Context</a>
<button type="button" class="btn caction py-0 nobackground px-1 text-muted copy-link" data-clipboard-text="{% if SITE.startswith('rdrama.') %}https://{{BAN_EVASION_DOMAIN}}{{c.shortlink}}{% else %}{{c.permalink}}{% endif %}"><i class="fas fa-copy"></i>Copy link</button>
<button type="button" class="btn caction py-0 nobackground px-1 text-muted copy-link" data-clipboard-text="{% if SITE == 'rdrama.net' %}https://{{BAN_EVASION_DOMAIN}}{{c.shortlink}}{% else %}{{c.permalink}}{% endif %}"><i class="fas fa-copy"></i>Copy link</button>
{% if v %}
{% if not c.deleted_utc %}
@ -618,7 +618,7 @@
<a class="list-group-item" href="{{c.permalink}}"><i class="fas fa-book-open mr-2"></i>Context</a>
<button type="button" class="list-group-item copy-link" data-bs-dismiss="modal" data-clipboard-text="{% if SITE.startswith('rdrama.') %}https://{{BAN_EVASION_DOMAIN}}{{c.shortlink}}{% else %}{{c.permalink}}{% endif %}"><i class="fas fa-copy mr-2"></i>Copy link</button>
<button type="button" class="list-group-item copy-link" data-bs-dismiss="modal" data-clipboard-text="{% if SITE == 'rdrama.net' %}https://{{BAN_EVASION_DOMAIN}}{{c.shortlink}}{% else %}{{c.permalink}}{% endif %}"><i class="fas fa-copy mr-2"></i>Copy link</button>
{% if v %}
<button type="button" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportCommentModal" onclick="report_commentModal('{{c.id}}','{{c.author_name}}')" class="list-group-item"><i class="fas fa-flag mr-2"></i>Report</button>

View File

@ -84,7 +84,7 @@
<th scope="col">Hat</th>
<th scope="col">Name</th>
<th scope="col">Description</th>
{% if SITE.startswith('rdrama.') %}
{% if SITE == 'rdrama.net' %}
{% if request.values.get("sort") == 'author_asc' %}
<th scope="col"><a href="?sort=author_desc">Author</a></th>
{% else %}
@ -114,7 +114,7 @@
</td>
<td>{{hat.name}}</td>
<td style="word-break:break-word">{{hat.censored_description(v)}}</td>
{% if SITE.startswith('rdrama.') %}
{% if SITE == 'rdrama.net' %}
<td>{% include "user_in_table.html" %}</td>
{% endif %}
<td><a href="/hat_owners/{{hat.id}}">{{hat.number_sold}}</a></td>

View File

@ -35,7 +35,7 @@
{% endmacro %}
{% macro cf_2fa_verify() %}
{% if SITE.startswith('rdrama.') %}
{% if SITE == 'rdrama.net' %}
<meta name="cf-2fa-verify" content="4f40ca1ca249313">
{% elif SITE == 'watchpeopledie.tv' %}
<meta name="cf-2fa-verify" content="372aba5b9338e00">

View File

@ -7,7 +7,7 @@
<th>Name</th>
<th>Marsey</th>
<th>Usage</th>
{% if SITE.startswith('rdrama.') %}
{% if SITE == 'rdrama.net' %}
<th><a href="?sort=author">Author</a></th>
<th><a href="?sort=added">Added on</a></th>
<th>Original File</th>
@ -15,7 +15,7 @@
</tr>
</thead>
<tbody id="marseys-table">
{% if SITE.startswith('rdrama.') %}
{% if SITE == 'rdrama.net' %}
{% for marsey, user in marseys %}
<tr>
<td>{{loop.index}}</td>

View File

@ -12,7 +12,7 @@
<button type="button" class="list-inline-item text-muted d-none d-md-inline-block" data-bs-toggle="modal" data-bs-target="#awardModal" data-url='/award/post/{{p.id}}' onclick="document.getElementById('giveaward').dataset.action = this.dataset.url"><i class="fas fa-gift fa-fw"></i>Give Award</button>
{% endif %}
<button type="button" class="list-inline-item copy-link" data-clipboard-text="{% if SITE.startswith('rdrama.') %}https://{{BAN_EVASION_DOMAIN}}{{p.shortlink}}{% else %}{{p.permalink}}{% endif %}"><i class="fas fa-copy"></i>Copy link</button>
<button type="button" class="list-inline-item copy-link" data-clipboard-text="{% if SITE == 'rdrama.net' %}https://{{BAN_EVASION_DOMAIN}}{{p.shortlink}}{% else %}{{p.permalink}}{% endif %}"><i class="fas fa-copy"></i>Copy link</button>
{% if v %}
<button type="button" id="subscribe-{{p.id}}" class="{% if p.id in v.subscribed_idlist %}d-none{% endif %} list-inline-item" data-click="postToastSwitch(this,'/subscribe/{{p.id}}','subscribe-{{p.id}}','unsubscribe-{{p.id}}','d-none')" onclick="areyousure(this)"><i class="fas fa-eye"></i>Subscribe</button>

View File

@ -12,7 +12,7 @@
</a>
{% endif %}
<button type="button" data-bs-dismiss="modal" class="copy-link nobackground btn btn-link btn-block btn-lg text-left text-muted" data-clipboard-text="{% if SITE.startswith('rdrama.') %}https://{{BAN_EVASION_DOMAIN}}{{p.shortlink}}{% else %}{{p.permalink}}{% endif %}"><i class="far fa-copy text-center text-muted mr-2"></i>Copy link</button>
<button type="button" data-bs-dismiss="modal" class="copy-link nobackground btn btn-link btn-block btn-lg text-left text-muted" data-clipboard-text="{% if SITE == 'rdrama.net' %}https://{{BAN_EVASION_DOMAIN}}{{p.shortlink}}{% else %}{{p.permalink}}{% endif %}"><i class="far fa-copy text-center text-muted mr-2"></i>Copy link</button>
<button type="button" class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportPostModal" onclick="report_postModal('{{p.id}}')"><i class="far fa-flag text-center text-muted mr-2"></i>Report</button>