saby-customizer 0.0.0-pre.34 → 0.0.0-pre.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -118,11 +118,24 @@ class ToolbarContainer extends oom.extends(HTMLElement, optionsDefaults) {
118
118
  /** Регистрирует обработчик для поиска открытых задач и добавления в них панели */
119
119
  static registerTaskPanelWatcher() {
120
120
  const popupContainer = document.getElementById('popup')
121
+ const pageEntityContainer = document.querySelector('.onlinePage_Entity-wrapper.controls-Popup__dialog-target-container')
122
+ let timeout = null
123
+
124
+ this.observer = new MutationObserver(() => {
125
+ if (!timeout) {
126
+ timeout = setTimeout(() => {
127
+ this.addTaskPanelContainer()
128
+ timeout = null
129
+ }, 100)
130
+ }
131
+ })
121
132
 
122
133
  if (popupContainer) {
123
- this.observer = new MutationObserver(() => this.addTaskPanelContainer())
124
134
  this.observer.observe(popupContainer, { childList: true, subtree: true })
125
135
  }
136
+ if (pageEntityContainer) {
137
+ this.observer.observe(pageEntityContainer, { childList: true, subtree: true })
138
+ }
126
139
  }
127
140
 
128
141
  /** Добавления во все найденные открытые задачи правую панель */
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "repository": "github:saby-customizer/saby-customizer.github.io",
11
11
  "license": "Unlicense",
12
- "version": "0.0.0-pre.34",
12
+ "version": "0.0.0-pre.35",
13
13
  "type": "module",
14
14
  "main": "./userscript.js",
15
15
  "exports": {