@decocms/blocks 7.45.0 → 7.46.1
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/package.json
CHANGED
|
@@ -39,10 +39,11 @@ function LiveControlsScript() {
|
|
|
39
39
|
if (window.__DECO_LIVE_CONTROLS__) return;
|
|
40
40
|
window.__DECO_LIVE_CONTROLS__ = true;
|
|
41
41
|
|
|
42
|
-
var TRUSTED_ORIGINS = ["https://deco.cx", "https://admin.deco.cx", "https://play.deco.cx"];
|
|
42
|
+
var TRUSTED_ORIGINS = ["https://deco.cx", "https://admin.deco.cx", "https://play.deco.cx", "https://decocms.com", "https://studio.decocms.com"];
|
|
43
43
|
function isTrustedOrigin(origin) {
|
|
44
44
|
return TRUSTED_ORIGINS.indexOf(origin) !== -1 ||
|
|
45
45
|
(origin.startsWith("https://") && origin.endsWith(".deco.cx")) ||
|
|
46
|
+
(origin.startsWith("https://") && origin.endsWith(".decocms.com")) ||
|
|
46
47
|
origin === window.location.origin;
|
|
47
48
|
}
|
|
48
49
|
|
|
@@ -85,8 +86,9 @@ function LiveControlsScript() {
|
|
|
85
86
|
});
|
|
86
87
|
|
|
87
88
|
if (window.self === window.top) {
|
|
88
|
-
document.
|
|
89
|
-
|
|
89
|
+
document.addEventListener("keydown", function(e) {
|
|
90
|
+
var t = e.target;
|
|
91
|
+
if (t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.tagName === "SELECT" || t.isContentEditable)) return;
|
|
90
92
|
if (e.defaultPrevented) return;
|
|
91
93
|
|
|
92
94
|
if (
|
|
@@ -100,12 +102,12 @@ function LiveControlsScript() {
|
|
|
100
102
|
var pageId = (window.LIVE.page && window.LIVE.page.id) || "";
|
|
101
103
|
var pathTemplate = (window.LIVE.page && window.LIVE.page.pathTemplate) || "/*";
|
|
102
104
|
|
|
103
|
-
var href = new URL("/choose-editor", "https://
|
|
105
|
+
var href = new URL("/choose-editor", "https://studio.decocms.com");
|
|
104
106
|
href.searchParams.set("site", siteName);
|
|
105
107
|
href.searchParams.set("domain", window.location.origin);
|
|
106
108
|
if (pageId) href.searchParams.set("pageId", pageId);
|
|
107
|
-
href.searchParams.set("path",
|
|
108
|
-
href.searchParams.set("pathTemplate",
|
|
109
|
+
href.searchParams.set("path", window.location.pathname + window.location.search);
|
|
110
|
+
href.searchParams.set("pathTemplate", pathTemplate);
|
|
109
111
|
|
|
110
112
|
if ((e.ctrlKey || e.metaKey) && e.key === ".") {
|
|
111
113
|
window.open(href.toString(), "_blank");
|