More Linkify
* Add Linkify.node to ExpandComment.callbacks * Add $.toggleClass, which allows the embedder to work.
This commit is contained in:
parent
8801be953e
commit
07e7dc7380
@ -838,6 +838,9 @@
|
|||||||
rmClass: function(el, className) {
|
rmClass: function(el, className) {
|
||||||
return el.classList.remove(className);
|
return el.classList.remove(className);
|
||||||
},
|
},
|
||||||
|
toggleClass: function(el, className) {
|
||||||
|
return el.classList.toggle(className);
|
||||||
|
},
|
||||||
hasClass: function(el, className) {
|
hasClass: function(el, className) {
|
||||||
return el.classList.contains(className);
|
return el.classList.contains(className);
|
||||||
},
|
},
|
||||||
@ -5996,6 +5999,9 @@
|
|||||||
if (g.VIEW === 'catalog' || !Conf['Linkify']) {
|
if (g.VIEW === 'catalog' || !Conf['Linkify']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (Conf['Comment Expansion']) {
|
||||||
|
ExpandComment.callbacks.push(this.node);
|
||||||
|
}
|
||||||
return Post.prototype.callbacks.push({
|
return Post.prototype.callbacks.push({
|
||||||
name: 'Linkify',
|
name: 'Linkify',
|
||||||
cb: this.node
|
cb: this.node
|
||||||
|
|||||||
@ -138,6 +138,8 @@ $.extend $,
|
|||||||
el.classList.add className
|
el.classList.add className
|
||||||
rmClass: (el, className) ->
|
rmClass: (el, className) ->
|
||||||
el.classList.remove className
|
el.classList.remove className
|
||||||
|
toggleClass: (el, className) ->
|
||||||
|
el.classList.toggle className
|
||||||
hasClass: (el, className) ->
|
hasClass: (el, className) ->
|
||||||
el.classList.contains className
|
el.classList.contains className
|
||||||
rm: (el) ->
|
rm: (el) ->
|
||||||
|
|||||||
@ -4111,6 +4111,9 @@ Linkify =
|
|||||||
init: ->
|
init: ->
|
||||||
return if g.VIEW is 'catalog' or not Conf['Linkify']
|
return if g.VIEW is 'catalog' or not Conf['Linkify']
|
||||||
|
|
||||||
|
if Conf['Comment Expansion']
|
||||||
|
ExpandComment.callbacks.push @node
|
||||||
|
|
||||||
Post::callbacks.push
|
Post::callbacks.push
|
||||||
name: 'Linkify'
|
name: 'Linkify'
|
||||||
cb: @node
|
cb: @node
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user