zoukankan      html  css  js  c++  java
  • 耗子大叔弹窗来自百度搜索引擎导流的弹窗JS源码赏析

    刚看到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-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>
  • 相关阅读:
    c#对文件的读写
    win form treeview添加节点
    泛型的学习
    委托学习
    C#连接Oracle数据库解决报错(需要安装Oracle客户端软件8.1.7)的问题
    C#和Python 图片和base64的互转
    反射学习:(System.Reflection)
    objectivec:继承
    prism关键概念:
    三层架构的学习感悟(一)
  • 原文地址:https://www.cnblogs.com/zhangfengshi/p/10626472.html
Copyright © 2011-2022 走看看