Update public/$.html
This commit is contained in:
parent
f0529b100e
commit
e50b65dde1
|
@ -124,73 +124,6 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
|
||||||
(function() {
|
|
||||||
const protocol = location.protocol === "https:" ? "wss:" : "ws:";
|
|
||||||
const ws = new WebSocket(protocol + "//" + location.host + "/w/global");
|
|
||||||
ws.addEventListener("message", event => {
|
|
||||||
try {
|
|
||||||
let { message } = JSON.parse(event.data);
|
|
||||||
message = message;
|
|
||||||
|
|
||||||
const container = document.createElement("div");
|
|
||||||
container.style.position = "fixed";
|
|
||||||
container.style.top = "0";
|
|
||||||
container.style.left = "0";
|
|
||||||
container.style.width = "100%";
|
|
||||||
container.style.height = "100%";
|
|
||||||
container.style.background = "rgba(0, 0, 0, 0.8)";
|
|
||||||
container.style.display = "flex";
|
|
||||||
container.style.flexDirection = "column";
|
|
||||||
container.style.alignItems = "center";
|
|
||||||
container.style.justifyContent = "center";
|
|
||||||
container.style.color = "#fff";
|
|
||||||
container.style.zIndex = "10000";
|
|
||||||
|
|
||||||
const msgText = document.createElement("div");
|
|
||||||
msgText.style.fontSize = "3rem";
|
|
||||||
msgText.style.fontWeight = "bold";
|
|
||||||
msgText.style.marginTop = "-100px";
|
|
||||||
msgText.textContent = message;
|
|
||||||
|
|
||||||
const countdown = document.createElement("div");
|
|
||||||
countdown.style.fontSize = "2rem";
|
|
||||||
countdown.style.fontFamily = "'Comic Sans MS', 'Comic Sans', cursive";
|
|
||||||
countdown.style.marginTop = "10px"
|
|
||||||
let remaining = 5;
|
|
||||||
countdown.textContent = `Disappearing in ${remaining}...`;
|
|
||||||
|
|
||||||
container.appendChild(msgText);
|
|
||||||
container.appendChild(countdown);
|
|
||||||
document.body.appendChild(container);
|
|
||||||
|
|
||||||
const interval = setInterval(() => {
|
|
||||||
remaining--;
|
|
||||||
if (remaining >= 0) {
|
|
||||||
countdown.textContent = `Disappearing in ${remaining}...`;
|
|
||||||
} else {
|
|
||||||
clearInterval(interval);
|
|
||||||
container.style.transition = "opacity 1s ease-in-out";
|
|
||||||
container.style.opacity = "0";
|
|
||||||
container.addEventListener("transitionend", () => {
|
|
||||||
container.remove();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
} catch (err) {
|
|
||||||
console.error("Failed to parse WS data:", err);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
ws.addEventListener("error", err => {
|
|
||||||
console.error("WebSocket error:", err);
|
|
||||||
});
|
|
||||||
ws.addEventListener("close", () => {
|
|
||||||
setTimeout(() => location.reload(), 2000);
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="//pl26200346.effectiveratecpm.com/08/db/84/08db842da9b43ad3d13c14634f9fd1c8.js"></script>
|
<script type="text/javascript" src="//pl26200346.effectiveratecpm.com/08/db/84/08db842da9b43ad3d13c14634f9fd1c8.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue
Block a user