富聊审核后台优化脚本测试版

try to make bteeer the fuliao!

目前為 2018-12-01 提交的版本,檢視 最新版本

// ==UserScript==
// @name         富聊审核后台优化脚本测试版
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  try to make bteeer the fuliao!
// @author       yinchengnuo
// @match        http://*/*
// @grant        none
// ==/UserScript==
/* jshint -W097 */
var div = document.createElement("div");
div.style.width = '102px';
div.style.position = 'fixed';
div.style.right = '0px';
div.style.top = '0px';
div.style.Zindex = '1000000';
div.style.border = '1px solid black';
div.style.borderRadius = '8px';
div.style.opacity = '0.5';
div.className = 'refresh';
var center = document.createElement("input");
center.style.boxSizing = 'border-box';
center.style.width = '20px';
center.style.height = '18px';
center.style.border = '1px solid black';
center.style.textAlign = 'center';
center.style.fontSize = '14px';
center.style.verticalAlign = 'top';
center.style.borderTop = '0px';
center.style.borderTop = '0px';
center.placeholder = '秒';
var left = document.createElement("input");
left.type = 'submit';
left.value = 'ON';
left.style.width = '40px';
left.style.height = '18px';
left.style.fontSize = '8px';
left.type = 'submit';
left.style.borderTopLeftRadius = '8px';
left.style.borderBottomLeftRadius = '8px';
left.style.cursor = 'pointer';
var right = document.createElement("input");
right.value = 'OFF';
right.style.width = '40px';
right.style.height = '18px';
right.style.fontSize = '8px';
right.type = 'submit';
right.style.borderTopRightRadius = '8px';
right.style.borderBottomRightRadius = '8px';
right.style.cursor = 'pointer';
function insert() {
    div.appendChild(left);
    div.appendChild(center);
    div.appendChild(right);
    document.body.appendChild(div);
}
//指定页面产生定时刷新器
    if (location.href.match(/userHeadPicAction!userHeadCheckWomanRenzhen/g) ||  location.href.match(/userHeadPicAction!userHeadCheckAll/g) || location.href.match(/auditUserAciton!photoNoneblogindex/g) || location.href.match(/groupChatPicAction!listUntreated/g) || location.href.match(/groupAction!auditindex/g) || location.href.match(/videoFile!videoFileAuditList/g) || location.href.match(/userFilterwordAction!index/g) || location.href.match(/videoLivePic!getHotLiveVideoList/g) || location.href.match(/smallVideoAudit!getAuditList/g) || location.href.match(/imMsgAction!toAuditList/g) || location.href.match(/picture.audit/g) || location.href.match(/videoLivePic!liveAutoReviewList/g)) {
        insert();
    }
div.setAttribute("title","鼠标右键查看帮助");
div.oncontextmenu = function(){
    alert('    1 当前自动刷新器可在富聊后台审核系统的部分页面上使用,设定一个不小于10的数字作为自动刷新间隔。不建议过大。设定时间之后点击ON按钮,开始进入自动刷新模式。自动刷新器上面显示的数字就是距离下次页面刷新的时间。点击OFF按钮终止自动刷新。如果当前浏览器打开了多个页面都在使用当前自动刷新器,则对一个页面的刷新间隔修改会影响所有正在使用当前定时刷新器的刷新间隔。(既如果点击了某一个正在运行自的自动刷新器的OFF按钮,则所有正在使用当前定时刷新器的页面会在当前时间间隔结束时退出自动刷新模式。)\n    2 当前自动刷新器的存在主要是为了配合在常规和文字类部分模块审核时增加的进审提醒功能。当设定了固定的自动刷新时间,页面刷新后,如果有新的内容进审则当前选项卡的title会一直闪烁显示进审,提示当前页面有新内容进审。同时自动刷新不会停止。当点击了正在闪烁提醒的选项卡时,自动刷新自动停止,只有当当前进审内容提交之后,自动刷新模式才会重新开启,时间为之前设置的时间间隔。设置了进审提醒的模块有所有常规, 封面审核,私聊广告消息,敏感词报警处理。\n    3 在使用进审提醒时,一些有下级的模块(如头像审核中有“已认证”和“其他”两个下级模块), 应当将这些下级模块都在浏览器的新选项卡打开,(视频介绍和敏感词报警的各四个下级模块也不例外),否则会影响提醒效果!');
  return false;
}

