mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-29 09:27:54 +01:00
Extension fix - disappearing dislike counter (#999)
* Fix rate bar jumping around in width * Fix disappearing dislike counter * Fix disappearing dislike count on button focus/unfocus by @kokonguyen191 * Fix event listeners being thrown away by YouTube in some cases * Extension fix for disappearing dislikes while smartimations play * Check if smartimationContainer exists
This commit is contained in:
1 parent
2f2153ed37
commit
6791543617
5 files changed
+65
-42
No files matched your search
@@ -164,6 +164,15 @@ function querySelectorAll(selectors) {
|
||||
return result;
|
||||
}
|
||||
|
||||
function createObserver(options, callback) {
|
||||
const observerWrapper = new Object();
|
||||
observerWrapper.options = options;
|
||||
observerWrapper.observer = new MutationObserver(callback);
|
||||
observerWrapper.observe = function (element) { this.observer.observe(element, this.options); }
|
||||
observerWrapper.disconnect = function () { this.observer.disconnect(); }
|
||||
return observerWrapper;
|
||||
}
|
||||
|
||||
export {
|
||||
numberFormat,
|
||||
getBrowser,
|
||||
@@ -174,5 +183,6 @@ export {
|
||||
getColorFromTheme,
|
||||
localize,
|
||||
querySelector,
|
||||
querySelectorAll
|
||||
querySelectorAll,
|
||||
createObserver
|
||||
};
|
||||
Reference in new issue
Block a user