耗子大叔弹窗来自百度搜索引擎导流的弹窗JS源码赏析
2024-10-21 11:57:07
刚看到https://coolshell.cn/articles/9308.html 耗子大叔评价梁斌站点被百度封杀事件言论 然后在自己个人网站酷壳网站上发布了一段JS代码 当请求来自百度导流过来的链接 将弹窗告知警示,下面是那段弹窗JS源码 ,技术人还是关注技术细节 ,分享给大家:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="https://coolshell.cn/wp-content/themes/inove/js/jquery.bpopup-0.8.0.min.js"></script> <script type="text/javascript">
;(function($) {
$(function() {
var url=document.referrer;
if ( url && url.search("http://")>-1) {
var refurl = url.match(/:\/\/(.[^/]+)/)[1];
if(refurl.indexOf("baidu.com")>-1){
$('#nobaidu_dlg').bPopup();
}
}
}); })(jQuery);
</script> <div id="nobaidu_dlg" style="background-color:#fff; border-radius:15px;color:#000;display:none;padding:20px;min-width:450px;min-height:180px;">
<img src="https://coolshell.cn/wp-content/themes/inove/img/nobaidu.jpg" align="left">
<p style="margin-left:200px;margin-top: 20px; line-height: 30px;">
检测到你还在使用百度这个搜索引擎,<br/>
做为一个程序员,这是一种自暴自弃!<br/>
<br/>
</p>
<p align="center" style="margin-top:20px;">
<b><a href="https://coolshell.cn/articles/7186.html">作环保的程序员,从不用百度开始!</a></b>
</p>
</div>
最新文章
- sip协议注册时response值的计算方法
- ubuntu-16.4TLS安装QQ
- dede 数据库类使用列表
- 结合Apache和Tomcat实现集群和负载均衡 JK 方式
- ERWin 7.2下载安装及注册机
- POJ3352 Road Construction(边双连通分量)
- Js 时间与字符串转示例
- BZOJ 2151 种树
- iOS调用系统声音与振动
- struts2的配置文件
- Python 中的登陆获取数据跳转页面(不含数据库)
- 深入探究Lua的GC算法(下)-《Lua设计与实现》
- ubuntu 安装 npm、nodejs 各种问题
- gitlab 存储仓库目录设置及数据迁移
- webpack根据开发与生产环境配置不同变量--webpack.DefinePlugin
- Node.js+Koa开发微信公众号个人笔记(二)响应事件
- 【转】Source Insight中文注释为乱码的解决办法
- Using Service Workers
- JQuery|jstl判断是否为空
- Ubuntu14.04 64bit 编译安装nginx1.7+php5.4+mysql5.6
热门文章
- vm虚拟机安装centos7。克隆镜像以及快照
- PyQt(Python+Qt)学习随笔:gridLayout的layoutRowMinimumHeight和layoutColumnMinimumWidth属性
- 【坑点集合】C++ STL 使用注意事项整理
- 题解-CF436E Cardboard Box
- HDU3306 Another kind of Fibonacci
- js中的bind、apply、call、callee、caller的区别
- 从0到1实战移动Web App开发
- ab test压力测试
- git+pycharm结合使用
- 推荐系统实践 0x0f AutoRec