Skip to content

Instantly share code, notes, and snippets.

@25yeht
Last active November 25, 2024 20:29
Show Gist options
  • Save 25yeht/84fa98b14ad11343d126530db5eb6bf4 to your computer and use it in GitHub Desktop.
Save 25yeht/84fa98b14ad11343d126530db5eb6bf4 to your computer and use it in GitHub Desktop.
Please check your internet connection and try again.
javascript:
void((function() {
const sourceSansRegularURL = "https://www.dhs.gov/xlibrary/dhsweb/_site/assets/uswds/fonts/source-sans-pro/sourcesanspro-regular-webfont.woff2";
const sourceSansSemiboldURL = "https://www.dhs.gov/xlibrary/dhsweb/_site/assets/uswds/fonts/source-sans-pro/sourcesanspro-semibold-webfont.woff2";
const RBXCursorURL = "data:image/webp;base64,UklGRoIBAABXRUJQVlA4WAoAAAAwAAAAEQAAFgAAQUxQSGwAAAAFcFXbtqos3N2db76sBx1oRgUaubs7T4B7sQARMQE8VcCAuAJg+GOA4Q1AeAbF5lKICtUGsqku0tOjHG84KXK4tnLEB3KgyDgOmK5C4QcUIQNEJpgvArU6kBigvEr3ePQvBQwUnjn2z5yH/BJWUDgg8AAAABAGAJ0BKhIAFwA+nT6cSaWjIqEwGAgAsBOJaQAD4p/LvotBeubZxp+v8CjlnMdhtgIyFukcb8lgAAD+Uz/vTAv4X9CijBzE50Jhy/ZJ8m8ulV4kWxSsbQM4LI14ddLxi677VZv0oWuQGalTtKjC6nP6ITvc8xZcs3VwPPyF5z5p+c/amN1unMtkQvMAryJef2T9O/jFr56V0SGwaJ9kHpH2mVIqt2JXbLl8d339iRp+7D33qBuPGjjsWWU9XoSTal7Rr0w+oE9A8glL5LekjQ7CLk95qNq+RT9sPR9iA9yKYusbTqpUVUCZlPKxoc4AAA==";
const cover = document.createElement("div");
cover.style.backdropFilter = "blur(10px)";
cover.style.position = "fixed";
cover.style.width = "100vw";
cover.style.height = "100vh";
cover.style.top = "0";
cover.style.left = "0";
cover.style.zIndex = "99999";
cover.style.display = "none";
cover.style.alignItems = "center";
cover.style.justifyContent = "center";
cover.style.cursor = "url('" + RBXCursorURL + "'), auto";
const modal = document.createElement("div");
modal.style.boxSizing = "border-box";
modal.style.padding = "15px 20px";
modal.style.backgroundColor = "#393b3d";
modal.style.color = "#fff";
modal.style.minWidth = "400px";
modal.style.minHeight = "100px";
modal.style.fontFamily = "Source Sans Pro, system-ui, Helvetica, sans-serif";
modal.style.display = "flex";
modal.style.flexDirection = "column";
modal.style.gap = "15px";
modal.style.textAlign = "center";
modal.style.scale = "0";
const modalTitle = document.createElement("span");
modalTitle.style.fontWeight = "600";
modalTitle.style.fontSize = "20px";
modalTitle.textContent = "Disconnected";
modal.appendChild(modalTitle);
const titleLine = document.createElement("span");
titleLine.style.width = "100%";
titleLine.style.height = "1px";
titleLine.style.backgroundColor = "#bdbebe";
modal.appendChild(titleLine);
const descriptionText = document.createElement("div");
descriptionText.style.textAlign = "center";
descriptionText.style.fontSize = "16px";
descriptionText.style.color = "#bdbebe";
descriptionText.style.margin = "10px 0";
descriptionText.appendChild(document.createTextNode("Please check your internet connection and try again."));
descriptionText.appendChild(document.createElement("br"));
descriptionText.appendChild(document.createTextNode("(Error Code: 277)"));
modal.appendChild(descriptionText);
const actionButtonsSection = document.createElement("div");
actionButtonsSection.style.display = "flex";
actionButtonsSection.style.flexDirection = "row";
actionButtonsSection.style.gap = "10px";
modal.appendChild(actionButtonsSection);
const leaveButton = document.createElement("div");
leaveButton.style.border = "solid 1px #b2b3b5";
leaveButton.style.color = "#adaeb0";
leaveButton.style.borderRadius = "8px";
leaveButton.style.padding = "7px";
leaveButton.style.width = "50%";
leaveButton.style.boxSizing = "border-box";
leaveButton.textContent = "Leave";
actionButtonsSection.appendChild(leaveButton);
const reconnectButton = document.createElement("div");
reconnectButton.style.backgroundColor = "#ffffff";
reconnectButton.style.color = "#505153";
reconnectButton.style.borderRadius = "8px";
reconnectButton.style.padding = "7px";
reconnectButton.style.width = "50%";
reconnectButton.style.boxSizing = "border-box";
reconnectButton.textContent = "Reconnect";
actionButtonsSection.appendChild(reconnectButton);
const styleElement = document.createElement("style");
styleElement.textContent = "@font-face {font-family: 'Source Sans Pro';src: url('" + sourceSansRegularURL + "');font-weight: 500;}\n@font-face {font-family: 'Source Sans Pro';src: url('" + sourceSansSemiboldURL + "');font-weight: 600;}\n@keyframes rbx-modal-popup {from{scale: 0} to{scale: 1}}";
document.head.appendChild(styleElement);
cover.appendChild(modal);
document.documentElement.appendChild(cover);
setTimeout(function() {
modal.style.animationName = "rbx-modal-popup";
modal.style.animationDuration = "0.05s";
modal.style.animationTimingFunction = "linear";
modal.style.animationPlayState = "running";
modal.style.scale = "1";
cover.style.display = "flex";
}, 300);
})());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment