master
Aevann1 2021-12-10 19:31:32 +02:00
parent 4fef580465
commit c4d9dc8b3e
10 changed files with 21 additions and 37 deletions

View File

@ -595,11 +595,6 @@ def api_comment(v):
g.db.commit()
if v.agendaposter and random.randint(1, 10) < 4:
if request.host == 'rdrama.net':
return redirect(random.choice(['https://secure.actblue.com/donate/ms_blm_homepage_2019','https://rdrama.net/post/19711/a-short-guide-on-how-to','https://secure.transequality.org/site/Donation2?df_id=1480']))
return redirect('https://secure.actblue.com/donate/ms_blm_homepage_2019')
if request.headers.get("Authorization"): return c.json
else: return render_template("comments.html", v=v, comments=[c])

View File

@ -93,10 +93,6 @@ def post_id(pid, anything=None, v=None):
if v and request.path.startswith('/logged_out'): v = None
if v and v.agendaposter and random.randint(1, 20) == 1:
if request.host == 'rdrama.net':
return redirect(random.choice(['https://secure.actblue.com/donate/ms_blm_homepage_2019','https://rdrama.net/post/19711/a-short-guide-on-how-to','https://secure.transequality.org/site/Donation2?df_id=1480']))
return redirect('https://secure.actblue.com/donate/ms_blm_homepage_2019')
try: pid = int(pid)
except Exception as e: pass
@ -1140,10 +1136,6 @@ def submit_post(v):
g.db.commit()
if v.agendaposter and random.randint(1, 10) < 4:
if request.host == 'rdrama.net':
return redirect(random.choice(['https://secure.actblue.com/donate/ms_blm_homepage_2019','https://rdrama.net/post/19711/a-short-guide-on-how-to','https://secure.transequality.org/site/Donation2?df_id=1480']))
return redirect('https://secure.actblue.com/donate/ms_blm_homepage_2019')
if request.headers.get("Authorization"): return new_post.json
else: return redirect(new_post.permalink)

View File

@ -816,10 +816,7 @@ def settings_css_get(v):
def settings_css(v):
css = request.values.get("css").strip().replace('\\', '').strip()[:4000]
if not v.agendaposter:
v.css = css
else:
v.css = 'body *::before, body *::after { content: "Trans rights are human rights!"; }'
v.css = css
g.db.add(v)
g.db.commit()

View File

