diff --git a/files/assets/css/main.css b/files/assets/css/main.css index 8bd20a16c..4f04816df 100644 --- a/files/assets/css/main.css +++ b/files/assets/css/main.css @@ -1793,7 +1793,7 @@ a.badge:hover, a.badge:focus { } a.badge-secondary:hover, a.badge-secondary:focus { color: #fff; - background-color: #545b62; + background-color: var(--primary); } a.badge-secondary:focus, a.badge-secondary.focus { outline: 0; diff --git a/files/assets/js/mobile_navigation_bar.js b/files/assets/js/mobile_navigation_bar.js index 8494d58c5..38409d9b6 100644 --- a/files/assets/js/mobile_navigation_bar.js +++ b/files/assets/js/mobile_navigation_bar.js @@ -1,4 +1,4 @@ -window.onload = function () { +window.addEventListener("load",function(event) { var prevScrollpos = window.pageYOffset; window.onscroll = function () { var currentScrollPos = window.pageYOffset; @@ -43,4 +43,4 @@ window.onload = function () { } prevScrollpos = currentScrollPos; } -} \ No newline at end of file +}) \ No newline at end of file diff --git a/files/assets/js/popover.js b/files/assets/js/popover.js index 07be6fc4e..8bcaaeaba 100644 --- a/files/assets/js/popover.js +++ b/files/assets/js/popover.js @@ -1,4 +1,4 @@ -window.onload = function() { +window.addEventListener("load",function(event) { function eventasdf(value){ var content_id = value.getAttributeNode("data-content-id").value; value.addEventListener("click", function(){jhkj(content_id)}); @@ -29,8 +29,9 @@ window.onload = function() { document.body.removeChild(popover_shit); } + var usernames = document.querySelectorAll("a.user-name"); usernames.forEach(eventasdf); document.addEventListener("click", function(e){dfgh(e)}); - }; \ No newline at end of file +}); \ No newline at end of file diff --git a/files/classes/comment.py b/files/classes/comment.py index b11502826..975264e7d 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -13,8 +13,8 @@ from .flags import CommentFlag from random import randint site = environ.get("DOMAIN").strip() -if site == 'pcmemes.net': cc = "splash mountain" -else: cc = "country club" +if site == 'pcmemes.net': cc = "SPLASH MOUNTAIN" +else: cc = "COUNTRY CLUB" class Comment(Base): @@ -305,7 +305,7 @@ class Comment(Base): return data def realbody(self, v): - if self.post and self.post.club and not (v and v.paid_dues): return f"
{cc} ONLY
" + if self.post and self.post.club and not (v and v.paid_dues) and not (v and v.id == self.author_id): return f"{cc} ONLY
" body = self.body_html @@ -342,7 +342,7 @@ class Comment(Base): return body def plainbody(self, v): - if self.post and self.post.club and not (v and v.paid_dues): return f"{cc} ONLY
" + if self.post and self.post.club and not (v and v.paid_dues) and not (v and v.id == self.author_id): return f"{cc} ONLY
" body = self.body diff --git a/files/classes/mod_logs.py b/files/classes/mod_logs.py index e2310965e..e2ec233f6 100644 --- a/files/classes/mod_logs.py +++ b/files/classes/mod_logs.py @@ -6,8 +6,8 @@ from files.helpers.lazy import lazy from os import environ site = environ.get("DOMAIN").strip() -if site == 'pcmemes.net': cc = "splash mountain" -else: cc = "country club" +if site == 'pcmemes.net': cc = "SPLASH MOUNTAIN" +else: cc = "COUNTRY CLUB" class ModAction(Base): __tablename__ = "modactions" @@ -82,7 +82,7 @@ class ModAction(Base): @lazy def string(self): - output = ACTIONTYPES[self.kind]["str"].format(self=self, cc=cc) + output = ACTIONTYPES[self.kind]["str"].format(self=self) if self.note: output += f" ({self.note})" @@ -93,7 +93,7 @@ class ModAction(Base): def target_link(self): if self.target_user: return f'{self.target_user.username}' elif self.target_post: - if self.target_post.club: return f'{cc.upper()} ONLY' + if self.target_post.club: return f'{cc} ONLY' return f'{self.target_post.title.replace("<","").replace(">","")}' elif self.target_comment_id: return f'comment' diff --git a/files/routes/admin.py b/files/routes/admin.py index 08abf81eb..edd32391e 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1016,8 +1016,7 @@ def api_ban_comment(c_id, v): def api_unban_comment(c_id, v): comment = g.db.query(Comment).filter_by(id=c_id).first() - if not comment: - abort(404) + if not comment: abort(404) g.db.add(comment) if comment.is_banned: @@ -1037,26 +1036,20 @@ def api_unban_comment(c_id, v): @app.post("/distinguish_comment/