We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 47371a1 + 6b08138 commit c0c345fCopy full SHA for c0c345f
js&css/web-accessible/core.js
@@ -255,8 +255,11 @@ document.addEventListener('it-message-from-extension', function () {
255
case 'themePrimaryColor':
256
case 'themeSecondaryColor':
257
case 'themeTextColor':
258
- ImprovedTube.myColors();
259
- ImprovedTube.setTheme();
+ clearTimeout(ImprovedTube.themeUpdateTimer);
+ ImprovedTube.themeUpdateTimer = setTimeout(function () {
260
+ ImprovedTube.myColors();
261
+ ImprovedTube.setTheme();
262
+ }, 200);
263
break
264
265
case 'description':
@@ -581,4 +584,4 @@ ImprovedTube.messages.send = function (message) {
581
584
582
585
document.dispatchEvent(new CustomEvent('it-message-from-youtube'));
583
586
}
-};
587
+};
0 commit comments