@alan-ai/alan-sdk-web 1.8.121 → 1.8.124
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.
- package/dist/alan_lib.js +10 -4
- package/dist/alan_lib.min.js +1 -1
- package/package.json +1 -1
package/dist/alan_lib.js
CHANGED
|
@@ -101077,7 +101077,12 @@
|
|
|
101077
101077
|
DOMPurify.addHook("afterSanitizeAttributes", (node) => {
|
|
101078
101078
|
if (node.tagName === "IFRAME") {
|
|
101079
101079
|
if (!node.hasAttribute("sandbox")) {
|
|
101080
|
-
node.setAttribute("sandbox", "allow-scripts allow-same-origin allow-popups");
|
|
101080
|
+
node.setAttribute("sandbox", "allow-scripts allow-same-origin allow-popups allow-downloads");
|
|
101081
|
+
} else {
|
|
101082
|
+
const existing = node.getAttribute("sandbox") || "";
|
|
101083
|
+
if (!existing.includes("allow-downloads")) {
|
|
101084
|
+
node.setAttribute("sandbox", (existing.trim() + " allow-downloads").trim());
|
|
101085
|
+
}
|
|
101081
101086
|
}
|
|
101082
101087
|
node.setAttribute("referrerpolicy", "no-referrer");
|
|
101083
101088
|
}
|
|
@@ -109497,7 +109502,7 @@ var hljs=function(){"use strict";function e(n){return n instanceof Map?n.clear=n
|
|
|
109497
109502
|
const frameSrc = iframe.getAttribute("src");
|
|
109498
109503
|
iframe.removeAttribute("src");
|
|
109499
109504
|
iframe.setAttribute("srcdoc", htmlContent2);
|
|
109500
|
-
iframe.setAttribute("sandbox", "allow-scripts allow-same-origin");
|
|
109505
|
+
iframe.setAttribute("sandbox", "allow-scripts allow-same-origin allow-popups allow-downloads");
|
|
109501
109506
|
if (!options?.isGraphInfoDisabled && (frameSrc.indexOf("alan.") > -1 || frameSrc.indexOf("alan-"))) {
|
|
109502
109507
|
const parent3 = iframe.parentNode;
|
|
109503
109508
|
let controlsDiv = document.createElement("div");
|
|
@@ -109505,7 +109510,7 @@ var hljs=function(){"use strict";function e(n){return n instanceof Map?n.clear=n
|
|
|
109505
109510
|
let hiddenIframe = document.createElement("iframe");
|
|
109506
109511
|
hiddenIframe.srcdoc = `<!--${initHtmlContent}-->`;
|
|
109507
109512
|
hiddenIframe.setAttribute("style", "display: none;");
|
|
109508
|
-
hiddenIframe.setAttribute("sandbox", "");
|
|
109513
|
+
hiddenIframe.setAttribute("sandbox", "allow-scripts allow-same-origin allow-popups allow-downloads");
|
|
109509
109514
|
controlsDiv.appendChild(hiddenIframe);
|
|
109510
109515
|
const loadIframeLink = document.createElement("a");
|
|
109511
109516
|
loadIframeLink.classList.add("load-iframe-source");
|
|
@@ -110799,7 +110804,7 @@ var hljs=function(){"use strict";function e(n){return n instanceof Map?n.clear=n
|
|
|
110799
110804
|
// alan_btn/alan_btn.ts
|
|
110800
110805
|
(function(ns) {
|
|
110801
110806
|
const uiState10 = getUIState();
|
|
110802
|
-
const version2 = "alan-version.1.8.
|
|
110807
|
+
const version2 = "alan-version.1.8.124".replace("alan-version.", "");
|
|
110803
110808
|
uiState10.lib.version = version2;
|
|
110804
110809
|
window.alanLib = { version: version2 };
|
|
110805
110810
|
if (window.alanBtn) {
|
|
@@ -110823,6 +110828,7 @@ var hljs=function(){"use strict";function e(n){return n instanceof Map?n.clear=n
|
|
|
110823
110828
|
if (options?.mode === "docked-left" || options?.mode === "docked-right") {
|
|
110824
110829
|
uiState10.textChat.docked = true;
|
|
110825
110830
|
}
|
|
110831
|
+
uiState10.userInfo.userId = options?.authData?.userId || void 0;
|
|
110826
110832
|
}
|
|
110827
110833
|
var btnDisabled = true;
|
|
110828
110834
|
var btnIsReady = false;
|