test
parent
09a5dac6d2
commit
8d466524c3
|
@ -59,17 +59,7 @@
|
|||
console.error('No video element found');
|
||||
|
||||
|
||||
// create observer to watch for new video elements
|
||||
const observer = new MutationObserver(function(mutations) {
|
||||
mutations.forEach(function(mutation) {
|
||||
mutation.addedNodes.forEach(function(node) {
|
||||
if (node.classList && node.classList.contains('shx-video-card-product')) {
|
||||
this.connectedCallback();
|
||||
console.log('new video added', node);
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
setTimeout(this.connectedCallback, 1000);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue