此插件用于域名防红,在一定程度上可以规避被微信qq拦截域名,之前也有看到过别的朋友写过这个,但是写的不是特别好,代码各种问题,最重要就是,他们写的拦截规则不人性化,是直接拦截qq浏览器,导致用户在自己安装的qq浏览器上访问网站还是会被拦截,不仅仅是qq微信拦截,并且qq微信都是分开的,这几天自己写了一个插件,将qq微信拦截整合为一个插件,并且代码极小,支持自定义html和css,且只有在qq和微信里面打开才会拦截,其他的别的浏览器都是正常的,下面是效果图
此效果仅仅是我自己美化的效果,你们也可以自定义美化,此插件为本人原创,原创不易,请勿二次售卖,另外,献上我的这个插件的自定义css和html代码
CSS
/* 二次元风格全局设定 */
:root {
--main-color: #ff4466; /* 主色调 - 亮粉色 */
--bg-image: url('https://p2.a.yximgs.com/ufile/atlas/NTE5MjY1MDQzMzg2OTgxNjE5M18xNjQwMTgxOTcxOTA0_5.jpg'); /* 替换成您的背景图地址 */
--text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}
.anti-redir-container {
position: relative;
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #f8f9fa, #e9ecef);
background-image: var(--bg-image);
background-size: cover;
background-attachment: fixed;
padding: 20px;
font-family: 'Comic Sans MS', cursive, sans-serif; /* 二次元风格字体 */
}
.header-section {
text-align: center;
margin-bottom: 30px;
animation: fadeIn 1s ease; /* 淡入动画 */
}
.icon {
font-size: 36px;
color: var(--main-color);
margin-bottom: 10px;
display: inline-block;
text-shadow: var(--text-shadow);
}
h1 {
font-size: 28px;
color: #333;
margin-bottom: 10px;
text-shadow: var(--text-shadow);
}
.detect-info {
font-size: 16px;
color: #666;
margin-bottom: 30px;
text-shadow: var(--text-shadow);
}
.guide-section {
width: 100%;
max-width: 500px;
margin-bottom: 30px;
background: rgba(255,255,255,0.95);
padding: 20px;
border-radius: 16px;
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
animation: slideIn 1s ease; /* 滑动进入动画 */
}
h3 {
color: #333;
margin-bottom: 15px;
font-size: 20px;
text-align: center;
text-shadow: var(--text-shadow);
}
.step-list {
list-style: none;
padding: 0;
}
.step-list li {
margin-bottom: 12px;
padding-left: 30px;
position: relative;
font-size: 17px;
color: #555;
line-height: 1.5;
}
.step-list li::before {
content: attr(class);
position: absolute;
left: 0;
top: 2px;
width: 24px;
height: 24px;
background: var(--main-color);
color: white;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
font-size: 14px;
text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.tip-section {
width: 100%;
max-width: 500px;
background: rgba(220, 238, 255, 0.9); /* 浅蓝色提示框 */
padding: 15px;
border-radius: 12px;
margin-bottom: 30px;
font-size: 16px;
color: #444;
line-height: 1.6;
animation: fadeIn 1.2s ease;
}
.copyright-section {
font-size: 14px;
color: #888;
text-align: center;
animation: fadeIn 1.5s ease;
}
/* 二次元风格动画 */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slideIn {
from { transform: translateX(-50px); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
/* 响应式优化 */
@media (max-width: 768px) {
.guide-section,
.tip-section {
padding: 15px;
}
}
HTML
<div class="anti-redir-container">
<div class="header-section">
<span class="icon">❗</span>
<h1>请使用浏览器打开本网站</h1>
<p class="detect-info">检测到您正在使用<span class="app-name">QQ内置浏览器</span>访问</p>
</div>
<div class="guide-section">
<h3>操作指南</h3>
<ol class="step-list">
<li><span class="step-num">1</span> 点击QQ右上角的<span class="highlight">…菜单按钮</span></li>
<li><span class="step-num">2</span> 选择<span class="highlight">"在浏览器打开"</span>选项</li>
<li><span class="step-num">3</span> 在浏览器中继续浏览本网站</li>
</ol>
</div>
<div class="tip-section">
<p>QQ内置浏览器可能会限制部分功能,使用系统浏览器可获得完整体验。</p>
</div>
<div class="copyright-section">
<p>感谢您的理解与支持!<br>Copyright © <span class="site-name">lmsg.top</span> All rights reserved</p>
</div>
</div>
全局背景图可以在css代码开头中修改
插件下载: