if(document.getElementsByClassName(‘userSelect‘) && document.getElementsByClassName(‘userSelect‘)[0]){ console.log(‘userSelect‘); document.getElementsByClassName(‘userSelect‘)[0].addEventListener(‘DOMSubtreeModified‘,function(e){ console.log(‘userSelect change‘); updateOrder(); }); }