Adjust how blacklist classes get added

- Rename class for links as it was a misnomer
This commit is contained in:
BrokenEagle
2020-03-07 06:12:55 +00:00
parent 161e776cf7
commit 8c1f6020ba
2 changed files with 6 additions and 5 deletions

View File

@@ -41,16 +41,17 @@ Blacklist.parse_entries = function() {
}
Blacklist.toggle_entry = function(e) {
var tags = $(e.target).text();
var $link = $(e.target);
var tags = $link.text();
var match = $.grep(Blacklist.entries, function(entry, i) {
return entry.tags === tags;
})[0];
if (match) {
match.disabled = !match.disabled;
if (match.disabled) {
Blacklist.post_hide(e.target);
$link.addClass("blacklisted-inactive");
} else {
Blacklist.post_unhide(e.target);
$link.removeClass("blacklisted-inactive");
}
}
Blacklist.apply();
@@ -183,7 +184,7 @@ Blacklist.post_match = function(post, entry) {
Blacklist.post_hide = function(post) {
var $post = $(post);
$post.addClass("blacklisted").addClass("blacklisted-active");
$post.addClass("blacklisted blacklisted-active");
var $video = $post.find("video").get(0);
if ($video) {

View File

@@ -11,7 +11,7 @@
vertical-align: bottom;
}
a.blacklisted-active {
a.blacklisted-inactive {
text-decoration: line-through;
}
}