Skip to content
This repository was archived by the owner on Jul 17, 2020. It is now read-only.

Commit 41b253d

Browse files
committed
fixes #201
1 parent 74133c3 commit 41b253d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/plugins/unonebox.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ var unonebox = {
6464
var frag = document.createElement( 'div' );
6565
frag.innerHTML = msgObj.content;
6666
// do not un-onebox youtube videos and quotes
67-
// .content > is required because quotes of images (!!artisticpoop)
68-
// have a nested .onebox element inside of them
69-
var link = frag.querySelector( '.content > .onebox:not(.ob-youtube):not(.ob-message) a' );
67+
var link = frag.querySelector( '.onebox:not(.ob-youtube):not(.ob-message) a' );
7068

7169
// No onebox, no un-oneboxing.
72-
if ( !link ) {
70+
// ugly fix for quoted messages as well.
71+
// TODO - think of a better solution for this.
72+
if ( !link || link.parentNode.parentNode.classList.contains('quote') ) {
7373
return;
7474
}
7575

0 commit comments

Comments
 (0)