<!DOCTYPE html> <html data-user-color-scheme="dark"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" /> <title> 安全中心 | 博客名称 - 欲历观天下色萝.品JS自不厌多 </title> <link rel="icon" class="icon-favicon" href="/" /> <link rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" /> <link rel="stylesheet" href="https://at.alicdn.com/t/font_1736178_lbnruvf0jn.css" /> <style type="text/css"> @-webkit-keyframes fadeInUp { 0% { opacity: 0; transform: translateY(24px); } 100% { opacity: 1; transform: translateY(-80px); } } @keyframes fadeInUp { 0% { opacity: 0; -webkit-transform: translateY(24px); -ms-transform: translateY(24px); transform: translateY(24px); } 100% { opacity: 1; -webkit-transform: translateY(-80px); -ms-transform: translateY(-80px); transform: translateY(-80px); } } @-webkit-keyframes alertFadeInUp { 0% { opacity: 0; transform: translateY(24px); } 75% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; } } @keyframes alertFadeInUp { 0% { opacity: 0; -webkit-transform: translateY(24px); -ms-transform: translateY(24px); transform: translateY(24px); } 75% { opacity: 1; -webkit-transform: translateY(0); -ms-transform: translateY(0); transform: translateY(0); } 100% { opacity: 0; } } @-webkit-keyframes fadeOutUp { 0% { opacity: 1; } to { opacity: 0; transform: translate3d(0, -350%, 0); } } @keyframes fadeOutUp { 0% { opacity: 1; } to { opacity: 0; -webkit-transform: translate3d(0, -350%, 0); transform: translate3d(0, -350%, 0); } }
:root { --blue: #007bff; --indigo: #6610f2; --purple: #6f42c1; --pink: #e83e8c; --red: #dc3545; --orange: #fd7e14; --yellow: #ffc107; --green: #28a745; --teal: #20c997; --cyan: #17a2b8; --white: #fff; --gray: #6c757d; --gray-dark: #343a40; --primary: #007bff; --secondary: #6c757d; --success: #28a745; --info: #17a2b8; --warning: #ffc107; --danger: #dc3545; --light: #f8f9fa; --dark: #343a40; --breakpoint-xs: 0; --breakpoint-sm: 576px; --breakpoint-md: 768px; --breakpoint-lg: 992px; --breakpoint-xl: 1200px; --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
[data-user-color-scheme="dark"] { --body-bg-color: #22272e; --board-bg-color: #2b313a; --text-color: #adbac7; --sec-text-color: #b3bac1; --post-text-color: #adbac7; --post-heading-color: #adbac7; --post-link-color: #34a3ff; --link-hover-color: #30a9de; --link-hover-bg-color: #22272e; --line-color: #adbac7; --navbar-bg-color: #22272e; --navbar-text-color: #cbd4dc; --subtitle-color: #cbd4dc; --scrollbar-color: #30a9de; --scrollbar-hover-color: #34a3ff; --button-bg-color: transparent; --button-hover-bg-color: #46647e; --highlight-bg-color: #2d333b; --inlinecode-bg-color: rgba(99, 110, 123, 0.4); } ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-corner { background-color: transparent; } ::-webkit-scrollbar-thumb { background-color: var(--scrollbar-color); border-radius: 6px; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; } html, body {
font-family: var(--font-family-sans-serif); padding: 0; margin: 0; background-color: var(--body-bg-color); color: var(--text-color); transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out; height: 100%; } body { font-size: 1rem; } p, div { padding: 0; margin: 0; } a { text-decoration: none; transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out; } body a:hover { color: var(--link-hover-color); text-decoration: none; } .go-page { height: 100%; } .content { width: 450px; margin: auto; word-break: break-all; height: 100%; } .content .logo-img { margin-bottom: 20px; text-align: center; padding-top: 220px; } .content .logo-img p:first-child { font-size: 22px; } .content .logo-img img { display: block; width: 175px; height: 48px; margin: auto; margin-bottom: 16px; }
.content .loading-item { background: #fff; padding: 24px; border-radius: 12px; border: 1px solid #e1e1e1; margin-bottom: 10px; } .content .tip1 { background: #f0f9ea; } .content .tip2 { background: #fdf5e6; } .content .tip3 { background: #fef0f0; } .content .icon-snapchat-fill { font-size: 20px; color: #fc5531; border: 1px solid #fc5531; border-radius: 50%; width: 32px; text-align: center; margin-right: 5px; } .content .tip1 .icon-snapchat-fill { color: var(--post-link-color); border-color: var(--post-link-color); } .content .loading-text { font-size: 16px; font-weight: 600; color: #222226; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .content .flex { display: flex; align-items: center; } .content .flex-end { display: flex; justify-content: flex-end; } .content .loading-color1 { color: var(--post-link-color); } .content .loading-color2 { color: #fc5531; } .content .loading-tip { padding: 12px; margin-bottom: 16px; border-radius: 4px; } .content .loading-topic { font-size: 14px; color: #222226; line-height: 24px; margin-bottom: 24px; } .loading-topic .flex { flex-direction: column; } .content .loading-img { width: 24px; height: 24px; } .content .loading-btn { font-size: 14px; color: var(--post-link-color); border: 1px solid var(--post-link-color); display: inline-block; box-sizing: border-box; padding: 6px 18px; border-radius: 18px; margin-left: 8px; } .content .loading-btn:hover { color: var(--link-hover-color); border-color: var(--link-hover-color); } .content .loading-btn-github { width: 121px; background: #fc5531; color: #fff; }
.hidden { display: none; } .form-control.hidden { display: none !important; } .mp-img-box { text-align: center; margin-bottom: 10px; } .mp-img { max-width: 400px; width: 100%; box-shadow: 5px 5px 15px rgb(0 0 0 / 8%); margin-bottom: 5px; } .fadeInUp { -webkit-animation-name: fadeInUp; animation-name: fadeInUp; } .alertFadeInUp { -webkit-animation-name: alertFadeInUp; animation-name: alertFadeInUp; -webkit-animation-duration: 3s; animation-duration: 3s; -webkit-animation-fill-mode: both; animation-fill-mode: both; } .fadeOutUp { -webkit-animation-name: fadeOutUp; animation-name: fadeOutUp; } .fade-animate { -webkit-animation-duration: 1s; animation-duration: 1s; -webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation-delay: 1s; animation-delay: 1s; } .go-alert { margin: 0 auto; width: 110px; position: absolute; left: 46%; top: 5%; opacity: 0; text-align: center; } .footer { text-align: center; position: relative; margin-bottom: 20px; } .footer a { color: var(--text-color); }
.flex-box { display: flex; height: 100vh; flex-direction: column; } .flex-contain { flex: 1; } .flex-footer { height: 24px; }
@media (max-width: 767.98px) { .content { width: 94%; } .content .logo-img { padding-top: 120px; } } </style> </head> <body class="web-font"> <div id="goPage" class="go-page"> <div class="alert alert-danger go-alert hidden" role="alert"> 验证失败 </div>
<div class="content"> <div class="flex-box"> <div class="flex-contain"> <div class="logo-img"> <p class="blog-name">博客名称</p> <p class="blog-description"></p> </div>
<div class="loading-item loading-safe flex"> <i class="iconfont icon-snapchat-fill"></i> <div class="loading-text">链接安全性检验中 请稍后...</div> </div>
<div class="go-box"></div> </div> <div class="footer flex-footer"> ©2021-2024 <a href="https://blog.lolihouse.top" class="blog-name" ><span>博客名称</span></a > 版权所有 </div> </div> </div> </div>
<script src="https://lib.baomitu.com/jquery/3.6.0/jquery.min.js"></script> <script src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js"></script> <script type="module"> const config = { title: "さくら荘のタイズ | 安全中心", iconFavicon: "https://cdn.jsdelivr.net/gh/2427768286/STDM-imgs/images/qm06qq.jpg", mpImgSrc: "https://cdn.jsdelivr.net/gh/2427768286/STDM-imgs/sticker/e53923662b627a645fcd2b0b3feadb3b.gif", blogName: "さくら荘のタイズ", blogDescription: "欲历观天下色萝,品JS自不厌多。", safeUrl: [ "github.com", "gitee.com", "csdn.net", "zhihu.com", "pan.baidu.com", "baike.baidu.com", "hexo.io", "leancloud.cn", "nodejs.cn", "jsdelivr.com", "ohmyposh.dev", "nerdfonts.com", "douban.com", "waline.js.org", "developer.mozilla.org", "jinrishici.com", "hitokoto.cn", "zhangxinxu.com", "music.apple.com",
], tipsTextError: "链接错误,关闭页面返回さくら荘のタイズ", tipsTextDownload: "(๑•̀ㅂ•́)و✧切记网盘压缩文件下载后再解压哦o‿≖✧", tipsTextDanger: "该网址未在确认的安全范围内", tipsTextSuccess: "该网址在确认的安全范围内", textDanger: "您即将离开さくら荘のタイズ去往如下网址,请注意您的账号隐私安全和财产安全:", textSuccess: "您即将离开さくら荘のタイズ去往如下网址", wpValidate: "9498", };
const getQueryString = (name, type) => { let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"), regDown = new RegExp("&type=" + type), r = window.location.search.substr(1).match(reg), d = window.location.search.substr(1).match(regDown), isDownload = false;
if (r !== null) { if (d !== null) { isDownload = true; } return { url: decodeURIComponent(r[2]), isDownload: isDownload }; } return null; };
const xssCheck = (str, reg) => { return str ? str.replace( reg || /[&<">'](?:(amp|lt|quot|gt|#39|nbsp|#\d+);)?/g, function (a, b) { if (b) { return a; } else { return { "<": "<", "&": "&", '"': """, ">": ">", "'": "'", }[a]; } } ) : ""; };
const downloadValidate = (config, getLinkUrl) => { const downloadBtn = document.querySelector(".go-down-btn"), downloadUrl = document.querySelector(".go-down-url"), wpValidate = document.querySelector(".wp-validate"), goAlert = document.querySelector(".go-alert");
downloadBtn.addEventListener( "click", function () { goAlert.classList.remove("hidden", "alertFadeInUp"); setTimeout(() => { goAlert.classList.add("alertFadeInUp"); }, 300); wpValidate.value = "9498"; if ( wpValidate && wpValidate.value !== "" && wpValidate.value === config.wpValidate ) { wpValidate.classList.remove("is-invalid"); wpValidate.classList.add("is-valid"); goAlert.classList.remove("alert-danger"); goAlert.classList.add("alert-success"); goAlert.textContent = "验证成功"; downloadUrl.click(); } else { wpValidate.classList.remove("is-valid"); wpValidate.classList.add("is-invalid"); goAlert.classList.remove("alert-success"); goAlert.classList.add("alert-danger"); goAlert.textContent = "验证失败"; } }, !1 ); };
const othersValidate = (config, getLinkUrl) => { let isSafeUrl = false, safeUrl = config.safeUrl, url = xssCheck(getLinkUrl.url);
if (safeUrl.length !== 0) { for (let i = 0; i < safeUrl.length; i++) { const ele = safeUrl[i]; if (url.includes(ele)) { isSafeUrl = true; break; } } } return isSafeUrl; };
const goInit = (config) => { const tplConfig = { loadingType: "loading-error", tipType: "tip3", tipsText: config.tipsTextError, loadingTopicText: config.textDanger, loadingColorType: "loading-color2", goUrl: "/", }, getLinkUrl = getQueryString("goUrl", "goDown"), loadingSafe = document.querySelector(".loading-safe"), goBox = document.querySelector(".go-box"), title = document.querySelector("title"), iconFavicon = document.querySelector(".icon-favicon"), blogName = document.querySelectorAll(".blog-name"), blogDescription = document.querySelector(".blog-description");
title.textContent = config.title; iconFavicon.setAttribute("href", config.iconFavicon); blogName.forEach((element) => { element.textContent = config.blogName; }); blogDescription.textContent = config.blogDescription;
if (getLinkUrl && !getLinkUrl.isDownload) { const isSafeUrl = othersValidate(config, getLinkUrl); tplConfig.loadingType = "loading-others"; tplConfig.goUrl = xssCheck(getLinkUrl.url);
if (isSafeUrl) { tplConfig.tipType = "tip1"; tplConfig.tipsText = config.tipsTextSuccess; tplConfig.loadingTopicText = config.textSuccess; tplConfig.loadingColorType = "loading-color1"; setTimeout(() => { const goUrlBtn = document.querySelector(".go-url-btn"); goUrlBtn.click(); }, 2000); } else { tplConfig.tipType = "tip2"; tplConfig.tipsText = config.tipsTextDanger; tplConfig.loadingTopicText = config.textDanger; tplConfig.loadingColorType = "loading-color2"; } } else if (getLinkUrl && getLinkUrl.isDownload) { tplConfig.loadingType = "loading-download"; tplConfig.goUrl = xssCheck(getLinkUrl.url); tplConfig.tipType = "tip1"; tplConfig.tipsText = config.tipsTextDownload; } else { tplConfig.tipType = "tip2"; tplConfig.tipsText = config.tipsTextError; }
const othersTpl = ` <div class="loading-topic"> <span >${tplConfig.loadingTopicText}</span > <a class="${tplConfig.loadingColorType} go-url">${tplConfig.goUrl}</a> </div> <div class="flex-end"> <a rel="noopener external nofollow noreferrer" class="loading-btn go-url-btn" href="${tplConfig.goUrl}" target="_self">继续</a> </div> `;
const downloadTpl = ` <div class="loading-topic"> <div class="flex"> <div class="mp-img-box"> <img class="mp-img" src="${config.mpImgSrc}" alt="qrcode" /> <p> 在线解压有概率造成资源失效<br> 切记下载后再解压哦 ≖‿≖✧ </p> </div> <div> <form class="needs-validation form-inline"> <div class="form-group"> <label class="sr-only" for="wp-validate">验证码</label> <input type="text" class="form-control wp-validate hidden" id="wp-validate" placeholder="请输入公众号验证码..." /> <input type="text" class="form-control hidden" /> </div> </form> <a rel="noopener external nofollow noreferrer" href="${tplConfig.goUrl}" class="go-down-url hidden" target="_self" tittle="go-url"></a> </div> </div> </div> <div class="flex-end"> <a class="loading-btn go-down-btn" href="javascript:void(0);" target="_self" >下载</a > </div> `;
const tpl = ` <div class="loading-item ${tplConfig.loadingType} hidden"> <div class="flex loading-tip ${tplConfig.tipType}"> <i class="iconfont icon-snapchat-fill ${ tplConfig.loadingType === "loading-download" && "hidden" }"></i> <div class="loading-text"> ${tplConfig.tipsText} </div> </div> ${ tplConfig.loadingType === "loading-others" ? othersTpl : tplConfig.loadingType === "loading-download" ? downloadTpl : "" } </div> `;
goBox.innerHTML = tpl; const loadingItem = document.querySelector(".go-box .loading-item"); loadingSafe.classList.add("fadeOutUp", "fade-animate"); loadingItem.classList.remove("hidden"); loadingItem.classList.add("fadeInUp", "fade-animate"); if (getLinkUrl && getLinkUrl.isDownload) downloadValidate(config, getLinkUrl); };
goInit(config); </script> </body> </html>
|