feat: add auto reg to widget
This commit is contained in:
+4
-1
@@ -2,6 +2,7 @@
|
||||
((w, d) => {
|
||||
const {
|
||||
hostId = 1,
|
||||
autoReg = "false",
|
||||
closeWidth = 48,
|
||||
closeHeight = 48,
|
||||
openWidth = 380,
|
||||
@@ -24,7 +25,9 @@
|
||||
boxShadow: `rgb(0 0 0 / 25%) 0px 25px 50px -12px`
|
||||
};
|
||||
Object.assign(wrapper.style, styles);
|
||||
wrapper.src = `${new URL(_src).origin}/widget.html?host=${hostId}&themeColor=${encodeURIComponent(
|
||||
wrapper.src = `${
|
||||
new URL(_src).origin
|
||||
}/widget.html?host=${hostId}&autoReg=${autoReg}&themeColor=${encodeURIComponent(
|
||||
themeColor
|
||||
)}&from=${encodeURIComponent(location.hostname)}&welcome=${encodeURIComponent(welcome)}`;
|
||||
wrapper.width = closeWidth;
|
||||
|
||||
Reference in New Issue
Block a user