feat: github login

This commit is contained in:
Tristan Yang
2022-10-30 22:12:25 +08:00
parent dec387ed5b
commit 4950a0663c
11 changed files with 149 additions and 75 deletions
+10 -1
View File
@@ -11,7 +11,8 @@ const styles = {
position: "fixed",
right: "15px",
bottom: "15px",
border: "none"
border: "none",
zIndex: 9999
};
Object.assign(wrapper.style, styles);
wrapper.src = `${domain}/widget.html?host=${hostId}`;
@@ -31,6 +32,14 @@ window.addEventListener(
wrapper.setAttribute("width", closeWidth);
wrapper.setAttribute("height", closeHeight);
break;
case "RELOAD_WITH_OPEN":
{
const url = new URL(wrapper.src);
url.searchParams.append("open", new Date().getTime());
console.log("new src", url.href);
wrapper.src = url.href;
}
break;
default:
break;
}