forked from rDrama/rDrama
fix
parent
c517ce8afc
commit
5e06161642
|
@ -12,43 +12,6 @@
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
|
|
||||||
{% if v and (v.id == p.author_id or v.admin_level == 6 and v.id in [1,28,995,2513]) %}
|
|
||||||
<script defer>
|
|
||||||
togglePostEdit=function(id){
|
|
||||||
|
|
||||||
body=document.getElementById("post-body");
|
|
||||||
title=document.getElementById("post-title");
|
|
||||||
form=document.getElementById("edit-post-body-"+id);
|
|
||||||
box=document.getElementById("post-edit-box-"+id);
|
|
||||||
|
|
||||||
body.classList.toggle("hidden");
|
|
||||||
title.classList.toggle("hidden");
|
|
||||||
form.classList.toggle("hidden");
|
|
||||||
autoExpand(box);
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if 'rama' not in request.host %}
|
|
||||||
<script defer>
|
|
||||||
function poll_vote(cid) {
|
|
||||||
{% if v %}
|
|
||||||
var type = document.getElementById(cid).checked;
|
|
||||||
var scoretext = document.getElementById('poll-' + cid);
|
|
||||||
var score = Number(scoretext.textContent);
|
|
||||||
if (type == true) scoretext.textContent = score + 1;
|
|
||||||
else scoretext.textContent = score - 1;
|
|
||||||
post('/vote/poll/' + cid + '?vote=' + type);
|
|
||||||
{% else %}
|
|
||||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
|
||||||
myToast.show();
|
|
||||||
document.getElementById('toast-post-error-text').innerText = "Only logged-in users can vote!";
|
|
||||||
{% endif %}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if p.award_count("shit") %}
|
{% if p.award_count("shit") %}
|
||||||
<script defer src="/assets/js/bugs.js?v=54"></script>
|
<script defer src="/assets/js/bugs.js?v=54"></script>
|
||||||
{% set minbugs = 10*p.award_count("shit") if p.award_count("shit") < 3 else 20 %}
|
{% set minbugs = 10*p.award_count("shit") if p.award_count("shit") < 3 else 20 %}
|
||||||
|
|
Loading…
Reference in New Issue