From 46786e117b65b85c28105aa910b9e14a7a7a8325 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 23 Jul 2022 10:53:17 +0200 Subject: [PATCH] allow ppl to make multiple comments to the same parents without reloading the page --- files/assets/js/comments_v.js | 36 +- files/templates/comments.html | 1884 ++++++++++++------------ files/templates/submission.html | 2456 +++++++++++++++---------------- 3 files changed, 2200 insertions(+), 2176 deletions(-) diff --git a/files/assets/js/comments_v.js b/files/assets/js/comments_v.js index ece34fe72..5f5ba4074 100644 --- a/files/assets/js/comments_v.js +++ b/files/assets/js/comments_v.js @@ -201,7 +201,7 @@ function comment_edit(id){ xhr.send(form) } -function post_comment(fullname){ +function post_comment(fullname, hide){ const btn = document.getElementById('save-reply-to-'+fullname) btn.disabled = true btn.classList.add('disabled'); @@ -227,19 +227,41 @@ function post_comment(fullname){ try {data = JSON.parse(xhr.response)} catch(e) {console.log(e)} if (data && data["comment"]) { - commentForm=document.getElementById('comment-form-space-'+fullname); - commentForm.innerHTML = data["comment"].replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, ''); + console.log(hide) + document.getElementById(hide).classList.add('d-none'); + + let id = fullname.split('_')[1]; + let name = 'comment-form-space-' + fullname; + commentForm = document.getElementById(name); + + let comments = document.getElementById('replies-of-' + id); + let comment = data["comment"].replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, ''); + + comments.innerHTML = comment + comments.innerHTML; + bs_trigger(commentForm); + + let placeholder = document.getElementById("placeholder-comment"); + if(placeholder){ + comments.classList.remove('text-center'); + comments.classList.remove('py-7'); + placeholder.parentNode.removeChild(placeholder); + } + + btn.disabled = false; + btn.classList.remove('disabled'); + + document.getElementById('reply-form-body-'+fullname).value = '' } else { if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"]; else document.getElementById('toast-post-error-text').innerText = "Error, please try again later." bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show(); + setTimeout(() => { + btn.disabled = false; + btn.classList.remove('disabled'); + }, 2000); } - setTimeout(() => { - btn.disabled = false; - btn.classList.remove('disabled'); - }, 2000); } xhr.send(form) } diff --git a/files/templates/comments.html b/files/templates/comments.html index 6578775e4..3dd4b1861 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -1,941 +1,943 @@ -{%- from 'util/assetcache.html' import asset, asset_siteimg with context -%} -{%- import 'util/helpers.html' as help -%} -{% if not ajax %} - {% if comment_info %} - - {% endif %} - - {% if v %} - {% include "award_modal.html" %} - {% endif %} - - -{% endif %} - -{% macro single_comment(c, level=1) %} - -{% set ups=c.upvotes %} -{% set downs=c.downvotes %} -{% set score=ups-downs %} - -{% if render_replies %} - {% if v and (v.shadowbanned or v.admin_level >= 2) %} - {% set replies=c.replies3(sort) %} - {% else %} - {% set replies=c.replies(sort) %} - {% endif %} -{% endif %} - -{% if c.is_blocking or (c.is_banned or c.deleted_utc) and not (v and v.admin_level > 1) and not (v and v.id==c.author_id) %} - -
- - -
- -
- - - -
- - {% if render_replies %} - {% if level<9 or request.path.startswith('/notifications') or request.headers.get("xhr") %} -
- {% for reply in replies %} - {{single_comment(reply, level=level+1)}} - {% endfor %} -
- {% elif replies %} -
- - More comments -
- {% endif %} - {% endif %} -
-
- - -{% else %} - -{% set score=c.score %} - -{% if v %} - {% set voted=c.voted %} - {% if not voted and v.id == c.author_id %} - {% set voted=1 %} - {% endif %} -{% else %} - {% set voted=-2 %} -{% endif %} - -{% if standalone and level==1 %} -
- {% if c.post and c.post.over_18 %}+18{% endif %} - - {% if c.post %} - {% if c.author_id==v.id and replies and is_notification_page%} - Comment {{'Replies' if (replies | length)>1 else 'Reply'}}: {{c.post.realtitle(v) | safe}} - {% elif c.post.author_id==v.id and c.level == 1 and is_notification_page%} - Post Reply: {{c.post.realtitle(v) | safe}} - {% elif is_notification_page and c.parent_submission in v.subscribed_idlist %} - Subscribed Thread: {{c.post.realtitle(v) | safe}} - {% elif is_notification_page %} - Username Mention: {{c.post.realtitle(v) | safe}} - {% else %} - {{c.post.realtitle(v) | safe}} - {% endif %} - - {% if c.post.sub %} - in /h/{{c.post.sub}} - {% endif %} - {% elif c.author_id==AUTOJANNY_ID %} - Notification - {% else %} - {% if c.sentto == 2 %} - Sent to admins - {% else %} - Sent to @{{c.senttouser.username}} - {% endif %} - {% endif %} - -
-{% endif %} - -{% if c.parent_comment and c.parent_comment.sentto %} - {% set isreply = True %} -{% else %} - {% set isreply = False %} -{% endif %} - -
- {% if not isreply %} - - {% endif %} -
- -
- - - {% if c.active_flags(v) and (v and v.admin_level >= PERMS['FLAGS_VISIBLE']) %} -
- Reported by: -

-				
    - {% for f in c.filtered_flags(v) %} -
  • {% if v and v.admin_level >= PERMS['FLAGS_VISIBLE_REPORTER'] %}{% if not c.ghost %}{{f.user.username}}{% else %}👻{% endif %}{% else %}User{% endif %}{% if f.reason %}: {{f.realreason(v) | safe}}{% endif %} {% if v and v.admin_level >= PERMS['FLAGS_REMOVE'] %}[remove]{% endif %}
  • - {% endfor %} -
-
- {% endif %} - - {% if c.is_banned and c.ban_reason %} -
removed by @{{c.ban_reason}}
- {% endif %} - - {% if c.award_count("tilt", v) %} - - {% endif %} - -
- {{c.realbody(v) | safe}} -
- {% if c.parent_submission %} - - {% if v and v.id==c.author_id %} - - {% endif %} -
- - - -
-
-
    -
  • - {% if v and v.admin_level > 1 %} - - - - {% endif %} -
  • - - {% if v %} - - {% endif %} - -
  • - - - -
  • - - {% if v and request.path.startswith('/@') and v.admin_level < 2 %} -
  • - {% if voted==1 %} - - {% endif %} - - {{score}} - - {% if voted==-1 %} - - {% endif %} -
  • - {% elif v %} -
  • - - - - - {{score}} - - - - -
  • - {% else %} -
  • - - - - - {{score}} - - - - -
  • - {% endif %} -
-
-
- - - - - - - - - - -
  • - {% if v and request.path.startswith('/@') and v.admin_level < 2%} - {% if voted==1 %} - - {% endif %} - {% elif v %} - - - - {% else %} - - - {% endif %} - - - - {% if v and request.path.startswith('/@') and v.admin_level < 2 %} - {% if voted==-1 %} -
  • - {% endif %} - {% elif v %} - - - {% else %} - - - - {% endif %} - - {% if v and ((not c.ghost and v.admin_level >= PERMS['VOTES_VISIBLE']) or v.id == AEVANN_ID) %}Votes{% endif %} - - Context - - - - {% if v %} - - - - - {% if FEATURES['AWARDS'] -%} - - {%- endif %} - - - - - {% endif %} - - {% if c.parent_submission %} - {% if v and c.author_id == v.id %} - - - - - - {% elif v and c.body %} - - {% endif %} - {% endif %} - - {% if v %} - - - {% endif %} - -
-
- {% endif %} -
- - {% if v and v.id != c.author_id and c.body %} - - {% endif %} - - -
- -
- - {% if request.path.startswith('/transfers') %} - - - {% endif %} - - {% if render_replies %} - {% if level<9 or request.path.startswith('/notifications') or request.headers.get("xhr") %} -
- {% for reply in replies %} - {{single_comment(reply, level=level+1)}} - {% endfor %} -
- {% elif replies %} -
- - More comments -
- {% endif %} - - {% if request.path.startswith('/notifications') and c.level == 1 and c.sentto and not c.parent_submission and c.author_id != AUTOJANNY_ID %} - Reply -
- -
- {% endif %} - {% endif %} -
- - - - - - - - - -{% if v and v.admin_level > 1 %} - -{% endif %} - - - - - - - - - - -
- -{% endif %} - -{% endmacro %} - -{% for comment in comments %} - - {{single_comment(comment)}} - -{% endfor %} - -{% if not ajax %} - {% if v %} - {% include "gif_modal.html" %} - {% include "emoji_modal.html" %} - {% if v.admin_level > 1 %} - {% include "ban_modal.html" %} - {% endif %} - - - - - {% endif %} - - {% if v %} - - - {% endif %} - - - - {% if v and v.admin_level > 1 %} - - {% endif %} - - {% include "expanded_image_modal.html" %} - - - - - -{% endif %} - -{% if offset %} - {% if p %} - {% set pid = p.id %} - {% endif %} -
-
-{% endif %} - - +{%- from 'util/assetcache.html' import asset, asset_siteimg with context -%} +{%- import 'util/helpers.html' as help -%} +{% if not ajax %} + {% if comment_info %} + + {% endif %} + + {% if v %} + {% include "award_modal.html" %} + {% endif %} + + +{% endif %} + +{% macro single_comment(c, level=1) %} + +{% set ups=c.upvotes %} +{% set downs=c.downvotes %} +{% set score=ups-downs %} + +{% if render_replies %} + {% if v and (v.shadowbanned or v.admin_level >= 2) %} + {% set replies=c.replies3(sort) %} + {% else %} + {% set replies=c.replies(sort) %} + {% endif %} +{% endif %} + +{% if c.is_blocking or (c.is_banned or c.deleted_utc) and not (v and v.admin_level > 1) and not (v and v.id==c.author_id) %} + +
+ + +
+ +
+ + + +
+ + {% if render_replies %} + {% if level<9 or request.path.startswith('/notifications') or request.headers.get("xhr") %} +
+ {% for reply in replies %} + {{single_comment(reply, level=level+1)}} + {% endfor %} +
+ {% elif replies %} +
+ + More comments +
+ {% endif %} + {% endif %} +
+
+ + +{% else %} + +{% set score=c.score %} + +{% if v %} + {% set voted=c.voted %} + {% if not voted and v.id == c.author_id %} + {% set voted=1 %} + {% endif %} +{% else %} + {% set voted=-2 %} +{% endif %} + +{% if standalone and level==1 %} +
+ {% if c.post and c.post.over_18 %}+18{% endif %} + + {% if c.post %} + {% if c.author_id==v.id and replies and is_notification_page%} + Comment {{'Replies' if (replies | length)>1 else 'Reply'}}: {{c.post.realtitle(v) | safe}} + {% elif c.post.author_id==v.id and c.level == 1 and is_notification_page%} + Post Reply: {{c.post.realtitle(v) | safe}} + {% elif is_notification_page and c.parent_submission in v.subscribed_idlist %} + Subscribed Thread: {{c.post.realtitle(v) | safe}} + {% elif is_notification_page %} + Username Mention: {{c.post.realtitle(v) | safe}} + {% else %} + {{c.post.realtitle(v) | safe}} + {% endif %} + + {% if c.post.sub %} + in /h/{{c.post.sub}} + {% endif %} + {% elif c.author_id==AUTOJANNY_ID %} + Notification + {% else %} + {% if c.sentto == 2 %} + Sent to admins + {% else %} + Sent to @{{c.senttouser.username}} + {% endif %} + {% endif %} + +
+{% endif %} + +{% if c.parent_comment and c.parent_comment.sentto %} + {% set isreply = True %} +{% else %} + {% set isreply = False %} +{% endif %} + +
+ {% if not isreply %} + + {% endif %} +
+ +
+ + + {% if c.active_flags(v) and (v and v.admin_level >= PERMS['FLAGS_VISIBLE']) %} +
+ Reported by: +

+				
    + {% for f in c.filtered_flags(v) %} +
  • {% if v and v.admin_level >= PERMS['FLAGS_VISIBLE_REPORTER'] %}{% if not c.ghost %}{{f.user.username}}{% else %}👻{% endif %}{% else %}User{% endif %}{% if f.reason %}: {{f.realreason(v) | safe}}{% endif %} {% if v and v.admin_level >= PERMS['FLAGS_REMOVE'] %}[remove]{% endif %}
  • + {% endfor %} +
+
+ {% endif %} + + {% if c.is_banned and c.ban_reason %} +
removed by @{{c.ban_reason}}
+ {% endif %} + + {% if c.award_count("tilt", v) %} + + {% endif %} + +
+ {{c.realbody(v) | safe}} +
+ {% if c.parent_submission %} + + {% if v and v.id==c.author_id %} + + {% endif %} +
+ + + +
+
+
    +
  • + {% if v and v.admin_level > 1 %} + + + + {% endif %} +
  • + + {% if v %} + + {% endif %} + +
  • + + + +
  • + + {% if v and request.path.startswith('/@') and v.admin_level < 2 %} +
  • + {% if voted==1 %} + + {% endif %} + + {{score}} + + {% if voted==-1 %} + + {% endif %} +
  • + {% elif v %} +
  • + + + + + {{score}} + + + + +
  • + {% else %} +
  • + + + + + {{score}} + + + + +
  • + {% endif %} +
+
+
+ + + + + + + + + + +
  • + {% if v and request.path.startswith('/@') and v.admin_level < 2%} + {% if voted==1 %} + + {% endif %} + {% elif v %} + + + + {% else %} + + + {% endif %} + + + + {% if v and request.path.startswith('/@') and v.admin_level < 2 %} + {% if voted==-1 %} +
  • + {% endif %} + {% elif v %} + + + {% else %} + + + + {% endif %} + + {% if v and ((not c.ghost and v.admin_level >= PERMS['VOTES_VISIBLE']) or v.id == AEVANN_ID) %}Votes{% endif %} + + Context + + + + {% if v %} + + + + + {% if FEATURES['AWARDS'] -%} + + {%- endif %} + + + + + {% endif %} + + {% if c.parent_submission %} + {% if v and c.author_id == v.id %} + + + + + + {% elif v and c.body %} + + {% endif %} + {% endif %} + + {% if v %} + + + {% endif %} + +
+
+ {% endif %} +
+ + {% if v and v.id != c.author_id and c.body %} + + {% endif %} + + +
+ +
+ + {% if request.path.startswith('/transfers') %} + + + {% endif %} + + {% if render_replies %} + {% if level<9 or request.path.startswith('/notifications') or request.headers.get("xhr") %} +
+ {% for reply in replies %} + {{single_comment(reply, level=level+1)}} + {% endfor %} +
+ {% elif replies %} +
+ + More comments +
+ {% endif %} + + {% if request.path.startswith('/notifications') and c.level == 1 and c.sentto and not c.parent_submission and c.author_id != AUTOJANNY_ID %} + Reply +
+ +
+ {% endif %} + {% else %} +
+ {% endif %} +
+ + + + + + + + + +{% if v and v.admin_level > 1 %} + +{% endif %} + + + + + + + + + + +
+ +{% endif %} + +{% endmacro %} + +{% for comment in comments %} + + {{single_comment(comment)}} + +{% endfor %} + +{% if not ajax %} + {% if v %} + {% include "gif_modal.html" %} + {% include "emoji_modal.html" %} + {% if v.admin_level > 1 %} + {% include "ban_modal.html" %} + {% endif %} + + + + + {% endif %} + + {% if v %} + + + {% endif %} + + + + {% if v and v.admin_level > 1 %} + + {% endif %} + + {% include "expanded_image_modal.html" %} + + + + + +{% endif %} + +{% if offset %} + {% if p %} + {% set pid = p.id %} + {% endif %} +
+
+{% endif %} + + diff --git a/files/templates/submission.html b/files/templates/submission.html index e3e16782b..2f978654f 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -1,1228 +1,1228 @@ -{% extends "default.html" %} - - -{% set ups=p.upvotes %} -{% set downs=p.downvotes %} -{% set score=ups-downs %} - -{% if v %} - {% set voted=p.voted if p.voted else 0 %} -{% else %} - {% set voted=-2 %} -{% endif %} - -{% set v_forbid_deleted = (p.deleted_utc != 0) and not (v and v.admin_level >= 2) and not (v and v.id == p.author_id) %} - -{% block title %} - - - -{% if SITE_NAME == 'PCM' %} - {% set wholesome = '/i/wholesome.webp' %} -{% else %} - {% set wholesome = '/e/marseywholesome.webp' %} -{% endif %} - -{% if p.award_count("confetti", v) %} -
-{% endif %} - -{% if g.inferior_browser %} - {% if p.award_count("wholesome", v) %} - -
- :#marseywholesome: -
- - {% if p.award_count("wholesome", v) > 1 %} - -
- :#marseywholesome: -
- {% endif %} - - {% if p.award_count("wholesome", v) > 2 %} - -
- :#marseywholesome: -
- {% endif %} - - {% if p.award_count("wholesome", v) > 3 %} - -
- :#marseywholesome: -
- {% endif %} - {% endif %} - - {% if SITE_NAME == 'PCM' and p.award_count("toe", v) %} - -
- Blade's toe -
- - {% if p.award_count("toe", v) > 1 %} - -
- Blade's toe -
- {% endif %} - - {% if p.award_count("toe", v) > 2 %} - -
- Blade's toe -
- {% endif %} - - {% if p.award_count("toe", v) > 3 %} - -
- Blade's toe -
- {% endif %} - {% endif %} -{% else %} - {% if p.award_count("wholesome", v) %} - -
- - - :#marseywholesome: - - -
- - {% if p.award_count("wholesome", v) > 1 %} - - - :#marseywholesome: - - - {% endif %} - - {% if p.award_count("wholesome", v) > 2 %} - - - :#marseywholesome: - - - {% endif %} - - {% if p.award_count("wholesome", v) > 3 %} - - - :#marseywholesome: - - - {% endif %} - {% endif %} - - {% if SITE_NAME == 'PCM' and p.award_count("toe", v) %} - -
- - - Blade's toe - - -
- - {% if p.award_count("toe", v) > 1 %} - - - Blade's toe - - - {% endif %} - - {% if p.award_count("toe", v) > 2 %} - - - Blade's toe - - - {% endif %} - - {% if p.award_count("toe", v) > 3 %} - - - Blade's toe - - - {% endif %} - {% endif %} -{% endif %} - - - - - -{% if p.award_count("train", v) or p.award_count("scooter", v) %} - -{% endif %} - -{% if p.award_count("train", v) %} - - - - :#marseytrain: - - - {% if p.award_count("train", v) > 1 %} - - :#marseytrain: - - {% endif %} - - {% if p.award_count("train", v) > 2 %} - - :#marseytrain: - - {% endif %} - - {% if p.award_count("train", v) > 3 %} - - :#marseytrain: - - {% endif %} -{% endif %} - - -{% if SITE_NAME == 'PCM' and p.award_count("croag", v) %} - - - - croag - - - {% if p.award_count("croag", v) > 1 %} - - croag - - {% endif %} - - {% if p.award_count("croag", v) > 2 %} - - croag - - {% endif %} - - {% if p.award_count("croag", v) > 3 %} - - croag - - {% endif %} -{% endif %} - - -{% if p.award_count("scooter", v) %} - - - :#marseyscooter: - - - {% if p.award_count("scooter", v) > 1 %} - - :#marseyscooter: - - {% endif %} - - {% if p.award_count("scooter", v) > 2 %} - - :#marseyscooter: - - {% endif %} - - {% if p.award_count("scooter", v) > 3 %} - - :#marseyscooter: - - {% endif %} -{% endif %} - - - -{% if p.award_count("tilt", v) and not p.distinguish_level %} - -{% endif %} - - - - - -{% if comment_info and not comment_info.is_banned and not comment_info.deleted_utc %} -{{'@'+comment_info.author_name}} comments on "{{p.plaintitle(v)}} - {{SITE_NAME}}" - - - - -{% if comment_info.edited_utc %}{% endif %} - - - - -{% if p.is_video %} - -{% elif p.is_audio %} - -{% endif %} - - - - - - - - - - - -{% else %} -{{p.plaintitle(v)}} - {{SITE_NAME}} - - -{% if p.author %}{% endif %} - -{% if p.edited_utc %}{% endif %} -{% if p.author %}{% endif %} -{% if not v_forbid_deleted -%} - - - - -{%- endif %} - - - - - -{% if not v_forbid_deleted -%} -{% if p.author %}{% endif %} - - -{%- endif %} - - -{% endif %} -{% endblock %} - -{% block pagetype %}thread{% endblock %} - -{% block actionsModal %} - -{% if v %} - -{% endif %} - -{% if v and v.admin_level > 1 %} - {% include "post_admin_actions_mobile.html" %} -{% endif %} - -{% endblock %} - -{% block content %} - -{% if SITE == 'pcmemes.net' %} - {% set cc='SPLASH MOUNTAIN' %} -{% else %} - {% set cc='COUNTRY CLUB' %} -{% endif %} - -
- -
- -
-
- - {% if not p.is_image and p.thumb_url and not p.embed_url %} -
- Unable to load image -
- {% endif %} - -
- - - {% if p.active_flags(v) and (v and v.admin_level >= PERMS['FLAGS_VISIBLE']) %} -
- Reported by: -

-						
    - {% for f in p.filtered_flags(v) %} -
  • {% if v and v.admin_level >= PERMS['FLAGS_VISIBLE_REPORTER'] %}{{f.user.username}}{% else %}User{% endif %}{% if f.reason %}: {{f.realreason(v) | safe}}{% endif %} {% if v and v.admin_level >= PERMS['FLAGS_REMOVE'] %}[remove]{% endif %}
  • - {% endfor %} -
-
- {% endif %} - {% if p.realurl(v) and not v_forbid_deleted %} -

- {% if p.club %}{{CC}}{% endif %} - {% if p.flair %}{{p.flair | safe}}{% endif %} - {{p.realtitle(v) | safe}} -

- {% else %} -

- {% if p.club %}{{CC}}{% endif %} - {% if p.flair %}{{p.flair | safe}}{% endif %} - {{p.realtitle(v) | safe}} -

- {% endif %} - - {% if not v_forbid_deleted %} -
- {% if p.realurl(v) %} - {% if not p.embed_url and not p.is_image and not p.is_video and not p.is_audio %} - -
- {{p.domain|truncate(30, True)}} - -
-
- {% endif %} - {% endif %} - - - {% if p.embed_url %} - {% if p.domain == "twitter.com" %} - {{p.embed_url | safe}} - {% if v and v.theme.split("_")[0] in ["light", "coffee", "4chan"] %} - - {% else %} - - {% endif %} - {% elif p.domain in ['youtu.be','youtube.com'] and p.embed_url and p.embed_url.startswith(' - {% if p.is_image %} -
-
- - Unable to load image - -
-
-

-							{% elif p.is_video %}
-								
-
- -
-
-

-							{% elif p.is_audio %}
-								
-
- -
-
-

-							{% endif %}
-							{{p.realbody(v) | safe}}
-
-							{% if p.is_banned and p.ban_reason %}
-								
removed by @{{p.ban_reason}}
- {% endif %} - -
-
- {% else %} -
-
[Deleted by author.]
-
- {% endif %} - - {% if v and (v.id==p.author_id or v.admin_level > 2) and not v.is_suspended %} - - {% endif %} - - {% if p.embed_url and "http" not in p.embed_url and "<" not in p.embed_url %} -
-
-
-
- {{p.embed_url | post_embed(v) | safe}} -
-
-
-
- {% endif %} -
-
-
    - -
  • - - {{p.comment_count}} - - -
  • - - {% if v and (v.id==p.author_id or v.admin_level > 1 and v.admin_level > 2) %} - Edit - {% endif %} - - {% if v and v.id != p.author_id and p.body and not v_forbid_deleted %} - View source - {% endif %} - - {% include 'post_actions.html' %} -
-
- -
- -
- - {% if v %} - -
-
- - {{score}} -
-
- - {% else %} - -
-
-
- {{score}} -
-
- - {% endif %} - -
- - - - -
- -
- - {% if not p.is_image and not p.is_video and not p.is_audio %} -
-
- -
-
- {% endif %} - - -
-
- -
-
    - -
  • - - {{p.comment_count}} - - - - {% if v and v.admin_level > 1 %} - - - - {% endif %} -
  • - - {% if v %} -
  • - - - -
  • - {% endif %} -
  • - {% if v %} - - - {% else %} - - - - {% endif %} - - {{score}} - - {% if v %} - - {% else %} - - - - {% endif %} -
  • -
-
- -
- -
- -{% if v and v.id != p.author_id and p.body and not v_forbid_deleted %} - -{% endif %} - -
-
-
- -
- - {% if v %} -
-
- - - - - -
- -
- -   - -   - -   - -   - -   - -
- Comment -
-
- -
- {% else %} -
- -
- -
-
-
Jump in the discussion.
-

No email address required.

- -
-
- {% endif %} - - {% if p.replies %} -
- {% with comments=p.replies %} - {% include "comments.html" %} - {% endwith %} -
- -{% if offset %} - -{% endif %} - -{% elif not p.replies and p.deleted_utc == 0 %} -
- - - - -

Be the first to comment!

- {% if v %} -

This comment section is a ghost town...

- {% else %} -

This comment section is a ghost town. Sign in

- {% endif %} -
-{% endif %} - -
- -
- -{% if v and v.id==p.author_id %} - {% include "delete_post_modal.html" %} -{% endif %} - -{% if v %} - {% include "report_post_modal.html" %} -{% endif %} - -{% if v and (v.id == p.author_id or v.admin_level > 1 and v.admin_level > 2) %} - -{% endif %} - -{% if not v or v.highlightcomments %} - -{% endif %} - - - -{% if not p.replies %} - {% include "comments.html" %} -{% endif %} - -{% if p.award_count("shit", v) %} - - -{% endif %} - - -{% if p.award_count("fireflies", v) %} - - -{% endif %} - - - - -{% if success %} - -{% endif %} - - -{% if p.award_count("crab", v) %} - -{% endif %} - -{% if fart and not (v and v.has_badge(128)) %} - -{% endif %} - - -{% if p.award_count("confetti", v) %} -
-{% endif %} - -{% if p.award_count("firework", v) %} - -
- -
- - {% if p.award_count("firework", v) > 1 %} -
- -
- {% endif %} - - {% if p.award_count("firework", v) > 2 %} -
- -
- {% endif %} - - {% if p.award_count("firework", v) > 3 %} -
- -
- {% endif %} -{% endif %} - -{% if p.award_count("ricardo", v) %} - -
- -
- - {% if p.award_count("ricardo", v) > 1 %} -
- -
- {% endif %} - - {% if p.award_count("ricardo", v) > 2 %} -
- -
- {% endif %} -{% endif %} - -{% endblock %} +{% extends "default.html" %} + + +{% set ups=p.upvotes %} +{% set downs=p.downvotes %} +{% set score=ups-downs %} + +{% if v %} + {% set voted=p.voted if p.voted else 0 %} +{% else %} + {% set voted=-2 %} +{% endif %} + +{% set v_forbid_deleted = (p.deleted_utc != 0) and not (v and v.admin_level >= 2) and not (v and v.id == p.author_id) %} + +{% block title %} + + + +{% if SITE_NAME == 'PCM' %} + {% set wholesome = '/i/wholesome.webp' %} +{% else %} + {% set wholesome = '/e/marseywholesome.webp' %} +{% endif %} + +{% if p.award_count("confetti", v) %} +
+{% endif %} + +{% if g.inferior_browser %} + {% if p.award_count("wholesome", v) %} + +
+ :#marseywholesome: +
+ + {% if p.award_count("wholesome", v) > 1 %} + +
+ :#marseywholesome: +
+ {% endif %} + + {% if p.award_count("wholesome", v) > 2 %} + +
+ :#marseywholesome: +
+ {% endif %} + + {% if p.award_count("wholesome", v) > 3 %} + +
+ :#marseywholesome: +
+ {% endif %} + {% endif %} + + {% if SITE_NAME == 'PCM' and p.award_count("toe", v) %} + +
+ Blade's toe +
+ + {% if p.award_count("toe", v) > 1 %} + +
+ Blade's toe +
+ {% endif %} + + {% if p.award_count("toe", v) > 2 %} + +
+ Blade's toe +
+ {% endif %} + + {% if p.award_count("toe", v) > 3 %} + +
+ Blade's toe +
+ {% endif %} + {% endif %} +{% else %} + {% if p.award_count("wholesome", v) %} + +
+ + + :#marseywholesome: + + +
+ + {% if p.award_count("wholesome", v) > 1 %} + + + :#marseywholesome: + + + {% endif %} + + {% if p.award_count("wholesome", v) > 2 %} + + + :#marseywholesome: + + + {% endif %} + + {% if p.award_count("wholesome", v) > 3 %} + + + :#marseywholesome: + + + {% endif %} + {% endif %} + + {% if SITE_NAME == 'PCM' and p.award_count("toe", v) %} + +
+ + + Blade's toe + + +
+ + {% if p.award_count("toe", v) > 1 %} + + + Blade's toe + + + {% endif %} + + {% if p.award_count("toe", v) > 2 %} + + + Blade's toe + + + {% endif %} + + {% if p.award_count("toe", v) > 3 %} + + + Blade's toe + + + {% endif %} + {% endif %} +{% endif %} + + + + + +{% if p.award_count("train", v) or p.award_count("scooter", v) %} + +{% endif %} + +{% if p.award_count("train", v) %} + + + + :#marseytrain: + + + {% if p.award_count("train", v) > 1 %} + + :#marseytrain: + + {% endif %} + + {% if p.award_count("train", v) > 2 %} + + :#marseytrain: + + {% endif %} + + {% if p.award_count("train", v) > 3 %} + + :#marseytrain: + + {% endif %} +{% endif %} + + +{% if SITE_NAME == 'PCM' and p.award_count("croag", v) %} + + + + croag + + + {% if p.award_count("croag", v) > 1 %} + + croag + + {% endif %} + + {% if p.award_count("croag", v) > 2 %} + + croag + + {% endif %} + + {% if p.award_count("croag", v) > 3 %} + + croag + + {% endif %} +{% endif %} + + +{% if p.award_count("scooter", v) %} + + + :#marseyscooter: + + + {% if p.award_count("scooter", v) > 1 %} + + :#marseyscooter: + + {% endif %} + + {% if p.award_count("scooter", v) > 2 %} + + :#marseyscooter: + + {% endif %} + + {% if p.award_count("scooter", v) > 3 %} + + :#marseyscooter: + + {% endif %} +{% endif %} + + + +{% if p.award_count("tilt", v) and not p.distinguish_level %} + +{% endif %} + + + + + +{% if comment_info and not comment_info.is_banned and not comment_info.deleted_utc %} +{{'@'+comment_info.author_name}} comments on "{{p.plaintitle(v)}} - {{SITE_NAME}}" + + + + +{% if comment_info.edited_utc %}{% endif %} + + + + +{% if p.is_video %} + +{% elif p.is_audio %} + +{% endif %} + + + + + + + + + + + +{% else %} +{{p.plaintitle(v)}} - {{SITE_NAME}} + + +{% if p.author %}{% endif %} + +{% if p.edited_utc %}{% endif %} +{% if p.author %}{% endif %} +{% if not v_forbid_deleted -%} + + + + +{%- endif %} + + + + + +{% if not v_forbid_deleted -%} +{% if p.author %}{% endif %} + + +{%- endif %} + + +{% endif %} +{% endblock %} + +{% block pagetype %}thread{% endblock %} + +{% block actionsModal %} + +{% if v %} + +{% endif %} + +{% if v and v.admin_level > 1 %} + {% include "post_admin_actions_mobile.html" %} +{% endif %} + +{% endblock %} + +{% block content %} + +{% if SITE == 'pcmemes.net' %} + {% set cc='SPLASH MOUNTAIN' %} +{% else %} + {% set cc='COUNTRY CLUB' %} +{% endif %} + +
+ +
+ +
+
+ + {% if not p.is_image and p.thumb_url and not p.embed_url %} +
+ Unable to load image +
+ {% endif %} + +
+ + + {% if p.active_flags(v) and (v and v.admin_level >= PERMS['FLAGS_VISIBLE']) %} +
+ Reported by: +

+						
    + {% for f in p.filtered_flags(v) %} +
  • {% if v and v.admin_level >= PERMS['FLAGS_VISIBLE_REPORTER'] %}{{f.user.username}}{% else %}User{% endif %}{% if f.reason %}: {{f.realreason(v) | safe}}{% endif %} {% if v and v.admin_level >= PERMS['FLAGS_REMOVE'] %}[remove]{% endif %}
  • + {% endfor %} +
+
+ {% endif %} + {% if p.realurl(v) and not v_forbid_deleted %} +

+ {% if p.club %}{{CC}}{% endif %} + {% if p.flair %}{{p.flair | safe}}{% endif %} + {{p.realtitle(v) | safe}} +

+ {% else %} +

+ {% if p.club %}{{CC}}{% endif %} + {% if p.flair %}{{p.flair | safe}}{% endif %} + {{p.realtitle(v) | safe}} +

+ {% endif %} + + {% if not v_forbid_deleted %} +
+ {% if p.realurl(v) %} + {% if not p.embed_url and not p.is_image and not p.is_video and not p.is_audio %} + +
+ {{p.domain|truncate(30, True)}} + +
+
+ {% endif %} + {% endif %} + + + {% if p.embed_url %} + {% if p.domain == "twitter.com" %} + {{p.embed_url | safe}} + {% if v and v.theme.split("_")[0] in ["light", "coffee", "4chan"] %} + + {% else %} + + {% endif %} + {% elif p.domain in ['youtu.be','youtube.com'] and p.embed_url and p.embed_url.startswith(' + {% if p.is_image %} +
+
+ + Unable to load image + +
+
+

+							{% elif p.is_video %}
+								
+
+ +
+
+

+							{% elif p.is_audio %}
+								
+
+ +
+
+

+							{% endif %}
+							{{p.realbody(v) | safe}}
+
+							{% if p.is_banned and p.ban_reason %}
+								
removed by @{{p.ban_reason}}
+ {% endif %} + +
+
+ {% else %} +
+
[Deleted by author.]
+
+ {% endif %} + + {% if v and (v.id==p.author_id or v.admin_level > 2) and not v.is_suspended %} + + {% endif %} + + {% if p.embed_url and "http" not in p.embed_url and "<" not in p.embed_url %} +
+
+
+
+ {{p.embed_url | post_embed(v) | safe}} +
+
+
+
+ {% endif %} +
+
+
    + +
  • + + {{p.comment_count}} + + +
  • + + {% if v and (v.id==p.author_id or v.admin_level > 1 and v.admin_level > 2) %} + Edit + {% endif %} + + {% if v and v.id != p.author_id and p.body and not v_forbid_deleted %} + View source + {% endif %} + + {% include 'post_actions.html' %} +
+
+ +
+ +
+ + {% if v %} + +
+
+ + {{score}} +
+
+ + {% else %} + +
+
+
+ {{score}} +
+
+ + {% endif %} + +
+ + + + +
+ +
+ + {% if not p.is_image and not p.is_video and not p.is_audio %} +
+
+ +
+
+ {% endif %} + + +
+
+ +
+
    + +
  • + + {{p.comment_count}} + + + + {% if v and v.admin_level > 1 %} + + + + {% endif %} +
  • + + {% if v %} +
  • + + + +
  • + {% endif %} +
  • + {% if v %} + + + {% else %} + + + + {% endif %} + + {{score}} + + {% if v %} + + {% else %} + + + + {% endif %} +
  • +
+
+ +
+ +
+ +{% if v and v.id != p.author_id and p.body and not v_forbid_deleted %} + +{% endif %} + +
+
+
+ +
+ + {% if v %} +
+
+ + + + + +
+ +
+ +   + +   + +   + +   + +   + +
+ Comment +
+
+ +
+ {% else %} +
+ +
+ +
+
+
Jump in the discussion.
+

No email address required.

+ +
+
+ {% endif %} + + {% if p.replies %} +
+ {% with comments=p.replies %} + {% include "comments.html" %} + {% endwith %} +
+ +{% if offset %} + +{% endif %} + +{% elif not p.replies and p.deleted_utc == 0 %} +
+ + + + +

Be the first to comment!

+ {% if v %} +

This comment section is a ghost town...

+ {% else %} +

This comment section is a ghost town. Sign in

+ {% endif %} +
+{% endif %} + +
+ +
+ +{% if v and v.id==p.author_id %} + {% include "delete_post_modal.html" %} +{% endif %} + +{% if v %} + {% include "report_post_modal.html" %} +{% endif %} + +{% if v and (v.id == p.author_id or v.admin_level > 1 and v.admin_level > 2) %} + +{% endif %} + +{% if not v or v.highlightcomments %} + +{% endif %} + + + +{% if not p.replies %} + {% include "comments.html" %} +{% endif %} + +{% if p.award_count("shit", v) %} + + +{% endif %} + + +{% if p.award_count("fireflies", v) %} + + +{% endif %} + + + + +{% if success %} + +{% endif %} + + +{% if p.award_count("crab", v) %} + +{% endif %} + +{% if fart and not (v and v.has_badge(128)) %} + +{% endif %} + + +{% if p.award_count("confetti", v) %} +
+{% endif %} + +{% if p.award_count("firework", v) %} + +
+ +
+ + {% if p.award_count("firework", v) > 1 %} +
+ +
+ {% endif %} + + {% if p.award_count("firework", v) > 2 %} +
+ +
+ {% endif %} + + {% if p.award_count("firework", v) > 3 %} +
+ +
+ {% endif %} +{% endif %} + +{% if p.award_count("ricardo", v) %} + +
+ +
+ + {% if p.award_count("ricardo", v) > 1 %} +
+ +
+ {% endif %} + + {% if p.award_count("ricardo", v) > 2 %} +
+ +
+ {% endif %} +{% endif %} + +{% endblock %}