uniqueObserver
// ==UserScript==
// @name uniqueObserver
// @author xiaofeiwu
// @version 1.0.0
// ==/UserScript==
function observeNodeChanges(node, config, callback) {
const observer = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
callback(mutation);
});
});
observer.observe(node, config);
return observer;
}