Adjust how blacklist classes get added
- Rename class for links as it was a misnomer
This commit is contained in:
@@ -41,16 +41,17 @@ Blacklist.parse_entries = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Blacklist.toggle_entry = function(e) {
|
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) {
|
var match = $.grep(Blacklist.entries, function(entry, i) {
|
||||||
return entry.tags === tags;
|
return entry.tags === tags;
|
||||||
})[0];
|
})[0];
|
||||||
if (match) {
|
if (match) {
|
||||||
match.disabled = !match.disabled;
|
match.disabled = !match.disabled;
|
||||||
if (match.disabled) {
|
if (match.disabled) {
|
||||||
Blacklist.post_hide(e.target);
|
$link.addClass("blacklisted-inactive");
|
||||||
} else {
|
} else {
|
||||||
Blacklist.post_unhide(e.target);
|
$link.removeClass("blacklisted-inactive");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Blacklist.apply();
|
Blacklist.apply();
|
||||||
@@ -183,7 +184,7 @@ Blacklist.post_match = function(post, entry) {
|
|||||||
|
|
||||||
Blacklist.post_hide = function(post) {
|
Blacklist.post_hide = function(post) {
|
||||||
var $post = $(post);
|
var $post = $(post);
|
||||||
$post.addClass("blacklisted").addClass("blacklisted-active");
|
$post.addClass("blacklisted blacklisted-active");
|
||||||
|
|
||||||
var $video = $post.find("video").get(0);
|
var $video = $post.find("video").get(0);
|
||||||
if ($video) {
|
if ($video) {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.blacklisted-active {
|
a.blacklisted-inactive {
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user