forked from rDrama/rDrama
Only show the new comments if the highlight new comments flag is active
Other small fixesmaster
commit
8f9c4320c7
|
@ -244,7 +244,7 @@ def award_post(pid, v):
|
|||
g.db.add(post.author)
|
||||
|
||||
g.db.commit()
|
||||
if request.referrer: return redirect(request.referrer)
|
||||
if len(request.referrer) > 1: return redirect(request.referrer)
|
||||
else: return redirect("/")
|
||||
|
||||
|
||||
|
|
|
@ -370,29 +370,18 @@ def edit_post(pid, v):
|
|||
def get_post_title(v):
|
||||
|
||||
url = request.values.get("url", None)
|
||||
if not url:
|
||||
return abort(400)
|
||||
if not url: return abort(400)
|
||||
|
||||
#mimic chrome browser agent
|
||||
headers = {"User-Agent": f"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"}
|
||||
try:
|
||||
x = requests.get(url, headers=headers)
|
||||
except BaseException:
|
||||
return {"error": "Could not reach page"}, 400
|
||||
|
||||
|
||||
if not x.status_code == 200:
|
||||
return {"error": f"Page returned {x.status_code}"}, x.status_code
|
||||
try: x = requests.get(url, headers=headers)
|
||||
except BaseException: return {"error": "Could not reach page"}, 400
|
||||
|
||||
if not x.status_code == 200: return {"error": f"Page returned {x.status_code}"}, x.status_code
|
||||
|
||||
try:
|
||||
soup = BeautifulSoup(x.content, 'html.parser')
|
||||
|
||||
data = {"url": url,
|
||||
"title": soup.find('title').string
|
||||
}
|
||||
|
||||
return data
|
||||
return {"url": url, "title": soup.find('title').string}
|
||||
except BaseException:
|
||||
return {"error": f"Could not find a title"}, 400
|
||||
|
||||
|
|
|
@ -106,7 +106,6 @@
|
|||
|
||||
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,154 +1,4 @@
|
|||
<script>
|
||||
// Voting
|
||||
|
||||
function post_vote(url, callback) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", url, true);
|
||||
var form = new FormData()
|
||||
form.append("formkey", formkey());
|
||||
xhr.withCredentials=true;
|
||||
xhr.send(form);
|
||||
}
|
||||
|
||||
var upvote = function(event) {
|
||||
|
||||
var type = event.target.dataset.bsContentType;
|
||||
var id = event.target.dataset.bsIdUp;
|
||||
|
||||
var downvoteButton = document.getElementsByClassName(type + '-' + id + '-down');
|
||||
var upvoteButton = document.getElementsByClassName(type + '-' + id + '-up');
|
||||
var scoreText = document.getElementsByClassName(type + '-score-' + id);
|
||||
|
||||
for (var j = 0; j < upvoteButton.length && j < downvoteButton.length && j < scoreText.length; j++) {
|
||||
|
||||
var thisUpvoteButton = upvoteButton[j];
|
||||
var thisDownvoteButton = downvoteButton[j];
|
||||
var thisScoreText = scoreText[j];
|
||||
var thisScore = Number(thisScoreText.textContent);
|
||||
|
||||
if (thisUpvoteButton.classList.contains('active')) {
|
||||
thisUpvoteButton.classList.remove('active')
|
||||
thisScoreText.textContent = thisScore - 1
|
||||
voteDirection = "0"
|
||||
} else if (thisDownvoteButton.classList.contains('active')) {
|
||||
thisUpvoteButton.classList.add('active')
|
||||
thisDownvoteButton.classList.remove('active')
|
||||
thisScoreText.textContent = thisScore + 2
|
||||
voteDirection = "1"
|
||||
} else {
|
||||
thisUpvoteButton.classList.add('active')
|
||||
thisScoreText.textContent = thisScore + 1
|
||||
voteDirection = "1"
|
||||
}
|
||||
|
||||
if (thisUpvoteButton.classList.contains('active')) {
|
||||
thisScoreText.classList.add('score-up')
|
||||
thisScoreText.classList.remove('score-down')
|
||||
thisScoreText.classList.remove('score')
|
||||
} else if (thisDownvoteButton.classList.contains('active')) {
|
||||
thisScoreText.classList.add('score-down')
|
||||
thisScoreText.classList.remove('score-up')
|
||||
thisScoreText.classList.remove('score')
|
||||
} else {
|
||||
thisScoreText.classList.add('score')
|
||||
thisScoreText.classList.remove('score-up')
|
||||
thisScoreText.classList.remove('score-down')
|
||||
}
|
||||
}
|
||||
|
||||
post_vote("/vote/" + type + "/" + id + "/" + voteDirection);
|
||||
|
||||
}
|
||||
|
||||
var downvote = function(event) {
|
||||
|
||||
var type = event.target.dataset.bsContentType;
|
||||
var id = event.target.dataset.bsIdDown;
|
||||
|
||||
var downvoteButton = document.getElementsByClassName(type + '-' + id + '-down');
|
||||
var upvoteButton = document.getElementsByClassName(type + '-' + id + '-up');
|
||||
var scoreText = document.getElementsByClassName(type + '-score-' + id);
|
||||
|
||||
for (var j = 0; j < upvoteButton.length && j < downvoteButton.length && j < scoreText.length; j++) {
|
||||
|
||||
var thisUpvoteButton = upvoteButton[j];
|
||||
var thisDownvoteButton = downvoteButton[j];
|
||||
var thisScoreText = scoreText[j];
|
||||
var thisScore = Number(thisScoreText.textContent);
|
||||
|
||||
if (thisDownvoteButton.classList.contains('active')) {
|
||||
thisDownvoteButton.classList.remove('active')
|
||||
thisScoreText.textContent = thisScore + 1
|
||||
voteDirection = "0"
|
||||
} else if (thisUpvoteButton.classList.contains('active')) {
|
||||
thisDownvoteButton.classList.add('active')
|
||||
thisUpvoteButton.classList.remove('active')
|
||||
thisScoreText.textContent = thisScore - 2
|
||||
voteDirection = "-1"
|
||||
} else {
|
||||
thisDownvoteButton.classList.add('active')
|
||||
thisScoreText.textContent = thisScore - 1
|
||||
voteDirection = "-1"
|
||||
}
|
||||
|
||||
if (thisUpvoteButton.classList.contains('active')) {
|
||||
thisScoreText.classList.add('score-up')
|
||||
thisScoreText.classList.remove('score-down')
|
||||
thisScoreText.classList.remove('score')
|
||||
} else if (thisDownvoteButton.classList.contains('active')) {
|
||||
thisScoreText.classList.add('score-down')
|
||||
thisScoreText.classList.remove('score-up')
|
||||
thisScoreText.classList.remove('score')
|
||||
} else {
|
||||
thisScoreText.classList.add('score')
|
||||
thisScoreText.classList.remove('score-up')
|
||||
thisScoreText.classList.remove('score-down')
|
||||
}
|
||||
}
|
||||
|
||||
post_vote("/vote/" + type + "/" + id + "/" + voteDirection);
|
||||
|
||||
}
|
||||
|
||||
|
||||
var upvoteButtons = document.getElementsByClassName('upvote-button')
|
||||
|
||||
var downvoteButtons = document.getElementsByClassName('downvote-button')
|
||||
|
||||
var voteDirection = 0
|
||||
|
||||
for (var i = 0; i < upvoteButtons.length; i++) {
|
||||
upvoteButtons[i].addEventListener('click', upvote, false);
|
||||
upvoteButtons[i].addEventListener('keydown', function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
upvote(event)
|
||||
}
|
||||
}, false)
|
||||
};
|
||||
|
||||
for (var i = 0; i < downvoteButtons.length; i++) {
|
||||
downvoteButtons[i].addEventListener('click', downvote, false);
|
||||
downvoteButtons[i].addEventListener('keydown', function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
downvote(event)
|
||||
}
|
||||
}, false)
|
||||
};
|
||||
|
||||
// award modal
|
||||
|
||||
function awardModal(link) {
|
||||
var target = document.getElementById("awardTarget");
|
||||
target.action = link;
|
||||
}
|
||||
|
||||
function bruh(kind) {
|
||||
document.getElementById('giveaward').disabled=false;
|
||||
document.getElementById('kind').value=kind;
|
||||
try {document.getElementsByClassName('picked')[0].classList.toggle('picked');} catch(e) {}
|
||||
document.getElementById(kind).classList.toggle('picked')
|
||||
}
|
||||
</script>
|
||||
<script src="/assets/js/award_modal.js"></script>
|
||||
|
||||
<div class="modal fade" id="awardModal" tabindex="-1" role="dialog" aria-labelledby="awardModalTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable modal-dialog-centered" role="document">
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
{% block pagetitle %}Changelog{% endblock %}
|
||||
|
||||
{% block desktopBanner %}
|
||||
<script src="/assets/js/changelog.js"></script>
|
||||
|
||||
<div class="row d-block" style="overflow: visible;padding-top:5px;">
|
||||
<div class="col">
|
||||
|
|
|
@ -1,364 +1,16 @@
|
|||
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
|
||||
|
||||
{% if v %}
|
||||
<script>
|
||||
function post_toast3(url, button1, button2) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", url, true);
|
||||
var form = new FormData()
|
||||
|
||||
if(typeof data === 'object' && data !== null) {
|
||||
for(let k of Object.keys(data)) {
|
||||
form.append(k, data[k]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
form.append("formkey", formkey());
|
||||
xhr.withCredentials=true;
|
||||
|
||||
xhr.onload = function() {
|
||||
if (xhr.status >= 200 && xhr.status < 300) {
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
||||
myToast.show();
|
||||
try {
|
||||
document.getElementById('toast-post-success-text').innerText = JSON.parse(xhr.response)["message"];
|
||||
} catch(e) {
|
||||
document.getElementById('toast-post-success-text').innerText = "Action successful!";
|
||||
}
|
||||
return true
|
||||
|
||||
} else if (xhr.status >= 300 && xhr.status < 400) {
|
||||
window.location.href = JSON.parse(xhr.response)["redirect"]
|
||||
} else {
|
||||
|
||||
try {
|
||||
data=JSON.parse(xhr.response);
|
||||
} catch(e) {}
|
||||
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
||||
myToast.hide();
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||
myToast.show();
|
||||
document.getElementById('toast-post-error-text').innerText = "Error. Try again later.";
|
||||
return false
|
||||
}
|
||||
};
|
||||
|
||||
xhr.send(form);
|
||||
|
||||
document.getElementById(button1).classList.toggle("d-md-inline-block");
|
||||
document.getElementById(button2).classList.toggle("d-md-inline-block");
|
||||
}
|
||||
|
||||
//reporting
|
||||
// Report Comment
|
||||
|
||||
report_commentModal = function(id, author) {
|
||||
|
||||
document.getElementById("comment-author").textContent = author;
|
||||
|
||||
//offtopic.disabled=true;
|
||||
|
||||
document.getElementById("reportCommentButton").onclick = function() {
|
||||
|
||||
this.innerHTML='<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>Reporting comment';
|
||||
this.disabled = true;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", '/flag/comment/'+id, true);
|
||||
var form = new FormData()
|
||||
form.append("formkey", formkey());
|
||||
form.append("reason", document.getElementById("reason-comment").value);
|
||||
|
||||
xhr.withCredentials=true;
|
||||
|
||||
xhr.onload=function() {
|
||||
document.getElementById("reportCommentFormBefore").classList.add('d-none');
|
||||
document.getElementById("reportCommentFormAfter").classList.remove('d-none');
|
||||
};
|
||||
|
||||
xhr.onerror=function(){alert(errortext)};
|
||||
xhr.send(form);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
|
||||
document.getElementById('reportCommentModal').addEventListener('hidden.bs.modal', function () {
|
||||
|
||||
const button = document.getElementById("reportCommentButton");
|
||||
|
||||
const beforeModal = document.getElementById("reportCommentFormBefore");
|
||||
const afterModal = document.getElementById("reportCommentFormAfter");
|
||||
|
||||
button.innerHTML = 'Report comment';
|
||||
button.disabled = false;
|
||||
afterModal.classList.add('d-none');
|
||||
|
||||
if (beforeModal.classList.contains('d-none')) {
|
||||
beforeModal.classList.remove('d-none');
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
//Commenting form
|
||||
|
||||
// Open comment reply box
|
||||
|
||||
function openReplyBox(id) {
|
||||
const element = document.getElementById(`reply-to-${id}`);
|
||||
element.classList.remove('d-none')
|
||||
|
||||
element.getElementsByTagName('textarea')[0].focus()
|
||||
}
|
||||
|
||||
// Comment edit form
|
||||
|
||||
toggleEdit=function(id){
|
||||
comment=document.getElementById("comment-text-"+id);
|
||||
form=document.getElementById("comment-edit-"+id);
|
||||
box=document.getElementById('comment-edit-body-'+id);
|
||||
actions = document.getElementById('comment-' + id +'-actions');
|
||||
|
||||
comment.classList.toggle("d-none");
|
||||
form.classList.toggle("d-none");
|
||||
actions.classList.toggle("d-none");
|
||||
autoExpand(box);
|
||||
};
|
||||
|
||||
|
||||
// Delete Comment
|
||||
|
||||
function delete_commentModal(id) {
|
||||
|
||||
// Passed data for modal
|
||||
|
||||
document.getElementById("deleteCommentButton").onclick = function() {
|
||||
|
||||
this.innerHTML='<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>Deleting comment';
|
||||
this.disabled = true;
|
||||
post('/delete/comment/' + id,
|
||||
callback = function() {
|
||||
|
||||
location.reload();
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
post_comment=function(fullname, postId){
|
||||
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
form.append('formkey', formkey());
|
||||
form.append('parent_fullname', fullname);
|
||||
form.append('submission', document.getElementById('reply-form-submission-'+fullname).value);
|
||||
form.append('body', document.getElementById('reply-form-body-'+fullname).value);
|
||||
form.append('file', document.getElementById('file-upload-reply-'+fullname).files[0]);
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("post", "/comment");
|
||||
xhr.withCredentials=true;
|
||||
xhr.onload=function(){
|
||||
if (xhr.status==200) {
|
||||
commentForm=document.getElementById('comment-form-space-'+fullname);
|
||||
commentForm.innerHTML=JSON.parse(xhr.response)["html"];
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||
myToast.hide();
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
||||
myToast.show();
|
||||
|
||||
incrementCommentCount(postId)
|
||||
}
|
||||
else {
|
||||
var commentError = document.getElementById("comment-error-text");
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
||||
myToast.hide();
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||
myToast.show();
|
||||
commentError.textContent = JSON.parse(xhr.response)["error"];
|
||||
}
|
||||
}
|
||||
xhr.send(form)
|
||||
|
||||
document.getElementById('save-reply-to-'+fullname).classList.add('disabled');
|
||||
|
||||
}
|
||||
|
||||
post_reply=function(id){
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
form.append('formkey', formkey());
|
||||
form.append('parent_id', id);
|
||||
form.append('body', document.getElementById('reply-form-body-'+id).value);
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("post", "/reply");
|
||||
xhr.withCredentials=true;
|
||||
xhr.onload=function(){
|
||||
if (xhr.status==200) {
|
||||
commentForm=document.getElementById('comment-form-space-'+id);
|
||||
commentForm.innerHTML=JSON.parse(xhr.response)["html"];
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||
myToast.hide();
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
||||
myToast.show();
|
||||
}
|
||||
else {
|
||||
var commentError = document.getElementById("comment-error-text");
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
||||
myToast.hide();
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||
myToast.show();
|
||||
|
||||
}
|
||||
}
|
||||
xhr.send(form)
|
||||
|
||||
document.getElementById('save-reply-to-'+id).classList.add('disabled');
|
||||
|
||||
}
|
||||
|
||||
comment_edit=function(id){
|
||||
|
||||
var commentError = document.getElementById("comment-error-text");
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
form.append('formkey', formkey());
|
||||
form.append('body', document.getElementById('comment-edit-body-'+id).value);
|
||||
form.append('file', document.getElementById('file-edit-reply-'+id).files[0]);
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("post", "/edit_comment/"+id);
|
||||
xhr.withCredentials=true;
|
||||
xhr.onload=function(){
|
||||
if (xhr.status==200) {
|
||||
commentForm=document.getElementById('comment-text-'+id);
|
||||
commentForm.innerHTML=JSON.parse(xhr.response)["html"];
|
||||
document.getElementById('cancel-edit-'+id).click()
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||
myToast.hide();
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
||||
myToast.show();
|
||||
}
|
||||
else {
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
||||
myToast.hide();
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||
myToast.show();
|
||||
|
||||
commentError.textContent = JSON.parse(xhr.response)["error"];
|
||||
}
|
||||
}
|
||||
xhr.send(form)
|
||||
|
||||
}
|
||||
</script>
|
||||
<script src="/assets/js/comments_v.js"></script>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if v and v.admin_level == 6 %}
|
||||
<script>
|
||||
//comment modding
|
||||
function removeComment(post_id,button1,button2) {
|
||||
url="/ban_comment/"+post_id
|
||||
|
||||
callback=function(){
|
||||
|
||||
try {
|
||||
document.getElementById("comment-"+post_id+"-only").classList.add("banned");
|
||||
} catch(e) {
|
||||
document.getElementById("context").classList.add("banned");
|
||||
}
|
||||
|
||||
button=document.getElementById("remove-"+post_id);
|
||||
button.onclick=function(){approveComment(post_id)};
|
||||
button.innerHTML='<i class="fas fa-clipboard-check"></i>Approve'
|
||||
}
|
||||
post(url, callback, "Comment has been removed.")
|
||||
|
||||
|
||||
if (typeof button1 !== 'undefined') {
|
||||
document.getElementById(button1).classList.toggle("d-md-inline-block");
|
||||
document.getElementById(button2).classList.toggle("d-md-inline-block");
|
||||
}
|
||||
};
|
||||
|
||||
function approveComment(post_id,button1,button2) {
|
||||
url="/unban_comment/"+post_id
|
||||
|
||||
callback=function(){
|
||||
try {
|
||||
document.getElementById("comment-"+post_id+"-only").classList.remove("banned");
|
||||
} catch(e) {
|
||||
document.getElementById("context").classList.remove("banned");
|
||||
}
|
||||
|
||||
button=document.getElementById("remove-"+post_id);
|
||||
button.onclick=function(){removeComment(post_id)};
|
||||
button.innerHTML='<i class="fas fa-trash-alt"></i>Remove'
|
||||
}
|
||||
|
||||
post(url, callback, "Comment has been approved.")
|
||||
|
||||
if (typeof button1 !== 'undefined') {
|
||||
document.getElementById(button1).classList.toggle("d-md-inline-block");
|
||||
document.getElementById(button2).classList.toggle("d-md-inline-block");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function removeComment2(post_id,button1,button2) {
|
||||
url="/ban_comment/"+post_id
|
||||
|
||||
callback=function(){
|
||||
document.getElementById("comment-"+post_id+"-only").classList.add("banned");
|
||||
|
||||
button=document.getElementById("remove-"+post_id);
|
||||
button.onclick=function(){approveComment(post_id)};
|
||||
button.innerHTML='<i class="fas fa-clipboard-check"></i>Approve'
|
||||
}
|
||||
post(url, callback, "Comment has been removed.")
|
||||
|
||||
|
||||
if (typeof button1 !== 'undefined') {
|
||||
document.getElementById(button1).classList.toggle("d-none");
|
||||
document.getElementById(button2).classList.toggle("d-none");
|
||||
}
|
||||
};
|
||||
|
||||
function approveComment2(post_id,button1,button2) {
|
||||
url="/unban_comment/"+post_id
|
||||
|
||||
callback=function(){
|
||||
document.getElementById("comment-"+post_id+"-only").classList.remove("banned");
|
||||
|
||||
button=document.getElementById("remove-"+post_id);
|
||||
button.onclick=function(){removeComment(post_id)};
|
||||
button.innerHTML='<i class="fas fa-trash-alt"></i>Remove'
|
||||
}
|
||||
|
||||
post(url, callback, "Comment has been approved.")
|
||||
|
||||
if (typeof button1 !== 'undefined') {
|
||||
document.getElementById(button1).classList.toggle("d-none");
|
||||
document.getElementById(button2).classList.toggle("d-none");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script src="/assets/js/comments_admin.js"></script>
|
||||
{% endif %}
|
||||
|
||||
<script>
|
||||
|
||||
// comment collapse
|
||||
|
||||
// Toggle comment collapse
|
||||
|
||||
function collapse_comment(comment_id) {
|
||||
const comment = "comment-" + comment_id
|
||||
const element = document.getElementById(comment)
|
||||
|
@ -488,7 +140,6 @@
|
|||
<div id="comment-{{c.id}}" class="{% if c.unread %}context{% endif %} comment {% if standalone and level==1 %} mt-0{% endif %}{% if c.collapse_for_user(v) or (standalone and c.over_18 and not (v and v.over_18)) %} collapsed{% endif %}" style="border-left: 2px solid #{{c.author.namecolor}}; {% if c.unread %}padding: 10px 10px 10px !important;{% endif %}">
|
||||
|
||||
<span class="comment-collapse-desktop d-none d-md-block" {% if not c.unread %}style="border-left: 2px solid #{{c.author.namecolor}};"{% endif %} onclick="collapse_comment('{{c.id}}')"></span>
|
||||
|
||||
<div class="comment-body">
|
||||
|
||||
<div id="{% if comment_info and comment_info.id == c.id %}context{%else%}comment-{{c.id}}-only{% endif %}" class="{% if comment_info and comment_info.id == c.id %}context{%endif%}{% if c.is_banned %} banned{% endif %}{% if c.deleted_utc %} deleted{% endif %}">
|
||||
|
@ -507,7 +158,6 @@
|
|||
{% if c.bannedfor and c.author.banned_by %}
|
||||
<a href="javascript:void(0)"><i class="fad fa-gavel text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" title="User was banned for this comment by @{{c.author.banned_by.username}}"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if c.active_flags %}<a class="btn btn-primary" style="padding:1px 5px; font-size:10px;" href="javascript:void(0)" onclick="document.getElementById('flaggers-{{c.id}}').classList.toggle('d-none')">{{c.active_flags}} Reports</a>{% endif %}
|
||||
{% if c.over_18 %}<span class="badge badge-danger text-small-extra mr-1">+18</span>{% endif %}
|
||||
{% if v and v.admin_level==6 and c.author.shadowbanned %}<i class="fas fa-user-times text-admin" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Shadowbanned user"></i>{% endif %}
|
||||
|
@ -528,7 +178,6 @@
|
|||
<span class="time-edited"><span>·</span> <span class="font-italic">Edited {{c.edited_string}}</span></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if c.active_flags %}
|
||||
<div id="flaggers-{{c.id}}" class="flaggers d-none">
|
||||
<strong><i class="far fa-fw fa-flag"></i> Reported by:</strong>
|
||||
|
@ -553,7 +202,6 @@
|
|||
{% if not c.parent_submission and c.author_id!=NOTIFICATIONS_ACCOUNT and c.author_id!=AUTOJANNY_ACCOUNT and c.author_id!=v.id %}
|
||||
<a class="btn btn-primary" href="javascript:void(0)" onclick="document.getElementById('reply-m-{{c.id}}').classList.toggle('d-none')">Reply</a>
|
||||
<pre></pre>
|
||||
|
||||
<div id="reply-m-{{c.id}}" class="d-none">
|
||||
<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">
|
||||
|
@ -578,7 +226,6 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if c.parent_submission %}
|
||||
|
||||
{% if v and v.id==c.author_id %}
|
||||
|
@ -591,7 +238,6 @@
|
|||
|
||||
<small class="btn btn-secondary format d-inline-block m-0"><i class="fas fa-smile-beam" aria-hidden="true" onclick="loadEmojis('comment-edit-body-{{c.id}}')" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Add Emoji"></i></small>
|
||||
|
||||
|
||||
<label class="btn btn-secondary format d-inline-block m-0" for="file-edit-reply-{{c.id}}">
|
||||
<div id="filename-edit-reply-{{c.id}}"><i class="far fa-image"></i></div>
|
||||
<input id="file-edit-reply-{{c.id}}" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-edit-reply-{{c.id}}').innerHTML='image';" hidden>
|
||||
|
@ -605,16 +251,13 @@
|
|||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div id="comment-{{c.id}}-actions" class="comment-actions{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}">
|
||||
<ul class="list-inline text-right text-md-left">
|
||||
|
||||
{% if v and request.path.startswith('/@') and v.admin_level == 0%}
|
||||
|
||||
{% if voted==1 %}
|
||||
<li class="list-inline-item arrow-up d-none d-md-inline-block mr-2 comment-{{c.id}}-up active"></li>
|
||||
{% endif %}
|
||||
|
||||
{% elif v %}
|
||||
|
||||
<li id="comment-{{c.id}}-up" tabindex="0" class="list-inline-item arrow-up upvote-button d-none d-md-inline-block mr-2 comment-{{c.id}}-up {% if voted==1 %}active{% endif %}" data-bs-id-up="{{c.id}}" data-bs-content-type="comment"></li>
|
||||
|
@ -629,11 +272,9 @@
|
|||
</li>
|
||||
|
||||
{% if v and request.path.startswith('/@') and v.admin_level == 0 %}
|
||||
|
||||
{% if voted==-1 %}
|
||||
<li class="list-inline-item arrow-down d-none d-md-inline-block mr-2 comment-{{c.id}}-down active"></li>
|
||||
{% endif %}
|
||||
|
||||
{% elif v %}
|
||||
<li {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="comment-{{c.id}}-down" tabindex="0" class="list-inline-item arrow-down downvote-button d-none d-md-inline-block mr-2 comment-{{c.id}}-down {% if voted==-1 %}active{% endif %}" data-bs-id-down="{{c.id}}" data-bs-content-type="comment"></li>
|
||||
|
||||
|
@ -659,7 +300,6 @@
|
|||
|
||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><a {% if v %}href="{{c.permalink}}?context=5#context"{% else %}href="/logged_out{{c.permalink}}?context=5#context"{% endif %}><i class="fas fa-book-open"></i>Context</a></li>
|
||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="javascript:void(0);" role="button" class="copy-link" data-clipboard-text="{% if 'rdrama' in request.host %}https://taytay.life{{c.permalink}}{% else %}{{c.permalink | full_link}}{% endif %}/?context=5#context"><i class="fas fa-copy"></i>Copy link</a></li>
|
||||
|
||||
{% if v %}
|
||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><a 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></li>
|
||||
{% endif %}
|
||||
|
@ -681,7 +321,6 @@
|
|||
<li id="distinguish-{{c.id}}" class="list-inline-item d-none {% if not c.distinguish_level %}d-md-inline-block{% endif %}"><a class="text-info" href="javascript:void(0)" onclick="post_toast3('/distinguish_comment/{{c.id}}','distinguish-{{c.id}}','undistinguish-{{c.id}}','yes')"><i class="fas fa-id-badge text-info fa-fw"></i>Distinguish</a></li>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if v and not v.id==c.author_id and v.admin_level == 0 %}
|
||||
<li id="unblock-{{c.id}}" class="{% if c.is_blocked %}d-md-inline-block{% endif %} list-inline-item text-muted d-none"><a href="javascript:void(0)" onclick="post_toast3('/settings/unblock?username={{c.author.username}}','block-{{c.id}}','unblock-{{c.id}}')"><i class="fas fa-eye-slash fa-fw"></i>Unblock user</a></li>
|
||||
<li id="block-{{c.id}}" class="{% if not c.is_blocked %}d-md-inline-block{% endif %} list-inline-item text-muted d-none"><a href="javascript:void(0)" onclick="post_toast3('/settings/block?username={{c.author.username}}','block-{{c.id}}','unblock-{{c.id}}')"><i class="fas fa-eye-slash fa-fw"></i>Block user</a></li>
|
||||
|
@ -726,7 +365,6 @@
|
|||
{% else %}
|
||||
<li id="comment-{{c.id}}-up" tabindex="0" class="list-inline-item arrow-up d-inline-block d-md-none mr-2" onclick="location.href='/login';"></li>
|
||||
{% endif %}
|
||||
|
||||
<li class="list-inline-item d-inline-block d-md-none mr-2"><span class="points" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-original-title="+{{ups}} | -{{downs}}"><span id="comment-score-{{c.id}}" class="score comment-score-{{c.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}">{{score}}</span></span></li>
|
||||
{% if v and request.path.startswith('/@') and v.admin_level == 0 %}
|
||||
{% if voted==-1 %}
|
||||
|
@ -926,7 +564,6 @@
|
|||
<span aria-hidden="true"><i class="far fa-times"></i></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body text-center">
|
||||
|
||||
<div class="py-4">
|
||||
|
@ -935,12 +572,10 @@
|
|||
|
||||
<p>Your comment will be removed everywhere on {{'SITE_NAME' | app_config}}. This action can be undone.</p>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-link text-muted" data-bs-dismiss="modal">Cancel</button>
|
||||
<button id="deleteCommentButton" class="btn btn-danger">Delete comment</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
<meta name="description" content="Contact {{'SITE_NAME' | app_config}} Admins">
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if request.values.get('error') or error %}
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="/assets/js/general41.js"></script>
|
||||
|
||||
{% if v and v.agendaposter %}
|
||||
<script>
|
||||
/*
|
||||
Bug.js - https://github.com/Auz/Bug
|
||||
Released under MIT-style license.
|
||||
Original Screen Bug http://screen-bug.googlecode.com/git/index.html
|
||||
*/
|
||||
var BugDispatch={options:{minDelay:500,maxDelay:1E4,minBugs:2,maxBugs:20,minSpeed:5,maxSpeed:10,maxLargeTurnDeg:150,maxSmallTurnDeg:10,maxWiggleDeg:5,imageSprite:"fly-sprite.webp",bugWidth:13,bugHeight:14,num_frames:5,zoom:10,canFly:!0,canDie:!0,numDeathTypes:3,monitorMouseMovement:!1,eventDistanceToBug:40,minTimeBetweenMultipy:1E3,mouseOver:"random"},initialize:function(a){this.options=mergeOptions(this.options,a);this.options.minBugs>this.options.maxBugs&&(this.options.minBugs=this.options.maxBugs);
|
||||
this.modes=["multiply","nothing"];this.options.canFly&&this.modes.push("fly","flyoff");this.options.canDie&&this.modes.push("die");-1==this.modes.indexOf(this.options.mouseOver)&&(this.options.mouseOver="random");this.transform=null;this.transforms={Moz:function(a){this.bug.style.MozTransform=a},webkit:function(a){this.bug.style.webkitTransform=a},O:function(a){this.bug.style.OTransform=a},ms:function(a){this.bug.style.msTransform=a},Khtml:function(a){this.bug.style.KhtmlTransform=a},w3c:function(a){this.bug.style.transform=
|
||||
a}};if("transform"in document.documentElement.style)this.transform=this.transforms.w3c;else{var b=["Moz","webkit","O","ms","Khtml"],c=0;for(c=0;c<b.length;c++)if(b[c]+"Transform"in document.documentElement.style){this.transform=this.transforms[b[c]];break}}if(this.transform){this.bugs=[];b="multiply"===this.options.mouseOver?this.options.minBugs:this.random(this.options.minBugs,this.options.maxBugs,!0);c=0;var d=this;for(c=0;c<b;c++){a=JSON.parse(JSON.stringify(this.options));var e=SpawnBug();a.wingsOpen=
|
||||
|
@ -46,8 +38,6 @@
|
|||
this.random(50,300)},bug_near_window_edge:function(){this.near_edge=0;this.bug.top<this.options.edge_resistance?this.near_edge|=this.NEAR_TOP_EDGE:this.bug.top>document.documentElement.clientHeight-this.options.edge_resistance&&(this.near_edge|=this.NEAR_BOTTOM_EDGE);this.bug.left<this.options.edge_resistance?this.near_edge|=this.NEAR_LEFT_EDGE:this.bug.left>document.documentElement.clientWidth-this.options.edge_resistance&&(this.near_edge|=this.NEAR_RIGHT_EDGE);return this.near_edge},getPos:function(){return this.inserted&&
|
||||
this.bug&&this.bug.style?{top:parseInt(this.bug.top,10),left:parseInt(this.bug.left,10)}:null}},SpawnBug=function(){var a={},b;for(b in Bug)Bug.hasOwnProperty(b)&&(a[b]=Bug[b]);return a},mergeOptions=function(a,b,c){"undefined"==typeof c&&(c=!0);a=c?cloneOf(a):a;for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);return a},cloneOf=function(a){if(null==a||"object"!=typeof a)return a;var b=a.constructor(),c;for(c in a)a.hasOwnProperty(c)&&(b[c]=cloneOf(a[c]));return b};
|
||||
window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a,b){window.setTimeout(a,1E3/60)}}();
|
||||
</script>
|
||||
<script>
|
||||
new BugController({
|
||||
imageSprite: "/assets/images/fly-sprite.webp",
|
||||
canDie: false,
|
||||
|
@ -77,212 +67,7 @@
|
|||
|
||||
{% if v %}
|
||||
<script src="https://js.pusher.com/beams/1.0/push-notifications-cdn.js"></script>
|
||||
|
||||
<script>
|
||||
const beamsClient = new PusherPushNotifications.Client({
|
||||
instanceId: '02ddcc80-b8db-42be-9022-44c546b4dce6',
|
||||
});
|
||||
|
||||
beamsClient
|
||||
.start()
|
||||
.then((beamsClient) => beamsClient.getDeviceId())
|
||||
.then(() => beamsClient.addDeviceInterest('{{v.strid}}'))
|
||||
.then(() => beamsClient.getDeviceInterests())
|
||||
.catch(console.error);
|
||||
|
||||
// Text Formatting
|
||||
|
||||
// Bold Text
|
||||
|
||||
makeBold = function (form) {
|
||||
var text = document.getElementById(form);
|
||||
var startIndex = text.selectionStart,
|
||||
endIndex = text.selectionEnd;
|
||||
var selectedText = text.value.substring(startIndex, endIndex);
|
||||
|
||||
var format = '**'
|
||||
|
||||
if (selectedText.includes('**')) {
|
||||
text.value = selectedText.replace(/\*/g, '');
|
||||
|
||||
}
|
||||
else if (selectedText.length == 0) {
|
||||
text.value = text.value.substring(0, startIndex) + selectedText + text.value.substring(endIndex);
|
||||
}
|
||||
else {
|
||||
text.value = text.value.substring(0, startIndex) + format + selectedText + format + text.value.substring(endIndex);
|
||||
}
|
||||
}
|
||||
|
||||
// Italicize Comment Text
|
||||
|
||||
makeItalics = function (form) {
|
||||
var text = document.getElementById(form);
|
||||
var startIndex = text.selectionStart,
|
||||
endIndex = text.selectionEnd;
|
||||
var selectedText = text.value.substring(startIndex, endIndex);
|
||||
|
||||
var format = '*'
|
||||
|
||||
if (selectedText.includes('*')) {
|
||||
text.value = selectedText.replace(/\*/g, '');
|
||||
|
||||
}
|
||||
else if (selectedText.length == 0) {
|
||||
text.value = text.value.substring(0, startIndex) + selectedText + text.value.substring(endIndex);
|
||||
}
|
||||
else {
|
||||
text.value = text.value.substring(0, startIndex) + format + selectedText + format + text.value.substring(endIndex);
|
||||
}
|
||||
}
|
||||
|
||||
// Quote Comment Text
|
||||
|
||||
makeQuote = function (form) {
|
||||
var text = document.getElementById(form);
|
||||
var startIndex = text.selectionStart,
|
||||
endIndex = text.selectionEnd;
|
||||
var selectedText = text.value.substring(startIndex, endIndex);
|
||||
|
||||
var format = '>'
|
||||
|
||||
if (selectedText.includes('>')) {
|
||||
text.value = text.value.substring(0, startIndex) + selectedText.replace(/\>/g, '') + text.value.substring(endIndex);
|
||||
|
||||
}
|
||||
else if (selectedText.length == 0) {
|
||||
text.value = text.value.substring(0, startIndex) + selectedText + text.value.substring(endIndex);
|
||||
}
|
||||
else {
|
||||
text.value = text.value.substring(0, startIndex) + format + selectedText + text.value.substring(endIndex);
|
||||
}
|
||||
}
|
||||
|
||||
function autoExpand (field) {
|
||||
|
||||
//get current scroll position
|
||||
xpos=window.scrollX;
|
||||
ypos=window.scrollY;
|
||||
|
||||
// Reset field height
|
||||
field.style.height = 'inherit';
|
||||
|
||||
// Get the computed styles for the element
|
||||
var computed = window.getComputedStyle(field);
|
||||
|
||||
// Calculate the height
|
||||
var height = parseInt(computed.getPropertyValue('border-top-width'), 10)
|
||||
+ parseInt(computed.getPropertyValue('padding-top'), 10)
|
||||
+ field.scrollHeight
|
||||
+ parseInt(computed.getPropertyValue('padding-bottom'), 10)
|
||||
+ parseInt(computed.getPropertyValue('border-bottom-width'), 10)
|
||||
+ 32;
|
||||
|
||||
field.style.height = height + 'px';
|
||||
|
||||
//keep window position from changing
|
||||
window.scrollTo(xpos,ypos);
|
||||
|
||||
};
|
||||
|
||||
|
||||
document.addEventListener('input', function (event) {
|
||||
if (event.target.tagName.toLowerCase() !== 'textarea') return;
|
||||
autoExpand(event.target);
|
||||
}, false);
|
||||
|
||||
|
||||
for(let el of document.getElementsByClassName('text-expand')) {
|
||||
el.onclick = function(event){
|
||||
if (event.which != 1) {
|
||||
return
|
||||
};
|
||||
id=this.data('id');
|
||||
|
||||
|
||||
document.getElementById('post-text-'+id).toggleClass('d-none');
|
||||
document.getElementsByClassName('text-expand-icon-'+id)[0].toggleClass('fa-expand-alt');
|
||||
document.getElementsByClassName('text-expand-icon-'+id)[0].toggleClass('fa-compress-alt');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// New comment counts
|
||||
|
||||
// comment counts format: {"<postId>": {c: <totalComments>, t: <timestampUpdated>}}
|
||||
const COMMENT_COUNTS_ID = "comment-counts"
|
||||
|
||||
/**
|
||||
* Display the number of new comments present since the last time the post was opened
|
||||
*/
|
||||
function showNewCommentCounts(postId, newTotal) {
|
||||
const comments = JSON.parse(localStorage.getItem(COMMENT_COUNTS_ID)) || {}
|
||||
|
||||
const lastCount = comments[postId]
|
||||
if (lastCount) {
|
||||
const newComments = newTotal - lastCount.c
|
||||
if (newComments > 0) {
|
||||
document.querySelectorAll(`#post-${postId} .new-comments`).forEach(elem => {
|
||||
elem.textContent = ` (+${newComments})`
|
||||
elem.classList.remove("d-none")
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function incrementCommentCount(postId) {
|
||||
saveCommentsCount(postId)
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the comment count to the localStorage
|
||||
*
|
||||
* @param postId The id of the post associated with the comments
|
||||
* @param lastTotalComs The new amount, If null it will just increment the previous amount
|
||||
*/
|
||||
function saveCommentsCount(postId, lastTotalComs = null) {
|
||||
const comments = JSON.parse(localStorage.getItem(COMMENT_COUNTS_ID)) || {}
|
||||
|
||||
const newTotal = lastTotalComs || ((comments[postId] || { c: 0 }).c + 1)
|
||||
|
||||
comments[postId] = { c: newTotal, t: Date.now() }
|
||||
|
||||
window.localStorage.setItem(COMMENT_COUNTS_ID, JSON.stringify(comments))
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleans the expired entries (5 days). It runs every hour.
|
||||
*/
|
||||
function cleanCommentsCache() {
|
||||
const LAST_CACHE_CLEAN_ID = "last-cache-clean"
|
||||
const EXPIRE_INTERVAL_MILLIS = 5 * 24 * 60 * 60 * 1000
|
||||
const CACHE_CLEAN_INTERVAL = 60 * 60 * 1000 // 1 hour
|
||||
|
||||
function cleanCache() {
|
||||
const lastCacheClean = JSON.parse(localStorage.getItem(LAST_CACHE_CLEAN_ID)) || Date.now()
|
||||
const now = Date.now()
|
||||
|
||||
if (now - lastCacheClean > CACHE_CLEAN_INTERVAL) {
|
||||
const comments = JSON.parse(localStorage.getItem(COMMENT_COUNTS_ID)) || {}
|
||||
|
||||
for (let [key, value] of Object.entries(comments)) {
|
||||
if (now - value.t > EXPIRE_INTERVAL_MILLIS) {
|
||||
delete comments[key]
|
||||
}
|
||||
}
|
||||
window.localStorage.setItem(COMMENT_COUNTS_ID, JSON.stringify(comments))
|
||||
}
|
||||
window.localStorage.setItem(LAST_CACHE_CLEAN_ID, JSON.stringify(now))
|
||||
}
|
||||
|
||||
// So it does not slow the load of the main page with the clean up
|
||||
setTimeout(cleanCache, 500)
|
||||
}
|
||||
cleanCommentsCache()
|
||||
|
||||
</script>
|
||||
|
||||
<script src="/assets/js/default.js"></script>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
@ -292,7 +77,6 @@
|
|||
<meta name="thumbnail" content="/assets/images/{{'SITE_NAME' | app_config}}/preview.webp">
|
||||
|
||||
<link rel="icon" type="image/png" href="/assets/images/{{'SITE_NAME' | app_config}}/icon.webp">
|
||||
|
||||
{% block title %}
|
||||
<title>{{'SITE_NAME' | app_config}}</title>
|
||||
|
||||
|
@ -461,7 +245,6 @@
|
|||
/>
|
||||
|
||||
|
||||
|
||||
{% block stylesheets %}
|
||||
|
||||
{% if v %}
|
||||
|
@ -480,11 +263,8 @@
|
|||
{% endblock %}
|
||||
|
||||
{% if v %}
|
||||
|
||||
<script>
|
||||
function formkey() {
|
||||
return '{{v.formkey}}';
|
||||
}
|
||||
function formkey() {return '{{v.formkey}}';}
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
|
@ -535,7 +315,6 @@
|
|||
{% endblock %}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,7 +1,22 @@
|
|||
<script>
|
||||
function delete_postModal(id) {
|
||||
function post(url, callback, errortext) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", url, true);
|
||||
var form = new FormData()
|
||||
form.append("formkey", formkey());
|
||||
xhr.withCredentials=true;
|
||||
xhr.onerror=function() { alert(errortext); };
|
||||
xhr.onload = function() {
|
||||
if (xhr.status >= 200 && xhr.status < 300) {
|
||||
callback();
|
||||
} else {
|
||||
xhr.onerror();
|
||||
}
|
||||
};
|
||||
xhr.send(form);
|
||||
};
|
||||
|
||||
// Passed data for modal
|
||||
function delete_postModal(id) {
|
||||
|
||||
document.getElementById("deletePostButton-mobile").addEventListener("click", delete_post);
|
||||
|
||||
|
@ -31,12 +46,10 @@
|
|||
<span aria-hidden="true"><i class="far fa-times"></i></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body text-center">
|
||||
|
||||
<div class="py-4">
|
||||
<i class="fad fa-trash-alt text-muted d-none d-md-block" style="font-size: 3.5rem;"></i>
|
||||
|
||||
<span class="fa-stack fa-2x text-muted d-md-none">
|
||||
<i class="fas fa-circle text-danger opacity-25 fa-stack-2x"></i>
|
||||
<i class="fas text-danger fa-trash-alt fa-stack-1x"></i>
|
||||
|
@ -58,12 +71,10 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer d-none d-md-flex">
|
||||
<button type="button" class="btn btn-link text-muted" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="button" id="deletePostButton" class="btn btn-danger">Delete post</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title></title>
|
||||
<style type="text/css" rel="stylesheet" media="all">
|
||||
/* Base ------------------------------ */
|
||||
|
||||
@import url('https://fonts.googleapis.com/css?family=Roboto:400,500&display=swap');
|
||||
|
||||
|
@ -21,19 +20,15 @@
|
|||
margin: 0;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #FF66AC!important;
|
||||
}
|
||||
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
td {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.preheader {
|
||||
display: none !important;
|
||||
visibility: hidden;
|
||||
|
@ -45,14 +40,12 @@
|
|||
opacity: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
/* Type ------------------------------ */
|
||||
|
||||
body,
|
||||
td,
|
||||
th {
|
||||
font-family: "Roboto", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-top: 0;
|
||||
color: #121213;
|
||||
|
@ -60,7 +53,6 @@
|
|||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-top: 0;
|
||||
color: #121213;
|
||||
|
@ -68,7 +60,6 @@
|
|||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-top: 0;
|
||||
color: #121213;
|
||||
|
@ -76,12 +67,10 @@
|
|||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
p,
|
||||
ul,
|
||||
ol,
|
||||
|
@ -90,24 +79,19 @@
|
|||
font-size: 1rem;
|
||||
line-height: 1.625;
|
||||
}
|
||||
|
||||
p.sub {
|
||||
font-size: 13px;
|
||||
}
|
||||
/* Utilities ------------------------------ */
|
||||
|
||||
.align-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
/* Buttons ------------------------------ */
|
||||
|
||||
.button {
|
||||
background-color: #FF66AC;
|
||||
|
@ -122,7 +106,6 @@
|
|||
-webkit-text-size-adjust: none;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.button--green {
|
||||
background-color: #23CE6B;
|
||||
border-top: 10px solid #23CE6B;
|
||||
|
@ -130,7 +113,6 @@
|
|||
border-bottom: 10px solid #23CE6B;
|
||||
border-left: 18px solid #23CE6B;
|
||||
}
|
||||
|
||||
.button--red {
|
||||
background-color: #F05D5E;
|
||||
border-top: 10px solid #F05D5E;
|
||||
|
@ -138,29 +120,24 @@
|
|||
border-bottom: 10px solid #F05D5E;
|
||||
border-left: 18px solid #F05D5E;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 500px) {
|
||||
.button {
|
||||
width: 100% !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
}
|
||||
/* Attribute list ------------------------------ */
|
||||
|
||||
.attributes {
|
||||
margin: 0 0 21px;
|
||||
}
|
||||
|
||||
.attributes_content {
|
||||
background-color: #EDF2F7;
|
||||
padding: 1rem;
|
||||
border-radius: 0.35rem;
|
||||
}
|
||||
|
||||
.attributes_item {
|
||||
padding: 0;
|
||||
}
|
||||
/* Related Items ------------------------------ */
|
||||
|
||||
.related {
|
||||
width: 100%;
|
||||
|
@ -170,30 +147,25 @@
|
|||
-premailer-cellpadding: 0;
|
||||
-premailer-cellspacing: 0;
|
||||
}
|
||||
|
||||
.related_item {
|
||||
padding: 10px 0;
|
||||
color: #CBCCCF;
|
||||
font-size: 15px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.related_item-title {
|
||||
display: block;
|
||||
margin: .5em 0 0;
|
||||
}
|
||||
|
||||
.related_item-thumb {
|
||||
display: block;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.related_heading {
|
||||
border-top: 1px solid #CBCCCF;
|
||||
text-align: center;
|
||||
padding: 25px 0 10px;
|
||||
}
|
||||
/* Discount Code ------------------------------ */
|
||||
|
||||
.discount {
|
||||
width: 100%;
|
||||
|
@ -205,32 +177,26 @@
|
|||
background-color: #EDF2F7;
|
||||
border: 2px dashed #CBCCCF;
|
||||
}
|
||||
|
||||
.discount_heading {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.discount_body {
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
}
|
||||
/* Social Icons ------------------------------ */
|
||||
|
||||
.social {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.social td {
|
||||
padding: 0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.social_icon {
|
||||
height: 20px;
|
||||
margin: 0 8px 10px 8px;
|
||||
padding: 0;
|
||||
}
|
||||
/* Data table ------------------------------ */
|
||||
|
||||
.purchase {
|
||||
width: 100%;
|
||||
|
@ -240,7 +206,6 @@
|
|||
-premailer-cellpadding: 0;
|
||||
-premailer-cellspacing: 0;
|
||||
}
|
||||
|
||||
.purchase_content {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
|
@ -249,54 +214,44 @@
|
|||
-premailer-cellpadding: 0;
|
||||
-premailer-cellspacing: 0;
|
||||
}
|
||||
|
||||
.purchase_item {
|
||||
padding: 10px 0;
|
||||
color: #121213;
|
||||
font-size: 15px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.purchase_heading {
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid #E6E6E6;
|
||||
}
|
||||
|
||||
.purchase_heading p {
|
||||
margin: 0;
|
||||
color: #85878E;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.purchase_footer {
|
||||
padding-top: 15px;
|
||||
border-top: 1px solid #E6E6E6;
|
||||
}
|
||||
|
||||
.purchase_total {
|
||||
margin: 0;
|
||||
text-align: right;
|
||||
font-weight: bold;
|
||||
color: #121213;
|
||||
}
|
||||
|
||||
.purchase_total--label {
|
||||
padding: 0 15px 0 0;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #EDF2F7;
|
||||
color: #121213;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #121213;
|
||||
}
|
||||
|
||||
p.sub {
|
||||
color: #6B6E76;
|
||||
}
|
||||
|
||||
.email-wrapper {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
|
@ -306,7 +261,6 @@
|
|||
-premailer-cellspacing: 0;
|
||||
background-color: #EDF2F7;
|
||||
}
|
||||
|
||||
.email-content {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
|
@ -315,23 +269,19 @@
|
|||
-premailer-cellpadding: 0;
|
||||
-premailer-cellspacing: 0;
|
||||
}
|
||||
/* Masthead ----------------------- */
|
||||
|
||||
.email-masthead {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.email-masthead_logo {
|
||||
width: 94px;
|
||||
}
|
||||
|
||||
.email-masthead_name {
|
||||
font-size: 1.25rem;
|
||||
font-weight: bold;
|
||||
color: #121213;
|
||||
text-decoration: none;
|
||||
}
|
||||
/* Body ------------------------------ */
|
||||
|
||||
.email-body {
|
||||
width: 100%;
|
||||
|
@ -342,7 +292,6 @@
|
|||
-premailer-cellspacing: 0;
|
||||
background-color: #cfcfcf;
|
||||
}
|
||||
|
||||
.email-body_inner {
|
||||
width: 570px;
|
||||
margin: 0 auto;
|
||||
|
@ -352,7 +301,6 @@
|
|||
-premailer-cellspacing: 0;
|
||||
background-color: #cfcfcf;
|
||||
}
|
||||
|
||||
.email-footer {
|
||||
width: 570px;
|
||||
margin: 0 auto;
|
||||
|
@ -362,11 +310,9 @@
|
|||
-premailer-cellspacing: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.email-footer p {
|
||||
color: #6B6E76;
|
||||
}
|
||||
|
||||
.body-action {
|
||||
width: 100%;
|
||||
margin: 30px auto;
|
||||
|
@ -376,17 +322,14 @@
|
|||
-premailer-cellspacing: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.body-sub {
|
||||
margin-top: 25px;
|
||||
padding-top: 25px;
|
||||
border-top: 1px solid #E6E6E6;
|
||||
}
|
||||
|
||||
.content-cell {
|
||||
padding: 35px;
|
||||
}
|
||||
/*Media Queries ------------------------------ */
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
.email-body_inner,
|
||||
|
@ -394,7 +337,6 @@
|
|||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body,
|
||||
.email-body,
|
||||
|
|
|
@ -11,121 +11,13 @@
|
|||
margin: 1.75rem auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
.emoji:focus {
|
||||
border: 1px solid var(--primary) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
var commentFormID;
|
||||
function commentForm(form) {
|
||||
commentFormID = form;
|
||||
};
|
||||
<script src="/assets/js/emoji_modal.js"></script>
|
||||
|
||||
const TEXTAREA_POS_ATTR = 'data-curr-pos'
|
||||
|
||||
// Insert EMOJI markdown into comment box function
|
||||
|
||||
function getEmoji(searchTerm, form) {
|
||||
const commentBox = document.getElementById(form);
|
||||
const old = commentBox.value;
|
||||
const curPos = parseInt(commentBox.getAttribute(TEXTAREA_POS_ATTR));
|
||||
|
||||
const firstHalf = old.slice(0, curPos)
|
||||
const lastHalf = old.slice(curPos)
|
||||
|
||||
let emoji = ':' + searchTerm + ':'
|
||||
const previousChar = firstHalf.slice(-1)
|
||||
if (firstHalf.length > 0 && previousChar !== " " && previousChar !== "\n") {
|
||||
emoji = " " + emoji
|
||||
}
|
||||
if (lastHalf.length > 0 && lastHalf[0] !== " ") {
|
||||
emoji = emoji + " "
|
||||
}
|
||||
|
||||
commentBox.value = firstHalf + emoji + lastHalf;
|
||||
|
||||
const newPos = curPos + emoji.length
|
||||
|
||||
commentBox.setAttribute(TEXTAREA_POS_ATTR, newPos);
|
||||
}
|
||||
|
||||
function loadEmojis(form) {
|
||||
|
||||
const emojis = [
|
||||
{
|
||||
type:'marsey',
|
||||
emojis: ['marseywhirlyhat','marsey173','marseycthulhu','marseycuck','marseyemperor','marseyface','marseyjohnson','marseykneel','marseymummy','marseymummy2','marseypanda','marseypumpkin','marseyskeletor','marseystein','marseyvampire','marseyvengeance','marseywitch3','marseylong1','marseylong2','marseylong3','marseypop','marseyqueenlizard','marseyagree','marseybane','marseybog','marseybux','marseycommitted','marseydisagree','marseydizzy','marseyfunko','marseyhealthy','marseykaiser','marseykyle','marseymask','marseymeds','marseykvlt','marseyn8','marseynietzsche','marseyobey','marseypatriot','marseypedo','marseypony','marseypuke','marseyqueen','marseyrage','marseysnek','marseytinfoil','marseywitch2','marseycenter','marseyauthleft','marseyauthright','marseylibleft','marseylibright','marseybinladen','marseycool','marseyjanny2','marseyjones','marseynapoleon','marseysanders','marseyshrug','marseysnoo','marseysoypoint','marseybiting','marseyblush','marseybountyhunter','marseycoonass','marseyfinger','marseyglancing','marseyhappy','marseyhearts','marseyluther','marseypizzashill','marseypokerface','marseypopcorn','marseyrasta','marseysad2','marseysmirk','marseysurprised','marseythomas','marseywitch','marseyyawn','marcusfootball','marje','marmsey','marsey1984','marsey420','marsey4chan','marsey69','marseyakshually','marseyandmarcus','marseyangel','marseyasian','marseybattered','marseybiden','marseybingus','marseyblm','marseyblowkiss','marseybluecheck','marseybong','marseybooba','marseyboomer','marseybrainlet','marseybride','marseyburger','marseybush','marseycamus','marseycanned','marseycarp','marseycatgirl','marseychef','marseychonker','marseychu','marseyclown','marseycomrade','marseyconfused','marseycoomer','marseycop','marseycope','marseycorn','marseycowboy','marseycry','marseycumjar1','marseycumjar2','marseycumjar3','marseycwc','marseydead','marseydepressed','marseydespair','marseydeux','marseydildo','marseydoomer','marseydrunk','marseydynamite','marseyexcited','marseyeyeroll','marseyfacepalm','marseyfamily','marseyfbi','marseyfeet','marseyfeminist','marseyflamethrower','marseyflamewar','marseyfloyd','marseyfug','marseygasp','marseyghost','marseygift','marseygigaretard','marseygigavaxxer','marseyglam','marseyglow','marseygodfather','marseygoodnight','marseygrass','marseygrilling','marseyhacker','marseyhmm','marseyhmmm','marseyilluminati','marseyinabox','marseyira','marseyisis','marseyjam','marseyjamming','marseyjanny','marseyjunkie','marseyking','marseykkk','marseylaugh','marseylawlz','marseylifting','marseylizard','marseylolcow','marseylove','marseymad','marseymanlet','marseymaoist','marseymcarthur','marseymerchant','marseymermaid','marseymommy','marseymouse','marseymyeisha','marseyneckbeard','marseyniqab','marseynpc','marseynun','marseynut','marseyorthodox','marseyowow','marseypainter','marseypanties','marseyparty','marseypat','marseypeacekeeper','marseypharaoh','marseypickle','marseypinochet','marseypipe','marseypirate','marseypoggers','marseypope','marseyproctologist','marseypsycho','marseyqoomer','marseyradioactive','marseyrain','marseyrat','marseyreading','marseyready','marseyrealwork','marseyreich','marseyrentfree','marseyretard','marseyrick','marseyrope','marseyrowling','marseysad','marseysadcat','marseyscarf','marseyschizo','marseyseethe','marseyshisha','marseyshook','marseysick','marseysleep','marseysmug','marseysneed','marseysociety','marseyspider','marseysrdine','marseystroke','marseysus','marseytaliban','marseytank','marseytankushanka','marseytea','marseythonk','marseythumbsup','marseytrain','marseysipping','marseytrans','marseytrans2','marseytroll','marseytrump','marseytwerking','marseyunabomber','marseyuwuw','marseyvan','marseyvaxmaxx','marseywave','marseyworried','marseyxd','marseyyeezus','marseyzoomer','marseyzwei','marsoy','marsoyhype']
|
||||
},
|
||||
{
|
||||
type:'platy',
|
||||
emojis: ['platyabused','platyblizzard','platyboxer','platydevil','platyfear','platygirlmagic','platygolong','platyhaes','platyking','platylove','platyneet','platyold','platypatience','platypopcorn','platyrich','platysarcasm','platysilly','platysleeping','platythink','platytired','platytuxedomask','platyblush','platybruh','platycaveman','platycheer','platydown','platyeyes','platyheart','platylol','platymicdrop','platynooo','platysalute','platyseethe','platythumbsup','platywave']
|
||||
},
|
||||
{
|
||||
type:'tay',
|
||||
emojis: ['tayaaa','tayadmire','taycat','taycelebrate','taychefkiss','taychristmas','tayclap','taycold','taycrown','tayflex','tayflirt','taygrimacing','tayhappy','tayheart','tayhmm','tayhuh','tayhyperdab','tayjammin','taylaugh','taymindblown','tayno','taynod','taypeace','taypray','tayrun','tayscrunch','tayshake','tayshrug','taysilly','tayslide','taysmart','taystop','taytantrum','taytea','taythink','tayvibin','taywhat','taywine','taywine2','taywink','tayyes']
|
||||
},
|
||||
{
|
||||
type:'classic',
|
||||
emojis: ['2thumbsup','aliendj','ambulance','angry','angrywhip','argue','aroused','ashamed','badass','banana','band','banghead','batman','bigeyes','bite','blind','blowkiss','blush','bong','bounce','bow','breakheart','bs','cartwheel','cat','celebrate','chainsaw','cheers','clap','cold','confused','crazyeyes','cry','cthulhu','cute','D','daydream','ddr','deadpool','devilsmile','diddle','die','distress','disturbing','dizzy','domo','doughboy','drink','drool','dudeweedlmao','edward','electro','elephant','embarrassed','emo','emo2','evil','evilclown','evilgrin','facepalm','fap','flamethrower','flipbird','flirt','frown','gasp','glomp','go','gooby','grr','gtfo','guitar','haha','handshake','happydance','headbang','heart','heartbeat','hearts','highfive','hmm','hmph','holdhands','horny','hug','hugging','hugs','hump','humpbed','hysterical','ily','inlove','jason','jawdrop','jedi','jester','kaboom','kick','kiss','kitty','laughchair','lick','link','lol','lolbeat','loving','makeout','medal','megaman','megamanguitar','meow','metime','mooning','mummy','na','nauseous','nervous','ninja','nod','nono','omg','onfire','ooo','orly','p','paddle','panda','pandabutt','paranoid','party','pat','peek','pikachu','pimp','plzdie','poke','popcorn','pout','probe','puke','punch','quote','raccoon','roar','rofl','roflmao','rolleyes','sad','sadeyes','sadhug','samurai','sarcasm','scoot','scream','shmoopy','shrug','skull','slap','slapfight','sleepy','smackfish','smackhead','smh','smile','smoke','sonic','spank','sparta','sperm','spiderman','stab','star','stare','stfu','suicide','surprisehug','suspicious','sweat','swordfight','taco','talk2hand','tantrum','teehee','thinking','threesome','throw','throwaway','tickle','typing','uhuh','vampbat','viking','violin','vulgar','wah','wat','whip','whipping','wink','witch','wizard','woah','worm','woo','work','worship','wow','XD','yay','zzz']
|
||||
},
|
||||
{
|
||||
type:'rage',
|
||||
emojis: ['troll','bitchplease','spit','challengeaccepted','contentiouscereal','cryingatcuteness','derp','derpcornsyrup','derpcrying','derpcute','derpdumb','derpeuphoria','derpinahd','derpinapokerface','derpinasnickering','derpprocessing','derprealization','derpsnickering','derptalking','derpthinking','derpthumbsup','derpunimpressed','derpwhy','donotwant','epicfacefeatures','fancywithwine','fffffffuuuuuuuuuuuu','flipthetable','foreveralone','foreveralonehappy','hewillnever','idontknow','interuptedreading','iseewhatyoudidthere','killherkillher','ledesire','leexcited','legenius','lelolidk','lemiddlefinger','lemindblown','leokay','lepanicrunning','lepokerface','lepokerface2','lerageface','leseriousface','likeaboss','lolface','longwhiskers','manymiddlefingers','megusta','motherfucker','motherofgod','mysides','ohgodwhy','pervertedspiderman','picard','ragestrangle','rukiddingme','tfwyougettrolled','trollolol','truestorybro','xallthey','yuno']
|
||||
},
|
||||
{
|
||||
type:'wojak',
|
||||
emojis: ['gigachad','gigachad2','chadyes','chadno','abusivewife','ancap','bardfinn','bloomer','boomer','boomermonster','brainletbush','brainletcaved','brainletchair','brainletchest','brainletmaga','brainletpit','chad','chadarab','chadasian','chadblack','chadjesus','chadjew','chadjihadi','chadlatino','chadlibleft','chadnordic','chadsikh','chadusa','coomer','doomer','doomerfront','doomergirl','ethot','fatbrain','fatpriest','femboy','gogetter','grug','monke','nazijak','npc','npcfront','npcmaga','psychojak','ragejak','ragemask','ramonajak','soyjackwow','soyjak','soyjakfront','soyjakhipster','soyjakmaga','soyjakyell','tomboy','zoomer','zoomersoy']
|
||||
},
|
||||
{
|
||||
type:'flags',
|
||||
emojis: ['niger', 'lgbt', 'saudi', 'animesexual','blacknation','blm','blueline','dreamgender','fatpride','incelpride','israel','kazakhstan','landlordlove','scalperpride','superstraight','trans','translord','transracial','usa']
|
||||
}
|
||||
]
|
||||
|
||||
let search_bar = document.getElementById("emoji_search");
|
||||
let search_container = document.getElementById('emoji-tab-search')
|
||||
|
||||
if(search_bar.value == ""){
|
||||
let container = document.getElementById(`EMOJIS_favorite`)
|
||||
container.innerHTML = container.innerHTML.replace(/@form@/g, form)
|
||||
|
||||
const commentBox = document.getElementById(form);
|
||||
commentBox.setAttribute(TEXTAREA_POS_ATTR, commentBox.selectionStart);
|
||||
|
||||
for (i=0; i < emojis.length; i++) {
|
||||
|
||||
let container = document.getElementById(`EMOJIS_${emojis[i].type}`)
|
||||
let str = ''
|
||||
let arr = emojis[i].emojis
|
||||
|
||||
for (j=0; j < arr.length; j++) {
|
||||
if(arr[j].match(search_bar.value)){
|
||||
str += `<button class="btn m-1 px-0 emoji" onclick="getEmoji(\'${arr[j]}\', \'${form}\')" style="background: None!important; width:60px; overflow: hidden; border: none;" data-bs-toggle="tooltip" title=":${arr[j]}:" delay:="0"><img loading="lazy" width=50 src="/assets/images/emojis/${arr[j]}.webp" alt="${arr[j]}-emoji"/></button>`;
|
||||
}
|
||||
}
|
||||
|
||||
container.innerHTML = str
|
||||
search_container.innerHTML = ""
|
||||
}
|
||||
}else{
|
||||
let str = ''
|
||||
for (i=0; i < emojis.length; i++) {
|
||||
let arr = emojis[i].emojis
|
||||
let container = document.getElementById(`EMOJIS_${emojis[i].type}`)
|
||||
for (j=0; j < arr.length; j++) {
|
||||
if(arr[j].match(search_bar.value.toLowerCase())){
|
||||
str += `<button class="btn m-1 px-0 emoji" onclick="getEmoji(\'${arr[j]}\', \'${form}\')" style="background: None!important; width:60px; overflow: hidden; border: none;" data-bs-toggle="tooltip" title=":${arr[j]}:" delay:="0"><img loading="lazy" width=50 src="/assets/images/emojis/${arr[j]}.webp" alt="${arr[j]}-emoji"/></button>`;
|
||||
}
|
||||
}
|
||||
container.innerHTML = ""
|
||||
}
|
||||
search_container.innerHTML = str
|
||||
}
|
||||
search_bar.oninput = function(){loadEmojis(form);};
|
||||
}
|
||||
</script>
|
||||
<!-- Emoji Selection Modal -->
|
||||
<div id="form" class="d-none"></div>
|
||||
<div class="modal fade" id="emojiModal" tabindex="-1" role="dialog" aria-labelledby="emojiModalTitle" aria-hidden="true">
|
||||
|
|
|
@ -14,12 +14,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Expand Images on Desktop
|
||||
|
||||
function expandDesktopImage(image) {
|
||||
|
||||
// Link text
|
||||
|
||||
var linkText = document.getElementById("desktop-expanded-image-link");
|
||||
var imgLink = document.getElementById("desktop-expanded-image-wrap-link");
|
||||
|
||||
|
@ -50,7 +46,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -192,6 +192,4 @@ Allowed styles:
|
|||
|
||||
{% include "expanded_image_modal.html" %}
|
||||
|
||||
<script src="/assets/js/general41.js"></script>
|
||||
|
||||
{% endblock %}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,7 @@
|
|||
<!-- Navigation -->
|
||||
|
||||
<script src="/assets/js/header.js"></script>
|
||||
|
||||
<nav class="shadow shadow-md fixed-top">
|
||||
{% if "rdrama" in request.host %}
|
||||
<div id="srd" style="width: 100%; background-color: var(--primary); padding: 2px; text-align: center; font-weight: bold;">
|
||||
|
|
|
@ -132,4 +132,16 @@
|
|||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
{% if v %}
|
||||
<script>
|
||||
const beamsClient = new PusherPushNotifications.Client({
|
||||
instanceId: '02ddcc80-b8db-42be-9022-44c546b4dce6',
|
||||
});
|
||||
beamsClient.start()
|
||||
.then((beamsClient) => beamsClient.getDeviceId())
|
||||
.then(() => beamsClient.addDeviceInterest('{{v.strid}}'))
|
||||
.then(() => beamsClient.getDeviceInterests())
|
||||
.catch(console.error);
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -67,7 +67,6 @@
|
|||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block pagenav %}
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination pagination-sm mb-0">
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
{% block title %}
|
||||
<title>Login - {{'SITE_NAME' | app_config}}</title>
|
||||
{% endblock %}
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
|
||||
|
||||
<!-- Font Awesome -->
|
||||
|
@ -122,7 +121,6 @@
|
|||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="/assets/js/general41.js"></script>
|
||||
|
||||
|
||||
<pre>
|
||||
|
|
|
@ -75,7 +75,6 @@
|
|||
<label for="2fa_token" class="mt-3">Your verification code</label>
|
||||
|
||||
<input class="form-control" id="2fa_token" name="2fa_token" type="text" placeholder="6-digit code">
|
||||
|
||||
<small><a href="/lost_2fa">Lost your 2FA device?</a></small>
|
||||
|
||||
<button class="btn btn-primary login w-100 mt-3" id="login_button">Sign in</button>
|
||||
|
|
|
@ -4,58 +4,7 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
// Mobile bottom navigation bar
|
||||
|
||||
window.onload = function () {
|
||||
var prevScrollpos = window.pageYOffset;
|
||||
window.onscroll = function () {
|
||||
var currentScrollPos = window.pageYOffset;
|
||||
|
||||
var topBar = document.getElementById("fixed-bar-mobile");
|
||||
|
||||
var bottomBar = document.getElementById("mobile-bottom-navigation-bar");
|
||||
|
||||
var dropdown = document.getElementById("mobileSortDropdown");
|
||||
|
||||
var navbar = document.getElementById("navbar");
|
||||
|
||||
if (bottomBar != null) {
|
||||
if (prevScrollpos > currentScrollPos && (window.innerHeight + currentScrollPos) < (document.body.offsetHeight - 65)) {
|
||||
bottomBar.style.bottom = "0px";
|
||||
}
|
||||
else if (currentScrollPos <= 125 && (window.innerHeight + currentScrollPos) < (document.body.offsetHeight - 65)) {
|
||||
bottomBar.style.bottom = "0px";
|
||||
}
|
||||
else if (prevScrollpos > currentScrollPos && (window.innerHeight + currentScrollPos) >= (document.body.offsetHeight - 65)) {
|
||||
bottomBar.style.bottom = "-50px";
|
||||
}
|
||||
else {
|
||||
bottomBar.style.bottom = "-50px";
|
||||
}
|
||||
}
|
||||
|
||||
// Execute if bottomBar exists
|
||||
|
||||
if (topBar != null && dropdown != null) {
|
||||
if (prevScrollpos > currentScrollPos) {
|
||||
topBar.style.top = "48px";
|
||||
navbar.classList.remove("shadow");
|
||||
}
|
||||
else if (currentScrollPos <= 125) {
|
||||
topBar.style.top = "48px";
|
||||
navbar.classList.remove("shadow");
|
||||
}
|
||||
else {
|
||||
topBar.style.top = "-48px";
|
||||
dropdown.classList.remove('show');
|
||||
navbar.classList.add("shadow");
|
||||
}
|
||||
}
|
||||
prevScrollpos = currentScrollPos;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script src="/assets/js/mobile_navigation_bar.js"></script>
|
||||
|
||||
<div class="container d-inline-flex d-lg-none">
|
||||
|
||||
|
|
|
@ -1,56 +1,4 @@
|
|||
<script>
|
||||
// Report Submission
|
||||
|
||||
report_postModal = function(id, author) {
|
||||
|
||||
document.getElementById("post-author").textContent = author;
|
||||
|
||||
submitbutton=document.getElementById("reportPostButton");
|
||||
|
||||
submitbutton.onclick = function() {
|
||||
|
||||
this.innerHTML='<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>Reporting post';
|
||||
this.disabled = true;
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", '/flag/post/'+id, true);
|
||||
var form = new FormData()
|
||||
form.append("formkey", formkey());
|
||||
form.append("reason", document.getElementById("reason").value);
|
||||
|
||||
xhr.withCredentials=true;
|
||||
|
||||
xhr.onload=function() {
|
||||
document.getElementById("reportPostFormBefore").classList.add('d-none');
|
||||
document.getElementById("reportPostFormAfter").classList.remove('d-none');
|
||||
};
|
||||
|
||||
xhr.onerror=function(){alert(errortext)};
|
||||
xhr.send(form);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
document.getElementById('reportPostModal').addEventListener('hidden.bs.modal', function () {
|
||||
|
||||
const button = document.getElementById("reportPostButton");
|
||||
|
||||
const beforeModal = document.getElementById("reportPostFormBefore");
|
||||
const afterModal = document.getElementById("reportPostFormAfter");
|
||||
|
||||
button.innerHTML = 'Report post';
|
||||
button.disabled = false;
|
||||
|
||||
afterModal.classList.add('d-none');
|
||||
|
||||
if (beforeModal.classList.contains('d-none')) {
|
||||
beforeModal.classList.remove('d-none');
|
||||
}
|
||||
|
||||
});
|
||||
})
|
||||
</script>
|
||||
<script src="/assets/js/report_post_modal.js"></script>
|
||||
|
||||
<!-- Report Post Modal -->
|
||||
<div class="modal fade" id="reportPostModal" tabindex="-1" role="dialog" aria-labelledby="reportPostModalTitle" aria-hidden="true">
|
||||
|
|
|
@ -9,14 +9,10 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
|
||||
<script src="/assets/js/general41.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
var clipboard = new ClipboardJS('.copy-link');
|
||||
clipboard.on('success', function(e) {
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-success'));
|
||||
|
@ -30,12 +26,7 @@
|
|||
});
|
||||
|
||||
|
||||
//email change
|
||||
|
||||
// Show confirm password field when user clicks email box
|
||||
|
||||
document.getElementById('new_email').addEventListener('input', function () {
|
||||
|
||||
var id = document.getElementById("email-password");
|
||||
var id2 = document.getElementById("email-password-label");
|
||||
var id3 = document.getElementById("emailpasswordRequired");
|
||||
|
@ -43,27 +34,18 @@
|
|||
id.classList.remove("d-none");
|
||||
id2.classList.remove("d-none");
|
||||
id3.classList.remove("d-none");
|
||||
|
||||
});
|
||||
|
||||
// 2FA toggle modal
|
||||
|
||||
document.getElementById('2faModal').addEventListener('hidden.bs.modal', function () {
|
||||
|
||||
var box = document.getElementById("2faToggle");
|
||||
|
||||
box.checked = !box.checked;
|
||||
|
||||
});
|
||||
|
||||
|
||||
//Email verification text
|
||||
|
||||
function emailVerifyText() {
|
||||
|
||||
document.getElementById("email-verify-text").innerHTML = "Verification email sent! Please check your inbox.";
|
||||
|
||||
}
|
||||
|
||||
function formkey() {return '{{v.formkey}}';}
|
||||
</script>
|
||||
|
||||
<meta charset="utf-8">
|
||||
|
@ -101,11 +83,6 @@
|
|||
<!-- Font Awesome -->
|
||||
<link href="/assets/css/fa.css" rel="stylesheet"> <!--load all styles -->
|
||||
|
||||
<script>
|
||||
function formkey() {
|
||||
return '{{v.formkey}}';
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body id="settings" style="overflow-x: hidden; {% if v and v.background %} background:url(/assets/images/backgrounds/{{v.background}}) no-repeat center center fixed !important; background-size: cover!important; background-color: #000!important;{% endif %}">
|
||||
|
@ -219,7 +196,6 @@
|
|||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<script>
|
||||
function formkey() {return '{{v.formkey}}';}
|
||||
</script>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
@ -45,12 +48,6 @@
|
|||
<!-- Font Awesome -->
|
||||
<link href="/assets/css/fa.css" rel="stylesheet"> <!--load all styles -->
|
||||
|
||||
<script>
|
||||
function formkey() {
|
||||
return '{{v.formkey}}';
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body id="settings2" style="overflow-x: hidden; {% if v and v.background %} background:url(/assets/images/backgrounds/{{v.background}}) no-repeat center center fixed !important; background-size: cover!important; background-color: #000!important;{% endif %}">
|
||||
|
@ -200,7 +197,6 @@
|
|||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="/assets/js/general41.js"></script>
|
||||
|
||||
{% block scripts %}
|
||||
{% endblock %}
|
||||
|
@ -210,7 +206,6 @@
|
|||
|
||||
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -30,13 +30,11 @@
|
|||
<label for="edit-{{app.id}}-name" class="mb-0 w-lg-25">App Name</label>
|
||||
<input id="edit-{{app.id}}-name" class="form-control" type="text" name="name" value="{{app.app_name}}">
|
||||
|
||||
|
||||
{% if app.client_id %}
|
||||
<label for="edit-{{app.id}}-client-id" class="mb-0 w-lg-25">Client ID</label>
|
||||
<input id="edit-{{app.id}}-client-id" class="form-control copy-link" type="text" name="name" value="{{app.client_id}}" data-clipboard-text="{{app.client_id}}" role="button" readonly="readonly">
|
||||
{% endif %}
|
||||
|
||||
|
||||
<label for="edit-{{app.id}}-redirect" class="mb-0 w-lg-25">Redirect URI</label>
|
||||
<input id="edit-{{app.id}}-redirect" class="form-control" type="text" name="redirect_uri" value="{{app.redirect_uri}}">
|
||||
<label for="edit-{{app.id}}-desc" class="mb-0 w-lg-25">Description</label>
|
||||
|
|
|
@ -152,7 +152,6 @@
|
|||
myToast.hide();
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||
myToast.show();
|
||||
|
||||
exileError.textContent = JSON.parse(xhr.response)["error"];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -189,7 +189,6 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<h2 class="h5">Content Filters</h2>
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
{% include "emoji_modal.html" %}
|
||||
{% include "gif_modal.html" %}
|
||||
|
||||
<script src="/assets/js/setting_profile.js"></script>
|
||||
|
||||
<div id="posts" class="row">
|
||||
|
||||
<div class="col col-lg-10">
|
||||
|
@ -110,7 +112,6 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="body d-lg-flex border-bottom">
|
||||
|
||||
<label class="text-black w-lg-25">Theme Color</label>
|
||||
|
@ -138,16 +139,13 @@
|
|||
</div>
|
||||
|
||||
<!-- <p class="text-small mb-2">Or type a color code:</p>
|
||||
|
||||
<div class="d-flex">
|
||||
|
||||
<form action="/settings/themecolor" id="color-code-form" method="post">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
|
||||
<input class="form-control" type="text" name="themecolor" id="color-code" value="{% if v.themecolor %}{{v.themecolor}}{% endif %}">
|
||||
<label class="btn btn-secondary text-capitalize mr-2 mt-2 mb-0">Update<input type="text" for="color-code" onclick="form.submit()" hidden=""></label>
|
||||
</form>
|
||||
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
|
@ -156,76 +154,6 @@
|
|||
<label for="theme">Website Backgrounds</label>
|
||||
</div>
|
||||
<div class="body w-lg-100">
|
||||
<script>
|
||||
function updatebgselection(){
|
||||
var bgselector = document.getElementById("backgroundSelector");
|
||||
var selection = bgselector.options[bgselector.selectedIndex].text;
|
||||
|
||||
//var paragraph = document.getElementById("testp");
|
||||
//paragraph.innerHTML = selection;
|
||||
|
||||
const backgrounds = [
|
||||
{
|
||||
folder: "fantasy",
|
||||
backgrounds:
|
||||
[
|
||||
"1.webp",
|
||||
"2.webp",
|
||||
"3.webp",
|
||||
"4.webp",
|
||||
"5.webp",
|
||||
"6.webp",
|
||||
]
|
||||
},
|
||||
{
|
||||
folder: "solarpunk",
|
||||
backgrounds:
|
||||
[
|
||||
"1.webp",
|
||||
"2.webp",
|
||||
"3.webp",
|
||||
"4.webp",
|
||||
"5.webp",
|
||||
"6.webp",
|
||||
"7.webp",
|
||||
"8.webp",
|
||||
"9.webp",
|
||||
"10.webp",
|
||||
"11.webp",
|
||||
"12.webp",
|
||||
"13.webp",
|
||||
"14.webp",
|
||||
"15.webp",
|
||||
"16.webp",
|
||||
"17.webp",
|
||||
"18.webp",
|
||||
"19.webp",
|
||||
]
|
||||
},
|
||||
{
|
||||
folder: "pixelart",
|
||||
backgrounds:
|
||||
[
|
||||
"1.webp",
|
||||
"2.webp",
|
||||
"3.webp",
|
||||
"4.webp",
|
||||
"5.webp",
|
||||
]
|
||||
}
|
||||
]
|
||||
let bgContainer = document.getElementById(`bgcontainer`);
|
||||
let str = '';
|
||||
let bgsToDisplay = backgrounds[bgselector.selectedIndex].backgrounds;
|
||||
let bgsDir = backgrounds[bgselector.selectedIndex].folder;
|
||||
for (i=0; i < bgsToDisplay.length; i++) {
|
||||
let onclickPost = bgsDir + "/" + bgsToDisplay[i];
|
||||
str += `<button class="btn btn-secondary m-1 p-0" style="width:15rem; overflow: hidden;"><img loading="lazy" style="padding:0.25rem; width: 15rem" src="/assets/images/backgrounds/${bgsDir}/${bgsToDisplay[i]}" alt="${bgsToDisplay[i]}-background" onclick="post('/settings/profile?background=${onclickPost}', function(){window.location.reload(true);})"/></button>`;
|
||||
}
|
||||
bgContainer.innerHTML = str;
|
||||
}
|
||||
updatebgselection();
|
||||
</script>
|
||||
<p>Change the background for the website.</p>
|
||||
<div class="input-group mb2">
|
||||
<select id='backgroundSelector' class="form-control" form="profile-settings" name="background" onchange="updatebgselection();">
|
||||
|
@ -243,7 +171,6 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
<div id="bgcontainer"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -447,7 +374,6 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="body d-lg-flex border-bottom">
|
||||
|
||||
<label class="text-black w-lg-25">Profile Anthem</label>
|
||||
|
@ -466,7 +392,6 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="body d-lg-flex border-bottom">
|
||||
|
||||
<label class="text-black w-lg-25">Name Color</label>
|
||||
|
@ -494,18 +419,13 @@
|
|||
</div>
|
||||
|
||||
<p class="text-small mb-2">Or type a color code:</p>
|
||||
|
||||
<div class="d-flex">
|
||||
|
||||
<form action="/settings/namecolor" id="color-code-form" method="post">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
|
||||
<input class="form-control" type="text" name="color" id="color-code" value="{% if v.namecolor %}{{v.namecolor}}{% endif %}">
|
||||
<label class="btn btn-secondary text-capitalize mr-2 mt-2 mb-0">Update<input type="text" for="color-code" onclick="form.submit()" hidden=""></label>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% if not v.flairchanged %}
|
||||
|
@ -557,16 +477,12 @@
|
|||
</div>
|
||||
|
||||
<p class="text-small mb-2">Or type a color code:</p>
|
||||
|
||||
<div class="d-flex">
|
||||
|
||||
<form action="/settings/titlecolor" id="color-code-form" method="post">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
|
||||
<input class="form-control" type="text" name="titlecolor" id="color-code" value="{% if v.titlecolor %}{{v.titlecolor}}{% endif %}">
|
||||
<label class="btn btn-secondary text-capitalize mr-2 mt-2 mb-0">Update<input type="text" for="color-code" onclick="form.submit()" hidden=""></label>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -582,7 +498,6 @@
|
|||
<div class="input-group mb-2">
|
||||
<textarea class="form-control rounded" id="bio-text" aria-label="With textarea" placeholder="Tell the community a bit about yourself." rows="3" name="bio" form="profile-bio" maxlength="1500">{{v.bio}}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="d-flex">
|
||||
<pre style="padding-top:0.7rem" class="btn btn-secondary format d-inline-block m-0 fas fa-bold" aria-hidden="true" onclick="makeBold('bio-text')" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Bold"></pre>
|
||||
|
||||
|
@ -599,9 +514,7 @@
|
|||
<input id="file-upload" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-show').innerHTML='image';" hidden>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<pre></pre>
|
||||
|
||||
<div class="d-flex">
|
||||
<small>Limit of 1500 characters</small>
|
||||
<input class="btn btn-primary ml-auto" id="bioSave" type="submit" value="Save Changes">
|
||||
|
|
|
@ -17,20 +17,13 @@
|
|||
<h2 class="h5">Email</h2>
|
||||
|
||||
<p class="text-small text-muted">Change the email address used to sign in to your account.</p>
|
||||
|
||||
<div class="settings-section rounded">
|
||||
|
||||
<form action="/settings/security" method="post">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
|
||||
<div class="body">
|
||||
|
||||
<div class="d-lg-flex">
|
||||
|
||||
<label for="new-email" class="w-lg-25">Email</label>
|
||||
|
||||
<div class="w-lg-100">
|
||||
|
||||
<input class="form-control" id="new_email" {% if v.email %}placeholder="{{v.email}}"{% else %}placeholder="Your email"{% endif %}
|
||||
aria-describedby="new_email" type="email" name="new_email" required>
|
||||
{% if v.email and not v.is_activated %}
|
||||
|
@ -38,31 +31,18 @@
|
|||
{% elif not v.email %}
|
||||
<div class="text-danger text-small-extra mt-1" id="email-verify-text">Add an email to secure your account in case you forget your password.</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="d-lg-flex mt-3">
|
||||
|
||||
<label for="email-password" class="w-lg-25 d-none" id="email-password-label">Password</label>
|
||||
|
||||
<div class="w-lg-100">
|
||||
|
||||
<input autocomplete="new-password" type="password" class="form-control mb-2 d-none" id="email-password" name="password" autocomplete="off" required>
|
||||
|
||||
<small id="emailpasswordRequired" class="form-text font-weight-bold text-danger d-none mt-1">Password required to update your email.</small>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<small id="emailpasswordRequired" class="form-text font-weight-bold text-danger d-none mt-1">Password required to update your email.</small>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
|
||||
<div class="d-flex">
|
||||
<a class="btn btn-success" href="javascript:void(0)" onclick="post_toast('/settings/gumroad')">Claim paypig rewards</a>
|
||||
{% if v.email %}
|
||||
|
@ -72,19 +52,14 @@
|
|||
<input class="btn btn-primary ml-auto"
|
||||
type="submit" value="Add email">
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<span class="text-small-extra text-muted pl-1">Must be same email as gumroad</span>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 class="h5">Password</h2>
|
||||
|
||||
<p class="text-small text-muted">Change your account password.</p>
|
||||
|
|
|
@ -2,72 +2,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="/assets/js/general41.js"></script>
|
||||
|
||||
<script>
|
||||
<script src="/assets/js/signup.js"></script>
|
||||
|
||||
//Signup js
|
||||
// Display username and password requirements on input
|
||||
|
||||
document.getElementById('password-register').addEventListener('input', function () {
|
||||
|
||||
var charCount = document.getElementById("password-register").value;
|
||||
var id = document.getElementById("passwordHelpRegister");
|
||||
var successID = document.getElementById("passwordHelpSuccess");
|
||||
|
||||
if (charCount.length >= 8) {
|
||||
id.classList.add("d-none");
|
||||
successID.classList.remove("d-none");
|
||||
}
|
||||
else {
|
||||
id.classList.remove("d-none");
|
||||
successID.classList.add("d-none");
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
// Check username length, special chars
|
||||
|
||||
document.getElementById('username-register').addEventListener('input', function () {
|
||||
|
||||
var charCount = document.getElementById("username-register").value;
|
||||
var id = document.getElementById("usernameHelpRegister");
|
||||
var successID = document.getElementById("usernameHelpSuccess");
|
||||
|
||||
var API = '/is_available/' + charCount;
|
||||
|
||||
if (charCount.length >= 3) {
|
||||
|
||||
$.getJSON(API, function(result) {
|
||||
$.each(result, function(i, field) {
|
||||
if (field == false) {
|
||||
id.innerHTML = '<span class="form-text font-weight-bold text-danger mt-1">Username already taken :(';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if (!/[^a-zA-Z0-9_\-$]/.test(charCount)) {
|
||||
// Change alert text
|
||||
id.innerHTML = '<span class="form-text font-weight-bold text-success mt-1">Username is a-okay!';
|
||||
|
||||
if (charCount.length < 3) {
|
||||
id.innerHTML = '<span class="form-text font-weight-bold text-muted mt-1">Username must be at least 3 characters long.';
|
||||
}
|
||||
else if (charCount.length > 25) {
|
||||
id.innerHTML = '<span class="form-text font-weight-bold text-danger mt-1">Username must be 25 characters or less.';
|
||||
}
|
||||
}
|
||||
else {
|
||||
id.innerHTML = '<span class="form-text font-weight-bold text-danger mt-1">No special characters or spaces allowed.</span>';
|
||||
};
|
||||
|
||||
});
|
||||
</script>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="Sign up in under 27 seconds.">
|
||||
|
@ -174,7 +112,6 @@
|
|||
<input class="form-control" id="password_confirm"
|
||||
aria-describedby="passwordConfirmHelp" type="password" name="password_confirm"
|
||||
required="">
|
||||
|
||||
{% if "rdrama" in request.host %}
|
||||
<div class="custom-control custom-checkbox mt-4">
|
||||
<input type="checkbox" class="custom-control-input" id="termsCheck" required>
|
||||
|
|
|
@ -109,7 +109,6 @@
|
|||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="/assets/js/general41.js"></script>
|
||||
|
||||
|
||||
<!-- {{'SITE_NAME' | app_config}} JS -->
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
|
||||
|
||||
{% if v and v.id == p.author_id %}
|
||||
<script>
|
||||
// Post edit form
|
||||
|
||||
<script>
|
||||
togglePostEdit=function(id){
|
||||
|
||||
body=document.getElementById("post-body");
|
||||
|
@ -32,50 +30,47 @@
|
|||
form.classList.toggle("d-none");
|
||||
autoExpand(box);
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if v %}
|
||||
<script>
|
||||
post_comment=function(fullname, postId){
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
form.append('formkey', formkey());
|
||||
form.append('parent_fullname', fullname);
|
||||
form.append('submission', document.getElementById('reply-form-submission-'+fullname).value);
|
||||
form.append('body', document.getElementById('reply-form-body-'+fullname).value);
|
||||
form.append('file', document.getElementById('file-upload-reply-'+fullname).files[0]);
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("post", "/comment");
|
||||
xhr.withCredentials=true;
|
||||
xhr.onload=function(){
|
||||
if (xhr.status==200) {
|
||||
commentForm=document.getElementById('comment-form-space-'+fullname);
|
||||
commentForm.innerHTML=JSON.parse(xhr.response)["html"];
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||
myToast.hide();
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
||||
myToast.show();
|
||||
|
||||
incrementCommentCount(postId)
|
||||
}
|
||||
else {
|
||||
var commentError = document.getElementById("comment-error-text");
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
||||
myToast.hide();
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||
myToast.show();
|
||||
|
||||
commentError.textContent = JSON.parse(xhr.response)["error"];
|
||||
}
|
||||
}
|
||||
xhr.send(form)
|
||||
|
||||
document.getElementById('save-reply-to-'+fullname).classList.add('disabled');
|
||||
|
||||
}
|
||||
var date = new Date('{{p.created_datetime}}');
|
||||
document.getElementById('timestamp').title = date.toString();
|
||||
{% if p.edited_utc %}
|
||||
var date = new Date('{{p.edited_datetime}}');
|
||||
document.getElementById('edited_timestamp').title = date.toString();
|
||||
{% endif %}
|
||||
</script>
|
||||
|
||||
{% if p.award_count("shit") %}
|
||||
<script src="/assets/js/bug-min.js"></script>
|
||||
{% set minbugs = 10*p.award_count("shit") if p.award_count("shit") < 3 else 20 %}
|
||||
{% set maxbugs = 20*p.award_count("shit") if p.award_count("shit") < 3 else 40 %}
|
||||
<script>
|
||||
new BugController({
|
||||
imageSprite: "/assets/images/fly-sprite.webp",
|
||||
canDie: false,
|
||||
minBugs: {{minbugs}},
|
||||
maxBugs: {{maxbugs}},
|
||||
mouseOver: "multiply"
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if p.award_count("fireflies") %}
|
||||
<script src="/assets/js/fireflies.js"></script>
|
||||
{% set minbugs = 10*p.award_count("fireflies") if p.award_count("fireflies") < 3 else 20 %}
|
||||
{% set maxbugs = 20*p.award_count("fireflies") if p.award_count("fireflies") < 3 else 40 %}
|
||||
<script>
|
||||
new BugController({
|
||||
imageSprite: "/assets/images/fireflies.webp",
|
||||
canDie: false,
|
||||
minBugs: {{minbugs}},
|
||||
maxBugs: {{maxbugs}},
|
||||
mouseOver: "multiply"
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
<meta charset="utf-8" />
|
||||
|
@ -247,36 +242,6 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
{% if p.award_count("shit") %}
|
||||
<script src="/assets/js/bug-min.js"></script>
|
||||
{% set minbugs = 10*p.award_count("shit") if p.award_count("shit") < 3 else 20 %}
|
||||
{% set maxbugs = 20*p.award_count("shit") if p.award_count("shit") < 3 else 40 %}
|
||||
<script>
|
||||
new BugController({
|
||||
imageSprite: "/assets/images/fly-sprite.webp",
|
||||
canDie: false,
|
||||
minBugs: {{minbugs}},
|
||||
maxBugs: {{maxbugs}},
|
||||
mouseOver: "multiply"
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if p.award_count("fireflies") %}
|
||||
<script src="/assets/js/fireflies.js"></script>
|
||||
{% set minbugs = 10*p.award_count("fireflies") if p.award_count("fireflies") < 3 else 20 %}
|
||||
{% set maxbugs = 20*p.award_count("fireflies") if p.award_count("fireflies") < 3 else 40 %}
|
||||
<script>
|
||||
new BugController({
|
||||
imageSprite: "/assets/images/fireflies.webp",
|
||||
canDie: false,
|
||||
minBugs: {{minbugs}},
|
||||
maxBugs: {{maxbugs}},
|
||||
mouseOver: "multiply"
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
<div class="row mb-3">
|
||||
|
||||
|
@ -318,11 +283,9 @@
|
|||
<span data-bs-toggle="tooltip" data-bs-placement="bottom" id="timestamp" title=""> {{p.age_string}}</span>
|
||||
({% if p.realurl(v) %}<a href="/search/posts/?q=domain%3A{{p.domain}}&sort=new&t=all" {% if not v or v.newtabexternal %}target="_blank"{% endif %}>{{p.domain}}</a>{% else %}text post{% endif %})
|
||||
|
||||
|
||||
{% if p.edited_utc %} Edited <span data-bs-toggle="tooltip" data-bs-placement="bottom" id="edited_timestamp" title="">{{p.edited_string}}</span>{% endif %}
|
||||
{{p.views}} views
|
||||
</div>
|
||||
|
||||
{% if p.active_flags %}
|
||||
<div id="flaggers" class="flaggers d-none">
|
||||
<strong><i class="far fa-fw fa-flag"></i> Reported by:</strong>
|
||||
|
@ -336,7 +299,6 @@
|
|||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if p.realurl(v) %}
|
||||
<h1 id="post-title" class="card-title post-title text-left mb-md-3"><a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}">
|
||||
{% if p.club %}<span class="patron font-weight-bolder" style="background-color:red; font-size:12px;">COUNTRY CLUB</span>{% endif %}
|
||||
|
@ -354,7 +316,6 @@
|
|||
{% if "streamable.com/" in p.realurl(v) %}
|
||||
<div style="width: 100%; height: 0px; position: relative; padding-bottom: 56.250%;"><iframe loading="lazy" src="{{p.realurl(v)}}" frameborder="0" width="100%" height="100%" allowfullscreen="" style="width: 100%; height: 100%; position: absolute;"></iframe></div>
|
||||
<pre></pre>
|
||||
|
||||
{% elif "spotify.com/" in p.realurl(v) %}
|
||||
{% if "spotify.com/embed/" in p.realurl(v) %}
|
||||
{% set streamurl=p.realurl(v) %}
|
||||
|
@ -373,7 +334,6 @@
|
|||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div id="post-text" style="z-index: 50">
|
||||
{% if p.is_image %}
|
||||
<div class="row no-gutters">
|
||||
|
@ -438,7 +398,6 @@
|
|||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="d-none d-md-flex justify-content-between align-items-center mt-2">
|
||||
<div class="post-actions mt-2">
|
||||
<ul class="list-inline text-right d-flex">
|
||||
|
@ -458,7 +417,6 @@
|
|||
{% endif %}
|
||||
|
||||
<li class="list-inline-item"><a href="/votes?link={{p.fullname}}"><i class="fas fa-arrows-v"></i>Votes</a></li>
|
||||
|
||||
{% if v and v.id!=p.author_id %}
|
||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="javascript:void(0)" data-bs-toggle="modal" data-bs-target="#awardModal" onclick="awardModal('/post/{{p.id}}/awards')"><i class="fas fa-gift fa-fw"></i>Give Award</a></li>
|
||||
{% endif %}
|
||||
|
@ -486,7 +444,6 @@
|
|||
<li class="list-inline-item"><a href="javascript:void(0)" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')"><i class="fas fa-trash-alt"></i>Delete</a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if v and v.admin_level>=3 %}
|
||||
<li id="pin-{{p.id}}" class="{% if p.stickied %}d-none{% endif %} list-inline-item"><a class="text-info" href="javascript:void(0)" onclick="post_toast2('/sticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')"><i class="fas fa-thumbtack"></i>Pin</a></li>
|
||||
<li id="unpin-{{p.id}}" class="{% if not p.stickied %}d-none{% endif %} list-inline-item"><a class="text-info" href="javascript:void(0)" onclick="post_toast2('/sticky/{{p.id}}','/sticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')"><i class="fas fa-thumbtack"></i>Unpin</a></li>
|
||||
|
@ -536,7 +493,6 @@
|
|||
<li id="unban-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} list-inline-item"><a class="text-danger" id="unexile2-user-{{p.id}}" href="javascript:void(0)" onclick="post_toast2('/unban_user/{{p.author_id}}','ban-{{p.id}}','unban-{{p.id}}')"><i class="fas fa-user-slash"></i>Unban user</a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -551,7 +507,6 @@
|
|||
<div id="post-{{p.id}}-up" tabindex="0" data-bs-id-up="{{p.id}}" data-bs-content-type="post" class="mx-auto arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% endif %}"></div>
|
||||
|
||||
<span id="post-score-{{p.id}}" class="score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}" data-bs-toggle="tooltip" data-bs-placement="right" data-bs-original-title="+{{ups}} | -{{downs}}">{{score}}</span>
|
||||
|
||||
<div {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="post-{{p.id}}-down" tabindex="0" data-bs-id-down="{{p.id}}" data-bs-content-type="post" class="text-muted mx-auto arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}"></div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -76,7 +76,6 @@
|
|||
{% if p.is_banned and p.ban_reason %}
|
||||
<div class="text-danger mt-4 mb-2">Reason: {{p.ban_reason | safe}}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if v and v.admin_level >=3 and p.body_html %}
|
||||
<div class="post-body mt-4 mb-2">
|
||||
{{p.body_html | safe}}
|
||||
|
@ -117,19 +116,15 @@
|
|||
<!-- Mobile responsive fixed footer with post actions -->
|
||||
|
||||
<div class="row fixed-top bg-white shadow d-inline-flex d-md-none p-3" id="footer-actions" style="z-index: 3; top: 48px; transition: top cubic-bezier(0, 0, 0.2, 1) 220ms;">
|
||||
|
||||
<div class="col text-center">
|
||||
|
||||
<div class="post-actions mx-auto">
|
||||
<ul class="list-inline">
|
||||
|
||||
<li id="voting-mobile" class="voting list-inline-item{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}">
|
||||
<span id="arrow-mobile-up" class="mr-2 arrow-mobile-up">
|
||||
<i class="fas fa-arrow-alt-up mx-0"></i>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
<span id="post-{{p.id}}-score-mobile-up" class="score-up text-muted{% if voted!=1 %} d-none{% endif %}">✖</span>
|
||||
<span id="post-{{p.id}}-score-mobile-none" class="score text-muted{% if voted!=0 and voted!=-2 %} d-none{% endif %}">✖</span>
|
||||
<span id="post-{{p.id}}-score-mobile-down" class="score-down text-muted{% if voted!=-1 %} d-none{% endif %}">✖</span>
|
||||
|
@ -142,9 +137,7 @@
|
|||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -71,7 +71,6 @@
|
|||
<div class="card-header bg-transparent border-0 d-flex flex-row flex-nowrap pl-2 pl-md-0 p-0 mr-md-2">
|
||||
|
||||
<div style="z-index: 3;">
|
||||
|
||||
{% if p.club and not (v and v.paid_dues) %}
|
||||
<img loading="lazy" src="/assets/images/emojis/marseyglow.webp" class="post-img">
|
||||
{% elif not p.url %}
|
||||
|
@ -91,7 +90,6 @@
|
|||
<img loading="lazy" src="{{p.thumb_url}}" class="post-img">
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -126,7 +124,6 @@
|
|||
<span data-bs-toggle="tooltip" data-bs-placement="bottom" id="timestamp-{{p.id}}" title=""> {{p.age_string}}</span>
|
||||
|
||||
({% if p.realurl(v) %}<a href="/search/posts/?q=domain%3A{{p.domain}}&sort=new&t=all" target="_blank">{{p.domain}}</a>{% else %}text post{% endif %})
|
||||
|
||||
{% if p.edited_utc %} Edited <span data-bs-toggle="tooltip" data-bs-placement="bottom" id="edited_timestamp-{{p.id}}" title="">{{p.edited_string}}</span>{% endif %}
|
||||
{{p.views}} views
|
||||
</div>
|
||||
|
@ -178,7 +175,6 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if v and v.admin_level>=3 %}
|
||||
<li id="pin-{{p.id}}" class="{% if p.stickied %}d-none{% endif %} list-inline-item"><a class="text-info" href="javascript:void(0)" onclick="post_toast2('/sticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')"><i class="fas fa-thumbtack"></i>Pin</a></li>
|
||||
<li id="unpin-{{p.id}}" class="{% if not p.stickied %}d-none{% endif %} list-inline-item"><a class="text-info" href="javascript:void(0)" onclick="post_toast2('/sticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')"><i class="fas fa-thumbtack"></i>Unpin</a></li>
|
||||
|
@ -224,7 +220,6 @@
|
|||
<li id="unban-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} list-inline-item"><a class="text-danger" id="unexile2-user-{{p.id}}" href="javascript:void(0)" onclick="post_toast2('/unban_user/{{p.author_id}}','ban-{{p.id}}','unban-{{p.id}}')"><i class="fas fa-user-slash"></i>Unban user</a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -501,7 +496,6 @@
|
|||
<h2 class="h5">@{{u.username}} hasn't made a post yet</h2>
|
||||
<p class="text-muted">Their posting history will show here.</p>
|
||||
<pre>
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,248 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||
<script src="/assets/js/general41.js"></script>
|
||||
|
||||
<script src="/assets/js/submit.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
// Text Formatting
|
||||
|
||||
// Bold Text
|
||||
|
||||
makeBold = function (form) {
|
||||
var text = document.getElementById(form);
|
||||
var startIndex = text.selectionStart,
|
||||
endIndex = text.selectionEnd;
|
||||
var selectedText = text.value.substring(startIndex, endIndex);
|
||||
|
||||
var format = '**'
|
||||
|
||||
if (selectedText.includes('**')) {
|
||||
text.value = selectedText.replace(/\*/g, '');
|
||||
|
||||
}
|
||||
else if (selectedText.length == 0) {
|
||||
text.value = text.value.substring(0, startIndex) + selectedText + text.value.substring(endIndex);
|
||||
}
|
||||
else {
|
||||
text.value = text.value.substring(0, startIndex) + format + selectedText + format + text.value.substring(endIndex);
|
||||
}
|
||||
}
|
||||
|
||||
// Italicize Comment Text
|
||||
|
||||
makeItalics = function (form) {
|
||||
var text = document.getElementById(form);
|
||||
var startIndex = text.selectionStart,
|
||||
endIndex = text.selectionEnd;
|
||||
var selectedText = text.value.substring(startIndex, endIndex);
|
||||
|
||||
var format = '*'
|
||||
|
||||
if (selectedText.includes('*')) {
|
||||
text.value = selectedText.replace(/\*/g, '');
|
||||
|
||||
}
|
||||
else if (selectedText.length == 0) {
|
||||
text.value = text.value.substring(0, startIndex) + selectedText + text.value.substring(endIndex);
|
||||
}
|
||||
else {
|
||||
text.value = text.value.substring(0, startIndex) + format + selectedText + format + text.value.substring(endIndex);
|
||||
}
|
||||
}
|
||||
|
||||
// Quote Comment Text
|
||||
|
||||
makeQuote = function (form) {
|
||||
var text = document.getElementById(form);
|
||||
var startIndex = text.selectionStart,
|
||||
endIndex = text.selectionEnd;
|
||||
var selectedText = text.value.substring(startIndex, endIndex);
|
||||
|
||||
var format = '>'
|
||||
|
||||
if (selectedText.includes('>')) {
|
||||
text.value = text.value.substring(0, startIndex) + selectedText.replace(/\>/g, '') + text.value.substring(endIndex);
|
||||
|
||||
}
|
||||
else if (selectedText.length == 0) {
|
||||
text.value = text.value.substring(0, startIndex) + selectedText + text.value.substring(endIndex);
|
||||
}
|
||||
else {
|
||||
text.value = text.value.substring(0, startIndex) + format + selectedText + text.value.substring(endIndex);
|
||||
}
|
||||
}
|
||||
|
||||
// Character Count
|
||||
|
||||
function charLimit(form, text) {
|
||||
|
||||
var input = document.getElementById(form);
|
||||
|
||||
var text = document.getElementById(text);
|
||||
|
||||
var length = input.value.length;
|
||||
|
||||
var maxLength = input.getAttribute("maxlength");
|
||||
|
||||
if (length >= maxLength) {
|
||||
text.style.color = "#E53E3E";
|
||||
}
|
||||
else if (length >= maxLength * .72){
|
||||
text.style.color = "#FFC107";
|
||||
}
|
||||
else {
|
||||
text.style.color = "#A0AEC0";
|
||||
}
|
||||
|
||||
text.innerText = maxLength - length;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//part of submit page js
|
||||
|
||||
hide_image=function(){
|
||||
x=document.getElementById('image-upload-block');
|
||||
url=document.getElementById('post-URL').value;
|
||||
if (url.length>=1){
|
||||
x.classList.add('d-none');
|
||||
}
|
||||
else {
|
||||
x.classList.remove('d-none');
|
||||
}
|
||||
}
|
||||
|
||||
// Auto-suggest title given URL
|
||||
|
||||
function autoSuggestTitle() {
|
||||
|
||||
var urlField = document.getElementById("post-URL");
|
||||
|
||||
var titleField = document.getElementById("post-title");
|
||||
|
||||
var isValidURL = urlField.checkValidity();
|
||||
|
||||
if (isValidURL && urlField.value.length > 0 && titleField.value === "") {
|
||||
|
||||
var x = new XMLHttpRequest();
|
||||
x.withCredentials=true;
|
||||
x.onreadystatechange = function() {
|
||||
if (x.readyState == 4 && x.status == 200) {
|
||||
|
||||
title=JSON.parse(x.responseText)["title"];
|
||||
titleField.value=title;
|
||||
|
||||
checkForRequired()
|
||||
}
|
||||
}
|
||||
x.open('get','/submit/title?url=' + urlField.value);
|
||||
x.send(null);
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
// Run AutoSuggestTitle function on load
|
||||
|
||||
if (window.location.pathname=='/submit') {
|
||||
window.onload = autoSuggestTitle();
|
||||
}
|
||||
|
||||
// Paste to create submission
|
||||
|
||||
document.addEventListener('paste', function (event) {
|
||||
|
||||
var nothingFocused = document.activeElement === document.body;
|
||||
|
||||
if (nothingFocused) {
|
||||
|
||||
var clipText = event.clipboardData.getData('Text');
|
||||
|
||||
var url = new RegExp('^(?:[a-z]+:)?//', 'i');
|
||||
|
||||
if (url.test(clipText) && window.location.pathname !== '/submit') {
|
||||
window.location.href = '/submit?url=' + clipText;
|
||||
}
|
||||
else if (url.test(clipText) && window.location.pathname == '/submit') {
|
||||
|
||||
document.getElementById("post-URL").value = clipText;
|
||||
|
||||
autoSuggestTitle()
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function checkForRequired() {
|
||||
|
||||
// Divs
|
||||
|
||||
var title = document.getElementById("post-title");
|
||||
|
||||
var url = document.getElementById("post-URL");
|
||||
|
||||
var text = document.getElementById("post-text");
|
||||
|
||||
var button = document.getElementById("create_button");
|
||||
|
||||
var image = document.getElementById("file-upload");
|
||||
|
||||
// Toggle reuqired attribute
|
||||
|
||||
if (url.value.length > 0 || image.value.length > 0) {
|
||||
text.required = false;
|
||||
url.required=false;
|
||||
} else if (text.value.length > 0 || image.value.length > 0) {
|
||||
url.required = false;
|
||||
} else {
|
||||
text.required = true;
|
||||
url.required = true;
|
||||
}
|
||||
|
||||
// Validity check
|
||||
|
||||
var isValidTitle = title.checkValidity();
|
||||
|
||||
var isValidURL = url.checkValidity();
|
||||
|
||||
var isValidText = text.checkValidity();
|
||||
|
||||
// Disable submit button if invalid inputs
|
||||
|
||||
if (isValidTitle && (isValidURL || image.value.length>0)) {
|
||||
button.disabled = false;
|
||||
} else if (isValidTitle && isValidText) {
|
||||
button.disabled = false;
|
||||
} else {
|
||||
button.disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// markdown
|
||||
|
||||
function markdown() {
|
||||
|
||||
var input = document.getElementById('post-text').value;
|
||||
|
||||
var emojis = Array.from(input.matchAll(/:(.{1,30}?):/gi))
|
||||
if(emojis != null){
|
||||
for(i = 0; i < emojis.length; i++){
|
||||
input = input.replace(emojis[i][0], "<img height=30 src='/assets/images/emojis/" + emojis[i][1] + ".webp'>")
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('preview').innerHTML = marked(input)
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="">
|
||||
|
@ -256,7 +19,6 @@
|
|||
<title>Create a post - {{'SITE_NAME' | app_config}}</title>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
|
||||
|
||||
<!-- {{'SITE_NAME' | app_config}} Board CSS -->
|
||||
|
@ -319,12 +81,10 @@
|
|||
<div><label class="mt-3">Attachment Upload</label></div>
|
||||
|
||||
<img loading="lazy" id="image-preview" class="w-100 d-block">
|
||||
|
||||
<label class="btn btn-secondary m-0" for="file-upload">
|
||||
<div id="filename-show">Select File</div>
|
||||
<input id="file-upload" type="file" name="file" accept="image/*, video/*" hidden>
|
||||
</label>
|
||||
|
||||
<small class="form-text text-muted">Optional if you have text.</small>
|
||||
<small class="form-text text-muted">You can upload videos up to 1 minute long.</small>
|
||||
</div>
|
||||
|
@ -338,7 +98,6 @@
|
|||
<div class="btn btn-secondary" onclick="document.getElementById('preview').classList.toggle('d-none');" style="float: right;">
|
||||
Toggle preview
|
||||
</div>
|
||||
|
||||
<div id="preview" class="my-3"></div>
|
||||
|
||||
<span class="position-absolute text-small font-weight-bold" id="character-count-submit-text-form" style="right: 1rem; bottom: 0.5rem; z-index: 3;"></span>
|
||||
|
@ -371,7 +130,6 @@
|
|||
<input type="checkbox" class="custom-control-input" id="nsfwCheck" name="over_18">
|
||||
<label class="custom-control-label" for="nsfwCheck">+18</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="privateCheck" name="private">
|
||||
<label class="custom-control-label" for="privateCheck">Draft</label>
|
||||
|
@ -390,7 +148,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
@ -414,38 +171,8 @@
|
|||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
<!-- {{'SITE_NAME' | app_config}} JS -->
|
||||
|
||||
<script>
|
||||
document.onpaste = function(event) {
|
||||
f=document.getElementById('file-upload');
|
||||
files = event.clipboardData.files
|
||||
filename = files[0].name.toLowerCase()
|
||||
if (filename.endsWith(".jpg") || filename.endsWith(".jpeg") || filename.endsWith(".png") || filename.endsWith(".webp"))
|
||||
{
|
||||
f.files = files;
|
||||
document.getElementById('filename-show').textContent = filename;
|
||||
document.getElementById('urlblock').classList.add('d-none');
|
||||
var fileReader = new FileReader();
|
||||
fileReader.readAsDataURL(f.files[0]);
|
||||
fileReader.addEventListener("load", function () {document.getElementById('image-preview').setAttribute('src', this.result);});
|
||||
document.getElementById('file-upload').setAttribute('required', 'false');
|
||||
checkForRequired();
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('file-upload').addEventListener('change', function(e){
|
||||
f=document.getElementById('file-upload');
|
||||
document.getElementById('urlblock').classList.add('d-none');
|
||||
document.getElementById('filename-show').textContent = document.getElementById('file-upload').files[0].name;
|
||||
var fileReader = new FileReader();
|
||||
fileReader.readAsDataURL(f.files[0]);
|
||||
fileReader.addEventListener("load", function () {document.getElementById('image-preview').setAttribute('src', this.result);});
|
||||
checkForRequired();
|
||||
})
|
||||
</script>
|
||||
|
||||
<pre>
|
||||
|
||||
|
||||
|
|
|
@ -43,123 +43,7 @@
|
|||
|
||||
{% block desktopUserBanner %}
|
||||
<!-- Desktop -->
|
||||
<script>
|
||||
function post_toast_callback(url, data, callback) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", url, true);
|
||||
var form = new FormData()
|
||||
|
||||
if(typeof data === 'object' && data !== null) {
|
||||
for(let k of Object.keys(data)) {
|
||||
form.append(k, data[k]);
|
||||
}
|
||||
}
|
||||
|
||||
form.append("formkey", formkey());
|
||||
xhr.withCredentials=true;
|
||||
|
||||
xhr.onload = function() {
|
||||
let result = callback(xhr);
|
||||
|
||||
if (xhr.status >= 200 && xhr.status < 300) {
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||
myToast.hide();
|
||||
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
||||
myToast.show();
|
||||
|
||||
try {
|
||||
if(typeof result == "string") {
|
||||
document.getElementById('toast-post-success-text').innerText = result;
|
||||
} else {
|
||||
document.getElementById('toast-post-success-text').innerText = JSON.parse(xhr.response)["message"];
|
||||
}
|
||||
} catch(e) {
|
||||
document.getElementById('toast-post-success-text').innerText = "Action successful!";
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
||||
myToast.hide();
|
||||
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||
myToast.show();
|
||||
|
||||
try {
|
||||
if(typeof result == "string") {
|
||||
document.getElementById('toast-post-error-text').innerText = result;
|
||||
} else {
|
||||
document.getElementById('toast-post-error-text').innerText = JSON.parse(xhr.response)["error"];
|
||||
}
|
||||
return false
|
||||
} catch(e) {
|
||||
document.getElementById('toast-post-error-text').innerText = "Error. Try again later.";
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
xhr.send(form);
|
||||
|
||||
}
|
||||
|
||||
const TRANSFER_TAX = 0.01;
|
||||
|
||||
window.addEventListener( 'load', function() {
|
||||
var userid = document.getElementById("userid").value;
|
||||
if (userid != "nosong")
|
||||
{
|
||||
var audio = new Audio(`/songs/${userid}`);
|
||||
audio.loop=true;
|
||||
audio.play();
|
||||
document.getElementById('userpage').addEventListener('click', () => {
|
||||
if (audio.paused) audio.play();
|
||||
}, {once : true});
|
||||
}
|
||||
}, false );
|
||||
|
||||
function transferCoins(mobile=false) {
|
||||
let t = event.target;
|
||||
t.disabled = true;
|
||||
|
||||
let amount = parseInt(document.getElementById("coins-transfer-amount").value);
|
||||
let transferred = amount - Math.ceil(amount*TRANSFER_TAX);
|
||||
|
||||
post_toast_callback("/@{{u.username}}/transfer_coins",
|
||||
{"amount": document.getElementById(mobile ? "coins-transfer-amount-mobile" : "coins-transfer-amount").value},
|
||||
(xhr) => {
|
||||
if(xhr.status == 200) {
|
||||
document.getElementById("user-coins-amount").innerText = parseInt(document.getElementById("user-coins-amount").innerText) - amount;
|
||||
document.getElementById("profile-coins-amount-mobile").innerText = parseInt(document.getElementById("profile-coins-amount-mobile").innerText) + transferred;
|
||||
document.getElementById("profile-coins-amount").innerText = parseInt(document.getElementById("profile-coins-amount").innerText) + transferred;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
setTimeout(_ => t.disabled = false, 2000);
|
||||
}
|
||||
|
||||
function updateTax(mobile=false) {
|
||||
let suf = mobile ? "-mobile" : "";
|
||||
let amount = parseInt(document.getElementById("coins-transfer-amount" + suf).value);
|
||||
if(isNaN(amount) || amount < 0) {
|
||||
amount = 0;
|
||||
}
|
||||
document.getElementById("coins-transfer-taxed" + suf).innerText = amount - Math.ceil(amount*TRANSFER_TAX);
|
||||
}
|
||||
|
||||
function toggleElement(group, id) {
|
||||
for(let el of document.getElementsByClassName(group)) {
|
||||
if(el.id != id) {
|
||||
el.classList.add('d-none');
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById(id).classList.toggle('d-none');
|
||||
}
|
||||
</script>
|
||||
<script src="/assets/js/userpage.js"></script>>
|
||||
|
||||
<textarea id="userid" style="display: none;">{% if u.song %}{{u.id}}{% else %}nosong{% endif %}</textarea>
|
||||
<div class="row d-none d-md-block">
|
||||
|
@ -177,7 +61,6 @@
|
|||
<h5 style="color:#ff66ac;">BANNED USER{% if u.ban_reason %}: {{u.ban_reason}}{% endif %}</h5>
|
||||
{% if u.unban_utc %}<h5 style="color:#ff66ac;">{{u.unban_string}}</h5>{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="d-flex align-items-center mt-1 mb-2">
|
||||
<h1 class="font-weight-bolder h3 mb-0" style="color: #{{u.namecolor}}"><span {% if u.patron %}class="patron" style="background-color:#{{u.namecolor}};"{% endif %}>{{u.username}}</span></h1>
|
||||
{% if u.username != u.original_username %}
|
||||
|
@ -224,14 +107,11 @@
|
|||
</div>
|
||||
|
||||
{% if u.customtitle %}<p class="font-weight-bolder" style="color: #{{u.titlecolor}}">{% if u.quadrant %}<img loading="lazy" height="20" src="/assets/images/PCM/quadrants/{{u.quadrant}}.webp">{% endif %}{{u.customtitle | safe}}</p>{% endif %}
|
||||
|
||||
<div class="font-weight-bolder">
|
||||
<span id="profile-coins-amount">{{u.coins}}</span>
|
||||
|
||||
<img data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{'COINS_NAME' | app_config}}" height="20" src="https://rdrama.net/assets/images/emojis/marseybux.webp">
|
||||
|
||||
{% if u.stored_subscriber_count >=1 and not u.is_nofollow %}<a href="/@{{u.username}}/followers">{{u.stored_subscriber_count}} follower{{'s' if u.stored_subscriber_count != 1 else ''}}</a> {% endif %}
|
||||
|
||||
joined <span data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.created_datetime}}">{{u.created_date}}</span>
|
||||
</div>
|
||||
{% if "pcm" in request.host %}<p class="text-muted">Based Count: {{u.basedcount}}</p>{% endif %}
|
||||
|
@ -261,7 +141,6 @@
|
|||
{% if v and v.id != u.id %}
|
||||
{% if u.id != 995 %}<a id="button-unsub" class="btn btn-secondary {% if not is_following %}d-none{% endif %}" href="javascript:void(0)" onclick="post_toast2('/unfollow/{{u.username}}','button-unsub','button-sub')">Unfollow</a>{% endif %}
|
||||
<a id="button-sub" class="btn btn-primary {% if is_following or u.is_nofollow or u.is_blocked %}d-none{% endif %}" href="javascript:void(0)" onclick="post_toast2('/follow/{{u.username}}','button-unsub','button-sub')">Follow</a>
|
||||
|
||||
<a class="btn btn-primary" href="javascript:void(0)" onclick="toggleElement('profile-toggleable', 'message')">Message</a>
|
||||
|
||||
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/suicide')">Get them help</a>
|
||||
|
@ -370,7 +249,6 @@
|
|||
<input id="user-ban-submit" type="submit" class="btn btn-danger" value="Ban user" disabled>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
<pre></pre>
|
||||
|
||||
<form id="agendaposter" class="{% if u.agendaposter %}d-none{% endif %}" action="/agendaposter/{{u.id}}" method="post">
|
||||
|
@ -378,7 +256,6 @@
|
|||
<input type="number" step="any" name="days" class="form-control" placeholder="Days (0 or blank = permanent)" />
|
||||
<input type="submit" class="btn btn-danger" value="Lock Agendaposter Theme" />
|
||||
</form>
|
||||
|
||||
<a id="unagendaposter" class="{% if not u.agendaposter %}d-none{% endif %} btn btn-success" href="javascript:void(0)" onclick="post_toast2('/agendaposter/{{u.id}}','agendaposter','unagendaposter')">Disable Agendaposter Theme</a>
|
||||
|
||||
<pre></pre>
|
||||
|
@ -471,7 +348,6 @@
|
|||
{% endif %}
|
||||
{% if u.verified %}<span><i class="fas fa-badge-check align-middle ml-1" style="color:#1DA1F2" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.verified}}"></i></span> {% endif %}
|
||||
<a class="text-black"><h1 class="h5 d-inline-block" style="color: #{{u.namecolor}}"><span {% if u.patron %}class="patron" style="background-color:#{{u.namecolor}};"{% endif %}>{{u.username}}</span></h1></a>
|
||||
|
||||
{% if u.username != u.original_username %}
|
||||
<span>
|
||||
<i class="fad fa-user-tag text-info align-middle ml-2" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Original Username: @{{u.original_username}}"></i>
|
||||
|
@ -494,9 +370,7 @@
|
|||
<span id="profile-coins-amount-mobile" class="font-weight-bold">{{u.coins}}</span>
|
||||
|
||||
<img data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{'COINS_NAME' | app_config}}" height="15" src="https://rdrama.net/assets/images/emojis/marseybux.webp">
|
||||
|
||||
{% if u.stored_subscriber_count >=1 and not u.is_nofollow %}<a href="/@{{u.username}}/followers" class="font-weight-bold">{{u.stored_subscriber_count}} follower{{'s' if u.stored_subscriber_count != 1 else ''}}</a> {% endif %}
|
||||
|
||||
{% if "pcm" in request.host %}
|
||||
<br>Based count: {{u.basedcount}}
|
||||
{% endif %}
|
||||
|
@ -535,7 +409,6 @@
|
|||
{% if v and v.id != u.id %}
|
||||
{% if u.id != 995 %}<a id="button-unsub2" class="btn btn-secondary {% if not is_following %}d-none{% endif %}" href="javascript:void(0)" onclick="post_toast2('/unfollow/{{u.username}}','button-unsub2','button-sub2')">Unfollow</a>{% endif %}
|
||||
<a id="button-sub2" class="btn btn-primary {% if is_following or u.is_nofollow or u.is_blocked %}d-none{% endif %}" href="javascript:void(0)" onclick="post_toast2('/follow/{{u.username}}','button-unsub2','button-sub2')">Follow</a>
|
||||
|
||||
<a class="btn btn-primary" href="javascript:void(0)" onclick="toggleElement('profile-toggleable-mobile', 'message-mobile')">Message</a>
|
||||
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/suicide')">Get them help</a>
|
||||
<a class="btn btn-primary" href="javascript:void(0)" onclick="toggleElement('profile-toggleable-mobile', 'coin-transfer-mobile')">Gift {{'COINS_NAME' | app_config}}</a>
|
||||
|
@ -592,10 +465,8 @@
|
|||
<div>{{u.username}} will receive <span id="coins-transfer-taxed-mobile">0</span> {{'COINS_NAME' | app_config}}</div>
|
||||
<button class="btn btn-primary mt-3" onclick="transferCoins(true)">Gift</button>
|
||||
</div>
|
||||
|
||||
{% if v.admin_level > 1 %}
|
||||
|
||||
|
||||
<button id="grant" class="{% if u.paid_dues %}d-none{% endif %} btn btn-success" onclick="post_toast2('/@{{u.username}}/club_allow','grant','bar')">Grant club access</button>
|
||||
<button id="bar" class="{% if u.club_banned %}d-none{% endif %} btn btn-danger" onclick="post_toast2('/@{{u.username}}/club_ban','grant','bar')">Bar from club</button>
|
||||
|
||||
|
@ -649,7 +520,6 @@
|
|||
<input id="user-ban-submit2" type="submit" class="btn btn-danger" value="Ban user" disabled>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
<pre></pre>
|
||||
|
||||
<form id="agendaposter2" class="{% if u.agendaposter %}d-none{% endif %}" action="/agendaposter/{{u.id}}" method="post">
|
||||
|
@ -657,7 +527,6 @@
|
|||
<input type="number" step="any" name="days" class="form-control" placeholder="Days (0 or blank = permanent)" />
|
||||
<input type="submit" class="btn btn-danger" value="Lock Agendaposter Theme" />
|
||||
</form>
|
||||
|
||||
<a id="unagendaposter2" class="{% if not u.agendaposter %}d-none{% endif %} btn btn-success" href="javascript:void(0)" onclick="post_toast2('/agendaposter/{{u.id}}','agendaposter2','unagendaposter2')">Disable Agendaposter Theme</a>
|
||||
|
||||
<pre></pre>
|
||||
|
@ -704,8 +573,6 @@
|
|||
<p>Banned by: <a href="{{u.banned_by.url}}">@{{u.banned_by.username}}</a></p>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue