Show More
@@ -138,12 +138,16 function showQuoteButton() { | |||
|
138 | 138 | |
|
139 | 139 | var rect = window.getSelection().getRangeAt(0).getBoundingClientRect(); |
|
140 | 140 | var element = $(document.elementFromPoint(rect.x, rect.y)); |
|
141 | var postId = null; | |
|
142 | if (element.hasClass('post')) { | |
|
143 | postId = element.attr('id'); | |
|
144 | } else { | |
|
141 | 145 | var postParent = element.parents('.post'); |
|
142 | 146 | if (postParent.length > 0) { |
|
143 |
|
|
|
144 | } else { | |
|
145 | quoteButton.attr('data-post-id', null); | |
|
147 | postId = postParent.attr('id'); | |
|
146 | 148 | } |
|
149 | } | |
|
150 | quoteButton.attr('data-post-id', postId); | |
|
147 | 151 | } else { |
|
148 | 152 | quoteButton.hide(); |
|
149 | 153 | } |
General Comments 0
You need to be logged in to leave comments.
Login now