This commit is contained in:
parent
69d85fe54a
commit
0bd797d89e
|
@ -200,27 +200,22 @@ EmoteModule.prototype.obsCallback = function(mutation) {
|
|||
};
|
||||
|
||||
EmoteModule.prototype.getNodes = function(node) {
|
||||
console.log("GETNODES=>");
|
||||
var next;
|
||||
var nodes = [];
|
||||
|
||||
var treeWalker = document.createTreeWalker(node, NodeFilter.SHOW_TEXT, null, false);
|
||||
|
||||
while(next = treeWalker.nextNode()) {
|
||||
console.log("NEXT: " + next);
|
||||
nodes.push(next);
|
||||
}
|
||||
|
||||
if(nodes.length < 1) {
|
||||
treeWalker = document.createTreeWalker(node.parentElement, NodeFilter.SHOW_TEXT);
|
||||
while(next = treeWalker.nextNode()) {
|
||||
console.log("PACCEPTED: " + next);
|
||||
console.log(next);
|
||||
nodes.push(next);
|
||||
}
|
||||
}
|
||||
|
||||
console.log("<=GETNODES");
|
||||
|
||||
return nodes;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue