diff --git a/4chan_x.user.js b/4chan_x.user.js index 0df2b8613..901abe7cf 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -838,6 +838,9 @@ rmClass: function(el, className) { return el.classList.remove(className); }, + toggleClass: function(el, className) { + return el.classList.toggle(className); + }, hasClass: function(el, className) { return el.classList.contains(className); }, @@ -5996,6 +5999,9 @@ if (g.VIEW === 'catalog' || !Conf['Linkify']) { return; } + if (Conf['Comment Expansion']) { + ExpandComment.callbacks.push(this.node); + } return Post.prototype.callbacks.push({ name: 'Linkify', cb: this.node diff --git a/lib/$.coffee b/lib/$.coffee index 4f3748c57..941d1008a 100644 --- a/lib/$.coffee +++ b/lib/$.coffee @@ -138,6 +138,8 @@ $.extend $, el.classList.add className rmClass: (el, className) -> el.classList.remove className + toggleClass: (el, className) -> + el.classList.toggle className hasClass: (el, className) -> el.classList.contains className rm: (el) -> diff --git a/src/features.coffee b/src/features.coffee index f5245d461..8b83398ba 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -4111,6 +4111,9 @@ Linkify = init: -> return if g.VIEW is 'catalog' or not Conf['Linkify'] + if Conf['Comment Expansion'] + ExpandComment.callbacks.push @node + Post::callbacks.push name: 'Linkify' cb: @node