saby-customizer 0.0.0-pre.39 → 0.0.0-pre.41

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.
@@ -86,7 +86,7 @@ export class PopupDialog extends oom.extends(HTMLElement, PopupDialogDefaults) {
86
86
  this.id = 'sc-popup-dialog'
87
87
  /** @type {import('@material/mwc-dialog').Dialog} */// @ts-ignore
88
88
  this.dialog = oom
89
- .mwcDialog({ hideActions: true }, this.header, this.main)
89
+ .mwcDialog({ hideactions: true }, this.header, this.main)
90
90
  .dom
91
91
 
92
92
  oom(this, this.dialog)
@@ -108,20 +108,22 @@ class ToolbarContainer extends oom.extends(HTMLElement, optionsDefaults) {
108
108
  * @param {{searchCount:number}} options Опции регистарции обработчиков
109
109
  */
110
110
  static addGlobalContainer({ searchCount } = { searchCount: 0 }) {
111
- const sabyPageRightPanel = document.querySelector('.sabyPage-MainLayout__rightPanel .sabyPage-MainLayout__wrapper') ||
112
- document.querySelector('.sabyPage-MainLayout__mainContent .sabyPage-widgets__rightPanel__bottomButtons .sabyPage-widgets__wrapper')
111
+ if (!ToolbarContainer.globalContainer) {
112
+ const sabyPageRightPanel = document.querySelector('.sabyPage-MainLayout__rightPanel .sabyPage-MainLayout__wrapper') ||
113
+ document.querySelector('.sabyPage-MainLayout__mainContent .sabyPage-widgets__rightPanel__bottomButtons .sabyPage-widgets__wrapper')
113
114
 
114
- if (sabyPageRightPanel) {
115
- ToolbarContainer.globalContainer = new ToolbarContainer({ global: true })
116
- sabyPageRightPanel.prepend(ToolbarContainer.globalContainer)
117
- } else {
118
- if (searchCount < 10) {
119
- searchCount++
120
- setTimeout(() => {
121
- this.addGlobalContainer({ searchCount })
122
- }, 1000)
115
+ if (sabyPageRightPanel) {
116
+ ToolbarContainer.globalContainer = new ToolbarContainer({ global: true })
117
+ sabyPageRightPanel.prepend(ToolbarContainer.globalContainer)
123
118
  } else {
124
- console.error('saby-customizer - addGlobalContainer: Не найден ни один общий контейнер для размещения доп. панелей с кнопками')
119
+ if (searchCount < 10) {
120
+ searchCount++
121
+ setTimeout(() => {
122
+ this.addGlobalContainer({ searchCount })
123
+ }, 1000)
124
+ } else {
125
+ console.error('saby-customizer - addGlobalContainer: Не найден ни один общий контейнер для размещения доп. панелей с кнопками')
126
+ }
125
127
  }
126
128
  }
127
129
  }
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.39",
12
+ "version": "0.0.0-pre.41",
13
13
  "type": "module",
14
14
  "main": "./userscript.js",
15
15
  "exports": {