feat: more widget settings

This commit is contained in:
Tristan Yang
2024-07-29 22:15:43 +08:00
parent 2b6a460003
commit 1c895b5c28
10 changed files with 36 additions and 10 deletions
+3 -1
View File
@@ -10,6 +10,8 @@
openWidth = 380,
openHeight = 680,
themeColor = "#1fe1f9",
title = "",
logo = "",
position = "right",
welcome = ""
} = d.currentScript.dataset;
@@ -31,7 +33,7 @@
new URL(_src).origin
}/widget.html?id=${id}&host=${hostId}&autoReg=${autoReg}&token=${loginToken}&themeColor=${encodeURIComponent(
themeColor
)}&from=${encodeURIComponent(location.hostname)}&welcome=${encodeURIComponent(welcome)}`;
)}&from=${encodeURIComponent(location.hostname)}&welcome=${encodeURIComponent(welcome)}&title=${encodeURIComponent(title)}&logo=${encodeURIComponent(logo)}`;
wrapper.width = closeWidth;
wrapper.height = closeHeight;
wrapper.frameborder = 0;