Initialize PQueue.UI namespace defensively

This commit is contained in:
Simon Cordt
2025-09-27 02:41:36 +02:00
parent 35599e1b24
commit 36a12f8d7d
7 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
const setStatusMessage = (window.PQueue && window.PQueue.setStatusMessage) || window.setStatusMessage;
const copyText = (window.PQueue && window.PQueue.copyText) || window.copyText;
const UI = window.PQueue?.UI || {};
const UI = window.PQueue?.UI || (window.PQueue = (window.PQueue || {}), window.PQueue.UI = {}, window.PQueue.UI);
UI.el = function el(tag, attrs = {}, children = []) {
const el = document.createElement(tag);
+1 -1
View File
@@ -1,7 +1,7 @@
(function () {
"use strict";
const UI = (window.PQueue && window.PQueue.UI) || window.UI;
const UI = (window.PQueue && window.PQueue.UI) || (window.PQueue = (window.PQueue || {}), window.PQueue.UI = {}, window.PQueue.UI);
UI.ensureGallery = function ensureGallery() {
if (UI.galleryOverlay) return;
+1 -1
View File
@@ -2,7 +2,7 @@
"use strict";
const state = (window.PQueue && window.PQueue.state) || {};
const UI = (window.PQueue && window.PQueue.UI) || window.UI;
const UI = (window.PQueue && window.PQueue.UI) || (window.PQueue = (window.PQueue || {}), window.PQueue.UI = {}, window.PQueue.UI);
const Format = (window.PQueue && window.PQueue.Format) || window.Format;
const Events = (window.PQueue && window.PQueue.Events) || window.Events;
+1 -1
View File
@@ -3,7 +3,7 @@
const state = (window.PQueue && window.PQueue.state) || {};
const API = (window.PQueue && window.PQueue.API) || window.API;
const UI = (window.PQueue && window.PQueue.UI) || window.UI;
const UI = (window.PQueue && window.PQueue.UI) || (window.PQueue = (window.PQueue || {}), window.PQueue.UI = {}, window.PQueue.UI);
const Format = (window.PQueue && window.PQueue.Format) || window.Format;
const setStatusMessage = (window.PQueue && window.PQueue.setStatusMessage) || window.setStatusMessage;
+1 -1
View File
@@ -2,7 +2,7 @@
"use strict";
const state = (window.PQueue && window.PQueue.state) || {};
const UI = (window.PQueue && window.PQueue.UI) || window.UI;
const UI = (window.PQueue && window.PQueue.UI) || (window.PQueue = (window.PQueue || {}), window.PQueue.UI = {}, window.PQueue.UI);
const Events = (window.PQueue && window.PQueue.Events) || window.Events;
const Format = (window.PQueue && window.PQueue.Format) || window.Format;
+1 -1
View File
@@ -2,7 +2,7 @@
"use strict";
const state = (window.PQueue && window.PQueue.state) || {};
const UI = (window.PQueue && window.PQueue.UI) || window.UI;
const UI = (window.PQueue && window.PQueue.UI) || (window.PQueue = (window.PQueue || {}), window.PQueue.UI = {}, window.PQueue.UI);
const Events = (window.PQueue && window.PQueue.Events) || window.Events;
UI.renderToolbar = function renderToolbar() {
+1 -1
View File
@@ -1,7 +1,7 @@
(function () {
"use strict";
const UI = (window.PQueue && window.PQueue.UI) || window.UI;
const UI = (window.PQueue && window.PQueue.UI) || (window.PQueue = (window.PQueue || {}), window.PQueue.UI = {}, window.PQueue.UI);
const copyText = (window.PQueue && window.PQueue.copyText) || window.copyText;
UI.ensureWorkflowModal = function ensureWorkflowModal() {