dev
This commit is contained in:
parent
f5ad2ab119
commit
dc07c79297
10
js/main.js
10
js/main.js
|
@ -184,15 +184,6 @@ EmoteModule.prototype.init = function() {};
|
||||||
EmoteModule.prototype.obsCallback = function(mutation) {
|
EmoteModule.prototype.obsCallback = function(mutation) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
//Edit injection
|
|
||||||
if(mutation.addedNodes.length == 1) {
|
|
||||||
var n = mutation.addedNodes[0];
|
|
||||||
if(n.parentNode.tagName == "SPAN") {
|
|
||||||
//Should be edit
|
|
||||||
self.injectEmote(n.parentNode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(var i = 0 ; i < mutation.addedNodes.length ; ++i) {
|
for(var i = 0 ; i < mutation.addedNodes.length ; ++i) {
|
||||||
var next = mutation.addedNodes.item(i);
|
var next = mutation.addedNodes.item(i);
|
||||||
if(next) {
|
if(next) {
|
||||||
|
@ -200,6 +191,7 @@ EmoteModule.prototype.obsCallback = function(mutation) {
|
||||||
for(var node in nodes) {
|
for(var node in nodes) {
|
||||||
if(nodes.hasOwnProperty(node)) {
|
if(nodes.hasOwnProperty(node)) {
|
||||||
self.injectEmote(nodes[node]);
|
self.injectEmote(nodes[node]);
|
||||||
|
console.log(nodes[node]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue