diff --git a/files/assets/js/award_modal.js b/files/assets/js/award_modal.js index 0f94c9930..d5d45756e 100644 --- a/files/assets/js/award_modal.js +++ b/files/assets/js/award_modal.js @@ -3,7 +3,7 @@ document.getElementById('awardModal').addEventListener('show.bs.modal', function }); // TODO: Refactor this ugly shit who wrote this lmao -function vote(type, id, dir, vid) { +function vote(type, id, dir) { const upvotes = document.getElementsByClassName(type + '-' + id + '-up'); const downvotes = document.getElementsByClassName(type + '-' + id + '-down'); const scoretexts = document.getElementsByClassName(type + '-score-' + id); @@ -21,7 +21,6 @@ function vote(type, id, dir, vid) { upvote.classList.remove('active-anim') scoretext.textContent = score - 1 votedirection = "0" - if (vid && ['1','9'].includes(vid)) document.getElementById(id+'-title').classList.remove('visited') } else if (downvote.classList.contains('active')) { upvote.classList.add('active') upvote.classList.add('active-anim') @@ -34,7 +33,6 @@ function vote(type, id, dir, vid) { upvote.classList.add('active-anim') scoretext.textContent = score + 1 votedirection = "1" - if (vid && ['1','9'].includes(vid)) document.getElementById(id+'-title').classList.add('visited') } if (upvote.classList.contains('active')) { @@ -60,7 +58,6 @@ function vote(type, id, dir, vid) { downvote.classList.remove('active-anim') scoretext.textContent = score + 1 votedirection = "0" - if (vid && ['1','9'].includes(vid)) document.getElementById(id+'-title').classList.remove('visited') } else if (upvote.classList.contains('active')) { downvote.classList.add('active') downvote.classList.add('active-anim') @@ -73,7 +70,6 @@ function vote(type, id, dir, vid) { downvote.classList.add('active-anim') scoretext.textContent = score - 1 votedirection = "-1" - if (vid && ['1','9'].includes(vid)) document.getElementById(id+'-title').classList.add('visited') } if (upvote.classList.contains('active')) { diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index 1121291aa..10f696a6f 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -91,26 +91,26 @@ {% if not postembed %}
{% if v and request.path.startswith('/@') and v.admin_level < 2 %} -
+
{{score}} -
+
{% elif v %} -
+
{{score}} -
+
{% else %} -
+
{{score}} -
+
{% endif %} @@ -287,20 +287,20 @@ {% if v and request.path.startswith('/@') and v.admin_level < 2 %}
  • - + {{score}} - +
  • {% elif v %}
  • - + {{score}} - +
  • {% else %} diff --git a/files/templates/util/assetcache.html b/files/templates/util/assetcache.html index 0507974bc..a57b1134a 100644 --- a/files/templates/util/assetcache.html +++ b/files/templates/util/assetcache.html @@ -16,7 +16,7 @@ set CACHE_VER = { 'css/tron.css': 63, 'css/win98.css': 63, - 'js/award_modal.js': 254, + 'js/award_modal.js': 255, 'js/bootstrap.js': 279, 'js/category_modal.js': 200, 'js/comments+submission_listing.js': 267,