@ -101,7 +101,7 @@ def api_vote_post(post_id, new, v):
post.author.coins += 1
post.author.truecoins += 1
g.db.add(post.author)
real = bool(v.profileurl) or bool(v.customtitle) or v.namecolor != defaultcolor and not v.agendaposter and not v.shadowbanned
real = (bool(v.profileurl) or bool(v.customtitle) or v.namecolor != defaultcolor) and not v.agendaposter and not v.shadowbanned
vote = Vote(user_id=v.id,
vote_type=new,
submission_id=post_id,

View File

@ -67,7 +67,7 @@
<span class="text-black">coins</span>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;
<a {% if v %}href="{{c.author.url}}"{% else %}href="/logged_out{{c.author.url}}"{% endif %} target="_blank" class="ml-auto text-decoration-none">
<a href="{{c.author.url}}" target="_blank" class="ml-auto text-decoration-none">
View
<i class="fas fa-arrow-right fa-sm px-1"></i>
</a>
@ -121,11 +121,11 @@
{% endfor %}
</div>
<div id="morecomment-{{c.id}}" class="d-md-none mt-2 more-comments text-small">
<a {% if v %}href="{{c.shortlink}}"{% else %}href="/logged_out{{c.shortlink}}"{% endif %}>More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
<a href="{{c.shortlink}}">More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
</div>
{% elif replies %}
<div id="morecomment-{{c.id}}" class="mt-2 more-comments text-small">
<a {% if v %}href="{{c.shortlink}}"{% else %}href="/logged_out{{c.shortlink}}"{% endif %}>More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
<a href="{{c.shortlink}}">More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
</div>
{% endif %}
{% endif %}
@ -350,7 +350,7 @@
<a class="list-inline-item text-muted" href="javascript:void(0)" onclick="openReplyBox('{{c.id}}')"><i class="fas fa-reply" aria-hidden="true"></i><span class="d-none d-md-inline-block">Reply</span></a>
{% endif %}
<a class="list-inline-item text-muted d-none d-md-inline-block" {% if v %}href="{{c.permalink}}"{% else %}href="/logged_out{{c.permalink}}"{% endif %}><i class="fas fa-book-open"></i>Context</a>
<a class="list-inline-item text-muted d-none d-md-inline-block" href="{{c.permalink}}"><i class="fas fa-book-open"></i>Context</a>
<a class="list-inline-item text-muted d-none d-md-inline-block copy-link" href="javascript:void(0);" role="button" data-clipboard-text="{% if 'rama' in request.host %}https://freeghettohoes.biz{{c.permalink}}{% else %}{{c.permalink | full_link}}{% endif %}"><i class="fas fa-copy"></i>Copy link</a>
{% if v %}
<a class="list-inline-item text-muted d-none d-md-inline-block" href="javascript:void(0)" data-bs-toggle="modal" data-bs-target="#reportCommentModal" onclick="report_commentModal('{{c.id}}','{{c.author.username}}',)"><i class="fas fa-flag fa-fw"></i>Report</a>
@ -490,11 +490,11 @@
{% endfor %}
</div>
<div id="morecomment-{{c.id}}" class="d-md-none mt-2 more-comments text-small">
<a {% if v %}href="{{c.shortlink}}"{% else %}href="/logged_out{{c.shortlink}}"{% endif %}>More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
<a href="{{c.shortlink}}">More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
</div>
{% elif replies %}
<div id="morecomment-{{c.id}}" class="mt-2 more-comments text-small">
<a {% if v %}href="{{c.shortlink}}"{% else %}href="/logged_out{{c.shortlink}}"{% endif %}>More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
<a href="{{c.shortlink}}">More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
</div>
{% endif %}
{% endif %}
@ -525,7 +525,7 @@
<a href="javascript:void(0);" role="button" class="list-group-item copy-link" data-bs-dismiss="modal" data-clipboard-text="{% if 'rama' in request.host %}https://freeghettohoes.biz{{c.permalink}}{% else %}{{c.permalink | full_link}}{% endif %}"><i class="fas fa-copy"></i>Copy link</a>
<a class="list-group-item" {% if v %} href="{{c.permalink}}" {% else %} href="/logged_out{{c.permalink}}" {% endif %}><i class="fas fa-dna"></i>Context</a>
<a class="list-group-item" href="{{c.permalink}}"><i class="fas fa-dna"></i>Context</a>
<a href="javascript:void(0)" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportCommentModal" onclick="report_commentModal('{{c.id}}','{{c.author.username}}')" class="list-group-item"><i class="fas fa-flag"></i>Report</a>

View File

@ -205,7 +205,7 @@
</style>
<a rel="nofollow noopener noreferrer" href="{% if 'rama' in request.host %}https://secure.transequality.org/site/Donation2?df_id=1480{% else %}/{% endif %}">
<img class="banner" src="/assets/images/{{'SITE_NAME' | app_config}}/{% if v %}banner.webp{% else %}cached.webp{% endif %}?v=7" width="100%">
<img class="banner" src="/assets/images/{{'SITE_NAME' | app_config}}/{% if v %}banner.webp{% else %}cached.webp{% endif %}?v=8" width="100%">
</a>
{% endif %}
{% endblock %}

View File

@ -7,7 +7,7 @@
<div class="navbar navbar-expand-md navbar-light" id="navbar">
<div class="container-fluid" style="padding:0;">
<div class="flex-grow-1">
<a {% if v %}href="/"{% else %}href="/logged_out"{% endif %} class="navbar-brand mr-auto">
<a href="/" class="navbar-brand mr-auto">
<img loading="lazy" height="30" src="/assets/images/{{'SITE_NAME' | app_config}}/headericon.webp?v=4">
{% if "gigachadlife" in request.host %}
<span style="font-weight: bold; font-size: 1.2rem;">GigaChadLife</span>

View File

@ -208,7 +208,7 @@
<span class="text-black">coins</span>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;
<a {% if v %}href="{{p.author.url}}"{% else %}href="/logged_out{{p.author.url}}"{% endif %} target="_blank" class="ml-auto text-decoration-none">
<a href="{{p.author.url}}" target="_blank" class="ml-auto text-decoration-none">
View
<i class="fas fa-arrow-right fa-sm px-1"></i>
</a>
@ -532,7 +532,7 @@
<ul class="list-inline text-right d-flex">
<li class="list-inline-item">
<a {% if v %}href="{{p.permalink}}"{% else %}href="/logged_out{{p.permalink}}"{% endif %}>
<a href="{{p.permalink}}">
<i class="fas fa-comment-dots"></i>{{p.comment_count}}
<span class="text-info d-none new-comments"></span>
</a>
@ -676,7 +676,7 @@
<ul class="list-inline text-right d-flex">
<li class="list-inline-item mr-auto">
<a {% if v %}href="{{p.permalink}}"{% else %}href="/logged_out{{p.permalink}}"{% endif %}>
<a href="{{p.permalink}}">
<i class="fas fa-comment-dots"></i>{{p.comment_count}}
<span class="text-info d-none new-comments"></span>
</a>
@ -738,7 +738,7 @@
</div>
{% if linked_comment and p.comment_count >= 2%}
<pre></pre>
<div class="total"><a {% if v %}href="{{p.permalink}}"{% else %}href="/logged_out{{p.permalink}}"{% endif %}>View entire discussion</a></div>
<div class="total"><a href="{{p.permalink}}">View entire discussion</a></div>
{% endif %}
</div>
</div>

View File

@ -86,7 +86,7 @@
<div class="post-actions d-none d-md-block">
<ul class="list-inline text-left mb-2">
<li class="list-inline-item"><a {% if v %}href="{{p.permalink}}"{% else %}href="/logged_out{{p.permalink}}"{% endif %}><i
<li class="list-inline-item"><a href="{{p.permalink}}"><i
class="fas fa-comment-dots"></i>{{p.comment_count}} Comment{{'s' if p.comment_count != 1 else ''}}</a>
</li>

View File

@ -51,7 +51,7 @@
<span class="text-black">coins</span>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;
<a {% if v %}href="{{p.author.url}}"{% else %}href="/logged_out{{p.author.url}}"{% endif %} target="_blank" class="ml-auto text-decoration-none">
<a href="{{p.author.url}}" target="_blank" class="ml-auto text-decoration-none">
View
<i class="fas fa-arrow-right fa-sm px-1"></i>
</a>
@ -134,7 +134,7 @@
{% if p.club and not (v and (v.paid_dues or v.id == p.author_id)) %}
<img loading="lazy" src="/assets/images/emojis/marseyglow.webp" class="post-img">
{% elif not p.url %}
<a {% if v and v.newtab %}target="_blank"{% endif %} {% if v %}href="{{p.permalink}}"{% else %}href="/logged_out{{p.permalink}}"{% endif %}>
<a {% if v and v.newtab %}target="_blank"{% endif %} href="{{p.permalink}}">
<img loading="lazy" src="{{p.thumb_url}}" class="post-img">
</a>
{% elif p.is_image %}
@ -196,7 +196,7 @@
&nbsp;&nbsp;{{p.views}} views
</div>
<h5 class="card-title post-title text-left w-lg-75 mb-0 pb-0 pb-md-1"><a {% if v and v.newtab %}target="_blank"{% endif %} {% if v %}href="{{p.permalink}}"{% else %}href="/logged_out{{p.permalink}}"{% endif %} class="stretched-link">
<h5 class="card-title post-title text-left w-lg-75 mb-0 pb-0 pb-md-1"><a {% if v and v.newtab %}target="_blank"{% endif %} href="{{p.permalink}}" class="stretched-link">
{% if p.club %}<span class="patron font-weight-bolder mr-1" style="background-color:red; font-size:12px; line-height:2;">{{cc}}</span>{% endif %}
{% if p.flair %}<span class="patron font-weight-bolder mr-1" style="background-color:var(--primary); font-size:12px; line-height:2;">{{p.flair | safe}}</span>{% endif %}
{{p.realtitle(v) | safe}}
@ -208,7 +208,7 @@
<a class="list-inline-item" href="javascript:void(0)" onclick="expandText('{{p.id}}')"><i class="fas fa-expand-alt mr-0 text-expand-icon-{{p.id}}"></i></a>
{% endif %}
<li class="list-inline-item">
<a {% if v and v.newtab %}target="_blank"{% endif %} {% if v %}href="{{p.permalink}}"{% else %}href="/logged_out{{p.permalink}}"{% endif %}>
<a {% if v and v.newtab %}target="_blank"{% endif %} href="{{p.permalink}}">
<i class="fas fa-comment-dots"></i>{{p.comment_count}}
<span class="text-info d-none new-comments"></span>
</a>
@ -301,7 +301,7 @@
<div class="post-actions">
<ul class="list-inline text-right d-flex">
<li class="list-inline-item mr-auto">
<a {% if v and v.newtab %}target="_blank"{% endif %} {% if v %}href="{{p.permalink}}"{% else %}href="/logged_out{{p.permalink}}"{% endif %}>
<a {% if v and v.newtab %}target="_blank"{% endif %} href="{{p.permalink}}">
<i class="fas fa-comment-dots"></i>{{p.comment_count}}
<span class="text-info d-none new-comments"></span>
</a>