var value;
var timer;

(function () {
    //自动刷新器逻辑部分(页面刷新后)
    if (document.cookie.match(/time=\d+/g)) {
        value = parseInt(document.cookie.match(/time=\d+/g)[0].match(/\d+/g)[0]);
        var temp = value;
        center.value = temp;
        //头像,随拍,群聊,群,敏感词报警进审提示
        if (location.href.match(/userHeadPicAction!userHeadCheckWomanRenzhen/g) ||  location.href.match(/userHeadPicAction!userHeadCheckAll/g) || location.href.match(/auditUserAciton!photoNoneblogindex/g) || location.href.match(/groupChatPicAction!listUntreated/g) || location.href.match(/groupAction!auditindex/g) || location.href.match(/videoFile!videoFileAuditList/g) || location.href.match(/userFilterwordAction!index/g)  || location.href.match(/videoLivePic!liveAutoReviewList/g)) {
            if($('img').length > 2) {
                                  var title = $('title').html();
                                  var i = 0;
                      setInterval(function () {
                          if (i % 2 == 0){
                       $('title').html(title);
                        }else {
                          $('title').html('进审');
                        }
                         i ++;
                        if (document.hidden === false){
                            clearInterval(timer);
                        }
                      }
                      ,500);
             }
            //封面进审提示
        } else if (location.href.match(/videoLivePic!getHotLiveVideoList/g)){
            if($('img').length > 0){
                                  var title = $('title').html();
                                  var i = 0;
                      setInterval(function () {
                          if (i % 2 == 0){
                       $('title').html(title);
                        }else {
                          $('title').html('进审');
                        }
                         i ++;
                          if (document.hidden === false){
                            clearInterval(timer);
                        }
                      }
                      ,500);
            }
            //小视频进审提示
        } else if (location.href.match(/smallVideoAudit!getAuditList/g)){
            if($('.box').length > 0){
                                  var title = $('title').html();
                                  var i = 0;
                      setInterval(function () {
                          if (i % 2 == 0){
                       $('title').html(title);
                        }else {
                          $('title').html('进审');
                        }
                         i ++;
                          if (document.hidden === false){
                            clearInterval(timer);
                        }
                      }
                      ,500);
            }
            //私聊广告消息进审提示
        } else if (location.href.match(/imMsgAction!toAuditList/g)) {
            setTimeout(function () {
                if($('.pag')[0].offsetHeight > 51 || $('.pag')[1].offsetHeight > 51 || $('.pag')[2].offsetHeight > 51){
                                  var title = $('title').html();
                                  var i = 0;
                      $('.content_div input:button').click(function () {
                          setTimeout(function () {
                              location.reload();
                          }, 500);
                       });
                      setInterval(function () {
                          if (i % 2 == 0){
                       $('title').html(title);
                        }else {
                          $('title').html('进审');
                        }
                         i ++;
                          if (document.hidden === false){
                            clearInterval(timer);
                        }
                      }
                      ,500);
            }
            }, 500);
            //公共图片进审提醒
        } else if (location.href.match(/picture.audit/g)) {
            $('.btn.border').first().click()
            if($('img').length > 2) {
                                  var title = $('title').html();
                                  var i = 0;
                      setInterval(function () {
                          if (i % 2 == 0){
                       $('title').html(title);
                        }else {
                          $('title').html('进审');
                        }
                         i ++;
                        if (document.hidden === false){
                            clearInterval(timer);
                        }
                      }
                      ,500);
             }
             $('#submitBut').click(function () {
                 $('.layui-layer').find('a:contains("确定")').click(function () {
                     location.reload();
                 })
             })
             document.onkeydown = function (e) {
                 console.log(e)
                 if (e.code === 'Enter' || e.code === 'NumpadEnter') {
                     $('.layui-layer').find('a:contains("确定")').click(function () {
                     location.reload();
                 })
                 }
             }
        }
        timer = setInterval(function () {
            if (temp) {
                temp--;
            center.value = temp;
            if (temp == 0) {
                //指定页面刷新
                if (location.href.match(/videoLivePic!getHotLiveVideoList/g) || location.href.match(/userHeadPicAction!userHeadCheckWomanRenzhen/g) ||  location.href.match(/userHeadPicAction!userHeadCheckAll/g) || location.href.match(/auditUserAciton!photoNoneblogindex/g) || location.href.match(/groupChatPicAction!listUntreated/g) || location.href.match(/groupAction!auditindex/g) || location.href.match(/videoFile!videoFileAuditList/g) || location.href.match(/smallVideoAudit!getAuditList/g) || location.href.match(/imMsgAction!toAuditList/g) || location.href.match(/userFilterwordAction!index/g)|| location.href.match(/picture.audit/g) || location.href.match(/videoLivePic!liveAutoReviewList/g)) {
                    location.reload();
                }
                temp = value;
                center.value = 0;
            }
            }
        }, 1000);
    }
    //直播截屏审核模块处理逻辑
    if (location.href.match(/videoLiveAuditAction!videoliveScreenAuditList/g)) {
        document.onreadystatechange = function () {
            if (document.readyState == 'complete') {
                //定义jQuery引用
                var $ = window.parent.$;
                //脚本控制面板写入
                $('<div class="mytool"style="float:right; margin: 8px; cursor: pointer; font-size: 12px;"><span class="how" style="font-size: 8px; color: blue;">如何使用?</span><span title="快捷键仅当鼠标移动到需要处罚的用户显示窗口上有效!!!" style="color:red;">快捷键:Q警告(取消)W下榜(取消)E禁播(取消)R推流 T换一批 </span><span style="font-weight:bold;"> 当前页面停留时间:</span><span class="keepTime" style="color:red; display:inline-block; width: 18px;font-weight:bold;text-align:right;">0</span><span> 秒 </span><span style="font-weight:bold;text-align:right;">刷新次数:</span><span class="refreshTimes" style="color:red;font-weight:bold;"> 0 </span><span> 次 </span><span style="font-weight:bold;">图片尺寸: </span><input class="big" type="radio" name="size"><span>大(210px) </span><input class="mid" type="radio" name="size"><span>中(170px) </span><input class="sma" type="radio" name="size" ><span>小(130px) </span><input class="aut" type="radio" name="size" ><span>自定义: </span><input class="autInp" type="input" style="width:24px; height:20px;"><span>(px)</span><span style="font-weight:bold;">浮动图片效果: </span><input class="mov" type="radio" name="hover"><span>开启 </span><input class="non" type="radio" name="hover"><span>关闭 </span><span style="font-weight:bold;"> 双击页面换一批: </span><input class="opendb" type="radio" name="dbclick"><span>开启 </span><input class="closedb" type="radio" name="dbclick"><span>关闭 </span></div>').appendTo('.toolbar');
                //页面载入运行
                //页面计时开始
                var keepTime = 0;
                  setInterval(function () {
                  $('.keepTime').html(keepTime);
                    keepTime ++;
                    if (keepTime = 40) {
                        $('.btn_blue').first().click();
                    }
                    }, 1000);
                if (document.cookie.match(/size=\d+/g) && document.cookie.match(/float=\d/g)  && document.cookie.match(/db=\d/g) && document.cookie.match(/refreshTimes=\d+/g)) {
                    //重新加载后根据缓存设置样式
                    var size = parseInt(document.cookie.match(/size=\d+;/g)[0].match(/\d+/g)[0]);
                    var float = parseInt(document.cookie.match(/float=\d;/g)[0].match(/\d/g)[0]);
                    var db = parseInt(document.cookie.match(/db=\d;/g)[0].match(/\d/g)[0]);
                    var refreshTimes = parseInt(document.cookie.match(/refreshTimes=\d+;/g)[0].match(/\d+/g)[0]);
	                $('.refreshTimes').html(refreshTimes);
                    setSize(size, float);
                    if (size == 130) {
                        $('.sma').attr('checked', true);
                        $('.autInp').attr('disabled', true);
                    } else if (size == 170) {
                        $('.mid').attr('checked', true);
                        $('.autInp').attr('disabled', true);
                    } else if (size == 210) {
                        $('.big').attr('checked', true);
                        $('.autInp').attr('disabled', true);
                    } else {
                        $('.aut').attr('checked', true);
                        $('.autInp').val(''+size);
                    }
                    if (float) {
                        $('.mov').attr('checked', true);
                    } else {
                        $('.non').attr('checked', true);
                    }
                    if (db) {
                        $('.opendb').attr('checked', true);
                        //双击自动刷新页面
                       $(document).dblclick(function () {
                             $('.btn_blue').first().click();
                         });
                    } else {
                        $('.closedb').attr('checked', true);
                    }
                } else {
                    //尺寸初始化
                    document.cookie = 'size=130;';
                    document.cookie = 'float=0;';
                    document.cookie = 'db=0;';
                    document.cookie = 'refreshTimes=0;';
                    var refreshTimes = 0;
                    $('.sma').attr('checked', true);
                    $('.non').attr('checked', true);
                    $('.autInp').attr('disabled', true);
                    $('.closedb').attr('checked', true);
                    setSize(130, 0);
                }
                //键盘控制部分
                $('.close').hide();
                $($('.content_div')[0]).on('mouseover', 'table', function (e) {
                    this.tabIndex = 0;
                    this.focus();
                    var Q = 0;
                    var W = 0;
                    var E = 0;
                    var width = document.body.offsetWidth;
                    this.style.outline="blue solid 2px";
                    this.onkeydown = function (e) {
                        if (e.code == 'KeyQ') {
                            if (Q % 2 == 0) {
                                document.body.onkeydown = null;
                                $(this).find('.btn_blue').filter(function (i, e) {
                                    if (e.value == '警告') {
                                        $(e).click();
                                    }
                                });
                                $('.showbox:animated').stop(true, true);
                                console.log(this.offsetTop);
                                if (this.offsetLeft + this.offsetWidth + 300 > width) {
                                    $('.showbox:visible')[0].style.left = this.offsetLeft - 300 +'px';
                                    $('.showbox:visible')[0].style.top = this.offsetTop+ 80 +'px';
                                } else {
                                    $('.showbox:visible')[0].style.left = this.offsetLeft + this.offsetWidth +'px';
                                    $('.showbox:visible')[0].style.top = this.offsetTop+ 80 +'px';
                                }
                                setTimeout(function () {
                                    document.body.tabIndex = 0;
                                    document.body.onkeydown = function (e) {
                                    if (e.code == 'KeyQ') {
                                            $('.showbox:visible').find('.btn_blue').eq(1).click();
                                            $('.showbox:animated').stop(true, true);
                                            $('.showbox #jg_div').find('h2>span').html('请选择警告的理由');
                                        }
                                    }
                                }, 1);
                                var name = $(this).find('a').html();
                                $('.showbox #jg_div').find('h2>span').html('请选择警告 '+ name.fontcolor('orange') +' 的理由');
                            }
                            Q ++;
                        }else if (e.code == 'KeyW') {
                            if (Q % 2 == 0) {
                                document.body.onkeydown = null;
                                $(this).find('.btn_blue').filter(function (i, e) {
                                    if (e.value == '下榜') {
                                        $(e).click();
                                    }
                                });
                                $('.showbox:animated').stop(true, true);
                                if (this.offsetLeft + this.offsetWidth + 300 > width) {
                                    $('.showbox:visible')[0].style.left = this.offsetLeft - 300 +'px';
                                    $('.showbox:visible')[0].style.top = this.offsetTop+ 80 +'px';
                                } else {
                                    $('.showbox:visible')[0].style.left = this.offsetLeft + this.offsetWidth +'px';
                                    $('.showbox:visible')[0].style.top = this.offsetTop+ 80 +'px';
                                }
                                setTimeout(function () {
                                    document.body.tabIndex = 0;
                                    document.body.onkeydown = function (e) {
                                    if (e.code == 'KeyW') {
                                            $('.showbox:visible').find('.btn_blue').eq(1).click();
                                        $('.showbox:animated').stop(true, true);
                                        }
                                    }
                                }, 1);
                                var name = $(this).find('a').html();
                                $('.showbox #xb_div').find('h2>span').html('请选择下榜 '+ name.fontcolor('orange') +' 的理由');
                            }
                            Q ++;
                        }else if (e.code == 'KeyE') {
                            if (Q % 2 == 0) {
                                document.body.onkeydown = null;
                                $(this).find('.btn_blue').filter(function (i, e) {
                                    if (e.value == '禁播') {
                                        $(e).click();
                                    }
                                });
                                $('.showbox:animated').stop(true, true);
                                if (this.offsetLeft + this.offsetWidth + 300 > width) {
                                    $('.showbox:visible')[0].style.left = this.offsetLeft - 300 +'px';
                                    $('.showbox:visible')[0].style.top = this.offsetTop+ 80 +'px';
                                } else {
                                    $('.showbox:visible')[0].style.left = this.offsetLeft + this.offsetWidth +'px';
                                    $('.showbox:visible')[0].style.top = this.offsetTop+ 80 +'px';
                                }
                                setTimeout(function () {
                                    document.body.tabIndex = 0;
                                    document.body.onkeydown = function (e) {
                                    if (e.code == 'KeyE') {
                                            $('.showbox:visible').find('.btn_blue').eq(1).click();
                                            $('.showbox:animated').stop(true, true);
                                        }
                                    }
                                }, 1);
                                var name = $(this).find('a').html();
                                $('.showbox #jb_div').find('h2>span').html('请选择禁播 '+ name.fontcolor('orange') +' 的时长');
                            }
                            Q ++;
                        }else if (e.code == 'KeyR') {
                            $(this).find('.btn_blue').filter(function (i, e) {
                                    if (e.value == '推流') {
                                        $(e).click();
                                    }
                                });
                        }else if (e.code == 'KeyT') {
                            $('.btn_blue').first().click();
                        }
                    }
                });
                $($('.content_div')[0]).on('mouseleave', 'table', function (e) {
                    this.tabIndex = 9999;
                    this.blur();
                    this.style.outline="none";
                    this.onkeydown = null;
                });
                $('.showpic').on('click', 'input', function (e) {
                    if ($(':animated').length) {
                        if (this.value == '警告') {
                            $(':animated').find('h2>span').html('请选择警告的理由');
                        } else if (this.value == '下榜') {
                                   $(':animated').find('h2>span').html('请选择下榜的理由');
                                   } else if (this.value == '禁播') {
                                 $(':animated').find('h2>span').html('请选择禁播的时长');
                        }
                        $(':animated').stop(true, true);
                        if ($('.showbox:visible')[0]) {
                            $('.showbox:visible')[0].style.position = 'absolute';
                            $('.showbox:visible')[0].style.left = '50%';
                            $('.showbox:visible')[0].style.top = '400px';
                            //$('.showbox:visible')[0].style.marginLeft = '-150px';
                            //$('.showbox:visible')[0].style.marginTop = '-100px';
                            } else {

                            }
                    }})
                $('.showbox td .btn_blue').click(function () {
                    $(':animated').stop(true, true);
                });
                
                //脚本控制面板事件处理
                $('.mytool').on('click', 'input', function (e) {
                    if ($(this).next().html().match(/\d+/g)) {
                        document.cookie = 'size=' + $(this).next().html().match(/\d+/g)[0] + ';';
                        $('.autInp').attr('disabled', true).val('');
                    } else if ($(this).next().html() == '自定义: ') {
                        $(this).next().next().attr('disabled', false);
                    } else if ($(this).hasClass('mov')){
                        document.cookie = 'float=1;';
                    } else if ($(this).hasClass('non')) {
                        document.cookie = 'float=0;';
                    }else if ($(this).hasClass('opendb')){
                        document.cookie = 'db=1;';
                    } else if ($(this).hasClass('closedb')) {
                        document.cookie = 'db=0;';
                    }
                });
                //设置点击文字触发单选和弹出说明
                $('.mytool').on('click', 'span', function (e) {
                    if ($(this).prev()[0].nodeName == 'INPUT') {
                        var classname = $(this).prev().attr('class');
                        classname = '.' + classname;
                        console.log(classname);
                        $(classname).click();
                    }
                });
                $('.mytool').on('mousedown', 'input', function (e) {
                        var classname = $(this).attr('class');
                        classname = '.' + classname;
                        console.log(classname);
                        $(classname).click();

                });
                $('.how').click(function () {
                    alert('    1 图片尺寸设置即直播截屏宽度设置,设置不同的宽度会按照图片原有比例对应设置图片高度。有大,中,小和自定义宽度,默认值为小(130px)。可根据个人喜好和电脑屏幕宽高设置,设置自定义宽度须先点击自定义按钮,随后进行设置。设置值为大于等于130小于等于25的纯阿拉伯数字。\n    2 浮动图片效果为设置之后,当鼠标移入到某个直播截屏图片上时,鼠标附近会生成一个宽度为250px,内容为当前鼠标所在图片的图片,并随鼠标移动。当图片移出这张图片,生成的图片消失。默认值为关闭。\n    3 当前脚本对截屏审核界面做了比较大的改动,为了尽可能多的展示图片内容。隐藏掉了 拉黑 推荐 按钮,并且将用户昵称,才艺,PK中,接收方,发起方这些文字信息做了简短处理。但是如果想查看完整的用户昵称信息,只需要将鼠标悬停在经过处理的昵称上就可以了。\n    4 双击页面换一批为,当选中开启后,在页面的任意地方双击会触发 换一批 按钮的单击执行。默认为关闭!\n 以上所有效果均为在当前页面设置,在提交 换一批 之后的所有此页面上生效。关闭当前选项卡之后所有设置的参数会被清空,再次打开请重新设置!\n    5 当鼠标移动到需要处罚的用户时,可以触发快捷键。鼠标移出时失效');
                })
                //自定义宽度容错
                $('.autInp').blur(function () {
                    if (parseInt(this.value.trim()) < 130) {
                        document.cookie = 'size=130;';
                        $('.autInp')[0].value = '130';
                        $('.autInp')[1].value = '130';
                        alert('设定宽度过小,已经为你设置为130px');
                    } else if (parseInt(this.value.trim()) > 250) {
                        document.cookie = 'size=250;';
                       $('.autInp')[0].value = '250';
                        $('.autInp')[1].value = '250';
                        alert('设定宽度过大,已经为你设置为250px');
                    } else if (parseInt(this.value.trim()) >= 130 && parseInt(this.value.trim()) <= 250) {
                        document.cookie = 'size=' + parseInt(this.value.trim()) +';';
                        $('.autInp')[0].value = parseInt(this.value.trim());
                        $('.autInp')[1].value = parseInt(this.value.trim());
                    } else {
                        alert('请输入设定宽度');
                        this.value = '167';
                    }
                });
                //页面自动滚动
                window.scrollTo(0, 72);
                //页面内文字不可选
                $('body').css('-webkit-user-select', 'none');
                //替换显示文字
                $('span:contains("才艺")').each(function (i, e) {
                    $(e).html('才');
                });
                //替换显示文字
                $('span:contains("PK")').each(function (i, e) {
                    $(e).html('');
                });
                //替换显示文字
                $('span:contains("发起方")').each(function (i, e) {
                    $(e).html('发');
                });
                //替换显示文字
                $('span:contains("接收方")').each(function (i, e) {
                    $(e).html('接');
                });
                //修复空白bug,设定单个用户界面最小宽高
                $('.showpic').css({
                    'margin': '0px 1px',
                    'float': 'none',
                    'display':'inline-block',
                    'margin-right': '-2px'
                }).children('table').css({
                    'width': '130px',
                    'margin': '0',
                    'height': '280px',
                    'padding': '0px'
                });
                //隐藏部分按钮,重新定义按钮样式
                $('table input:visible').css('width', (size || 130) / 3  + 'px').css('padding', '0px').css('margin', '0px').css('float', 'left').filter(function (i, e) {
                    if (e.value == '荐' || e.value == '拉黑' || e.value == '取荐') {
                        e.style.display = 'none';
                    } else if (e.value == '推流' || e.value == '禁播') {
                        e.style.width = size / 3  + 'px';
                        e.style.float = 'right';
                    }
                });
                //隐藏用户名,添加title属性显示用户名
                $("tbody tr:nth-child(2) td a").css({
                    'display': 'inline-block',
                    'width': ''+ (size || 130)/3-6 +'px',
                    'height': '12px',
                    'line-height':'12px',
                    'overflow': 'hidden',
                    'white-space': 'no-wrap',
                    'text-overflow': 'ellipsis'
                }).each(function (i, e) {
                    $(e).attr('title', $(e).html());
                });
                $("tbody tr:nth-child(2) td font").each(function (i, e) {
                    e.style.display = 'none';
                });
                //图片尺寸设置函数(是否浮动)
                function setSize(widt, bool) {
                    var bite = 1.8;
                    $('img').filter(function (i, e) {
                        if (e.width > 100) {
                            e.style.width = widt + 'px';
                            e.style.height = widt * bite + 'px';
                            if (bool) {
                                //鼠标移入移出显示隐藏图片
                                $(e).hover(function (e) {
                                    $('<img style="border: 6px solid #fff;" class="float" src=' + e.target.src + '></img>').css({
                                        'position': 'absolute',
                                        'width': '250px'
                                    }).appendTo('body');
                                }, function () {
                                    $('.float').remove();
                                });
                                //图片跟着鼠标移动同时根据鼠标位置设定图片相对于鼠标的位置
                                $(e).mousemove(function (e) {
                                    if (e.pageX <= 1150 && e.pageY <= 435) {
                                        $('.float').css({
                                            'left': e.pageX + 15 + 'px',
                                            'top': e.pageY + 15 + 'px'
                                        });
                                    } else if (e.pageX > 1150 && e.pageY <= 435) {
                                        $('.float').css({
                                            'left': e.pageX - 250 - 15 + 'px',
                                            'top': e.pageY + 15 + 'px'
                                        });
                                    } else if (e.pageX <= 1150 && e.pageY > 435) {
                                        $('.float').css({
                                            'left': e.pageX + 15 + 'px',
                                            'top': e.pageY - 350 - 15 + 'px'
                                        });
                                    } else if (e.pageX > 1150 && e.pageY > 435) {
                                        $('.float').css({
                                            'left': e.pageX - 250 - 15 + 'px',
                                            'top': e.pageY - 350 - 15 + 'px'
                                        });
                                    }
                                });
                            }
                        } else {
                            e.style.float = 'right';
                            e.style.width = '10x';
                        }
                    });
                }
                //压缩表格各行高度
                $(".showpic tbody tr:nth-child(1)").css('height', '190px');
                $(".showpic tbody tr:nth-child(2)").css('height', '10px');
                $(".showpic tbody tr:nth-child(3)").css('height', '10px');
                $(".showpic tbody tr:nth-child(4)").css('height', '10px');
                $(".showpic tbody tr td").css('padding', '0px');
                $('<div class="loading">加载中,请稍后</div>').css({
                    'display': 'none',
                    'width': '300px',
                    'height': '40px',
                    'background-color': '#f40',
                    'border-radius': '5px',
                    'opacity': '0.7',
                    'color': '#fff',
                    'position': 'fixed',
                    'left':'50%',
                    'bottom': '50%',
                    'margin-left': '-150px',
                    'margin-top': '-20px',
                    'text-align': 'center',
                    'line-height': '40px',
                    'font-size':'28px'
                }).appendTo('body');
                $('.toolbar .btn_blue').first().click(function () {
                    $('.loading').css('display', 'block');
                    var i = 0;
                    setInterval(function () {
                       if (i % 3 == 0) {
                         $('.loading').html('. 加载中,请稍后 .');
                       } else if ( i % 3 == 1){
                         $('.loading').html('. . 加载中,请稍后 . .');
                       } else if (i % 3 == 2){
                         $('.loading').html('. . . 加载中,请稍后 . . .');
                       }
                        i ++;
                    }, 200);
                    refreshTimes ++;
                    document.cookie = 'refreshTimes='+ refreshTimes +';';
                });
                $('.toolbar .btn_blue:nth-child(1)').first().click(function () {
                    $('.loading').css('display', 'block');
                    var i = 0;
                    setInterval(function () {
                       if (i % 3 == 0) {
                         $('.loading').html('. 加载中,请稍后 .');
                       } else if ( i % 3 == 1){
                         $('.loading').html('. . 加载中,请稍后 . .');
                       } else if (i % 3 == 2){
                         $('.loading').html('. . . 加载中,请稍后 . . .');
                       }
                        i ++;
                    }, 200);
                     refreshTimes ++;
                    document.cookie = 'refreshTimes='+ refreshTimes +';';
                });
            }
        }
    }
})()
//自动刷新器启动逻辑部分
left.onclick = function () {
    clearInterval(timer);
    if (center.value && parseInt(center.value)>=10) {
        value = parseInt(center.value);
        document.cookie = 'time=' + value + ';';
        var temp = value;
        timer = setInterval(function () {
            temp--;
            center.value = temp;
            if (temp == 0) {
                location.reload();
                temp = value;
                center.value = temp;
            }

        }, 1000);
    } else {
        alert('兄嘚,输入大于等于10的纯数字');
        center.value = 20;
    }
}
//自动刷新器结束逻辑部分
right.onclick = function () {
    clearInterval(timer);
    center.value = '';
    document.cookie = 'time=00;';
}
//writen by Chengnuo Yin
//date 2018/9/24
// Your code here...

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址