富聊审核脚本

try to make work easy

目前為 2019-01-03 提交的版本,檢視 最新版本

// ==UserScript==
// @name         富聊审核脚本
// @namespace    http://tampermonkey.net/
// @version      5.7.9
// @description  try to make work easy
// @author       yinchengnuo
// @match        http://*/*
// @grant        none
// ==/UserScript==
/* jshint -W097 */
/* 功能概述 */
/* 1 常规文字进审提醒 回车提交 */
/* 2 截屏UI优化 键盘操作 数量统计 推流无弹窗 可选的双击换一批/右键推流/隐藏按钮/图片尺寸 */
/* 3 重点流UI优化 批量叉掉无弹窗 可选的双击换一批 */
/* 4 坐等UI优化 悬浮按钮 可选的双击换一批 */
/* 。。。 */
(function($) {
    //进审提醒功能
    const $refresherInsert = (bool) => {
        //插入自定刷新器
        $('<div class="refresh" title="鼠标右键查看帮助" style="width: 70px; height: 17px; overflow: hidden; position: fixed; right: 0px; top: 0px; border: 1px solid black; border-radius: 8px; opacity: 0.5; font-size: 12px;"><button class="refresherLeft" style="font-size: 10px; box-sizing: border-box; width: 24px; height: 17px; padding: 0px; float: left; cursor: pointer;">O</button><input class="refresherCenter" maxlength="3" placeholder = "s" type="text" style="box-sizing: border-box; width: 22px; height: 17px; text-align: center; float: left; font-size: 10px;"></input><button class="refresherRight" style="font-size: 10px; box-sizing: border-box; width: 22px; height: 17px; padding: 0px; float: left; cursor: pointer;">F</button></div>').appendTo("body");
        const showTime = $(".refresherCenter");
        let timer = null;
        //定义自定刷新器点击事件
        $(".refresh").on("click", "button", function() {
            if (this.className === "refresherLeft") {
                clearInterval(timer);
                const time = parseInt(showTime.val());
                if (time && time >= 10) {
                    document.cookie = `time=${time};`;
                    let value = time;
                    timer = setInterval(() => {
                        value--;
                        showTime.val(value);
                        if (value === 0) {
                            location.reload();
                        }
                    }, 1000);
                } else {
                    alert("请输入大于等于10的纯数字");
                    showTime.val("20");
                }
            } else if (this.className === "refresherRight") {
                clearInterval(timer);
                showTime.val("");
                document.cookie = "time=0;";
            }
        });
        //使用说明
        $(".refresh").on("contextmenu", () => {
            alert("    1 当前自动刷新器可在富聊后台审核系统的部分页面上使用,设定一个不小于10的数字作为自动刷新间隔。不建议过大。设定时间之后点击ON按钮,开始进入自动刷新模式。自动刷新器上面显示的数字就是距离下次页面刷新的时间。点击OFF按钮终止自动刷新。如果当前浏览器打开了多个页面都在使用当前自动刷新器,则对一个页面的刷新间隔修改会影响所有正在使用当前定时刷新器的刷新间隔。(既如果点击了某一个正在运行自的自动刷新器的OFF按钮,则所有正在使用当前定时刷新器的页面会在当前时间间隔结束时退出自动刷新模式。)\n    2 当前自动刷新器的存在主要是为了配合在常规和文字类部分模块审核时增加的进审提醒功能。当设定了固定的自动刷新时间,页面刷新后,如果有新的内容进审则当前选项卡的title会一直闪烁显示进审,提示当前页面有新内容进审。同时自动刷新不会停止。当点击了正在闪烁提醒的选项卡时,自动刷新自动停止,只有当当前进审内容提交之后,自动刷新模式才会重新开启,时间为之前设置的时间间隔。设置了进审提醒的模块有所有常规, 封面审核,私聊广告消息,敏感词报警处理。\n    3 在使用进审提醒时,一些有下级的模块(如头像审核中有“已认证”和“其他”两个下级模块), 应当将这些下级模块都在浏览器的新选项卡打开,(视频介绍和敏感词报警的各四个下级模块也不例外),否则会影响提醒效果!");
            return false;
        });
        //刷新后根据设定值继续刷新
        if (document.cookie.match(/time=\d+/g)) {
            const time = parseInt(document.cookie.match(/time=\d+/g)[0].match(/\d+/g)[0]);
            if (time) {
                let value = time;
                showTime.val(value);
                timer = setInterval(() => {
                    value--;
                    showTime.val(value);
                    if (value === 0) {
                        location.reload();
                    }
                }, 1000);
            }
        }
        //进审提醒,选定选项卡后停止刷新
        if (bool) {
            const title = $("title").html();
            let i = 0;
            setInterval(function() {
                if (i % 2 == 0) {
                    $("title").html(title);
                } else {
                    $("title").html("进审");
                }
                i++;
                if (document.hidden === false) {
                    clearInterval(timer);
                }
            }, 500);
        }
    };
    //设置直播截屏图片尺寸
    const setSize = (width) => {
        let bite = 1.8;
        $("img").filter(function(i, e) {
            if (e.width > 100) {
                e.style.width = width + "px";
                e.style.height = width * bite + "px";
            } else {
                e.style.float = "right";
                e.style.width = "10x";
            }
        });
    }
    //设置直播截屏按钮尺寸
    const setButtonSize = (size) => {
        $("table input:visible").css({
            "width": size / 3 + "px",
            "padding": "0",
            "margin": "0",
            "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";
            }
        });
    }
    //设置直播截屏昵称尺寸
    const setTitleSize = (size) => {
        $("tbody tr:nth-child(2) td a").css({
            "display": "inline-block",
            "width": size / 3 - 6 + "px",
            "height": "12px",
            "line-height": "12px",
            "overflow": "hidden"
        }).each(function(i, e) {
            $(e).parent().parent().parent().attr("title", $(e).html());
        });
    }
    //回车提交功能
    const enterLogin = (btn) => {
        $(document).one('keydown', function(e) {
            if (e.key === "Enter") {
                btn.click();
            }
        });
    }
    //取消动画功能
    const cancelAnimate = () => {
        $(':animated').stop(true, true);
    }
    //推流成功后取消推流弹窗记录审核记录
    const retoperateEmpasisUser = (response) => {
            var ret = eval('(' + response.responseText + ')');
            var roomid = ret.roomid;
            var userid = ret.userid;
            if(ret.res==1){
                $("#empasis_"+userid+"_"+roomid).val(1);
                $("#div_"+userid+"_"+roomid).find('table input:button').each(function (i, e){
                                                                                 if (e.value == '推流') {
                                                                                     $(e).css('color', 'red').val('已推');
                                                                                 }
                                                                             });
                $('.success').slideDown(66, () => {
                    setTimeout(() => {
                        $('.success').slideUp(66);
                    }, 222)
                })
            }else{
                alert("操作失败,请关闭插件联系成诺");
            }
        }
    //去掉兼容的Ajax对象
    const Ajax={
        xmlhttp:function (){
            return new XMLHttpRequest();
        }
    };
    //Ajax的请求方法
    Ajax.Request=function (){
        if(arguments.length<2)return ;
        var para = {asynchronous:true,method:"GET",parameters:""};
        for (var key in arguments[1]){
            para[key] = arguments[1][key];
        }
        var _x=Ajax.xmlhttp();
        var _url=arguments[0];
        if(para["parameters"].length>0) {
            para["parameters"]+='&_=';
        }
        if(para["method"].toUpperCase()=="GET") {
            _url+=(_url.match(/\?/)?'&':'?')+para["parameters"];
        }
        _x.open(para["method"].toUpperCase(),_url,para["asynchronous"]);
        _x.onreadystatechange=function (){
            if(_x.readyState==4){
                if(_x.status==200)
                    para["onComplete"]?para["onComplete"](_x):"";
                else{
                    para["onError"]?para["onError"](_x):"";
                }
            }
        };
        if(para["method"].toUpperCase()=="POST")_x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
        for (var ReqHeader in para["setRequestHeader"]){
            _x.setRequestHeader(ReqHeader,para["setRequestHeader"][ReqHeader]);
        }
        _x.send(para["method"].toUpperCase()=="POST"?(para["postBody"]?para["postBody"]:para["parameters"]):null);
        return _x;
    };
    //推流
    const addEmpasisUser = (roomid,userid) =>{
            if(roomid==null||roomid<=0){
                alert("直播结束了");
                return;
            }
            if(userid==null||userid<=0){
                alert("直播结束了");
                return;
            }
            var arrs = "&roomid="+roomid+"&userid="+userid;
            var myAjax=new Ajax.Request('videoLiveAuditAction!addEmpasisUser.action',{method:'post',parameters:arrs,onComplete:retoperateEmpasisUser,onError:error});
    }
    //叉掉重点流后取消队列无人弹窗提示,取消队列有人时的渲染,定义当前批量叉数量,根据数量判断是否是最后一次请求成功,成功后刷新页面
    let _num  = 0;
    let listdate = [];
    const retoperateList = (response) => {
        var ret = eval('(' + response.responseText + ')');
        var oldrid = ret.roomid;
        var uid = ret.userid;
        var roomids = ret.roomids;
        if(ret.res!=1 || ret.list==null || ret.list.length==0){
            $("#div_"+uid+"_"+oldrid).removeClass('marked').hide();
            listdate = [];
            _num  = 0;
            $('.listNull').slideDown(66, () => {
                setTimeout(() => {
                    $('.listNull').slideUp(66);
                }, 222)
            })
            return;
        }
        $("#div_"+uid+"_"+oldrid).removeClass('marked').hide();
        listdate.push(1);
        //根据临时数组的长度判断当前批次批量×的每一个是否是最后一个请求成功的
        if (listdate.length === _num) {
            location.href='http://wxedmaxma.ipaychat.com/videoLiveAuditAction!videoliveFlowAuditList.action';
        }
    }
    //叉
    const singleRef = (userid,roomid,type) => {
        if (roomid.length <= 0){
            alert("房间ID不能为空");
            return;
        }
        if (userid.length <= 0){
            alert("用户ID不能为空!");
            return;
        }
        var roomids = $("#roomids").val();
        var arrs = "roomid="+roomid+"&userid="+userid+"&roomids="+roomids+"&type="+type;
        var myAjax=new Ajax.Request('videoLiveAuditAction!getvideoliveFlowAuditListSinglejson.action',{method:'post',parameters:arrs,onComplete:retoperateList,onError:error});
    }
    //重点流IU及叉后重新渲染
    const rander =  (width, height) => {
            $('span').each(function(i, e) {
                if (e.innerHTML === '才艺') {
                    e.innerHTML = '才';
                } else if (e.innerHTML === 'PK') {
                    e.innerHTML = '';
                }
            });
            setTimeout(() => {
                $('object').attr('width', width).attr('height', height);
                $('embed').attr('width', width).attr('height', height);
                $('.content td').css('padding', '0');
                $('div[id^="div"]:visible').css('float', 'none').css('display', 'inline-block').css('min-height', '260px');
                $('.content_div>table div[id^="div"]>table').css('width', '153px')
                $('.content').css('margin-right', '0px').css('margin-bottom', '0px')
                $('.content_div>table div[id^="div"]>table tr:nth-child(4) td').children(':visible:not("a")').css('float', 'left').css('width', '43px').css('margin', '0');
                $('.content_div>table div[id^="div"]>table tr:nth-child(2) a').css('float', 'left').css('width', '60px').css('white-space', 'nowrap').css('overflow', 'hidden');
                $('.content_div>table div[id^="div"]>table tr:nth-child(4) td').children('a').css('float', 'left')
                $('.content_div>table div[id^="div"]>table tr:nth-child(4) td img').css('width', '20px').css('height', '20px');
                $('.content_div>table div[id^="div"]>table tr:nth-child(4) a').click(function () {
                    setTimeout(() => {
                        rander(width, height);
                    }, 1400)
                })
                $('.content_div>table div[id^="div"]>table tr:nth-child(5) td').css('text-align', 'center').hover(function () {
                    $(this).css('background-color', '#ccc')
                }, function () {
                    $(this).css('background-color', '#fff')
                }).on('click', function () {
                    $(this).children('input').click((e) => {
                        e.stopPropagation();
                    });
                    $(this).children('input').click();
                });
            }, 300);
        }
    //部分(常规文字)页面进审提醒
    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(/videoLivePic!liveAutoReviewList/g) || location.href.match(/userFilterwordAction!index/g) || location.href.match(/videoFile!videoFileAuditList/g)) {
        enterLogin($('a[title="提交"]').first().length ? $('a[title="提交"]').first() : $('a[title="操 作"]').first());
        $("img").length > 2 ? $refresherInsert(true) : $refresherInsert();
    } else if (location.href.match(/videoLivePic!getHotLiveVideoList/g)) {
        $("img").length > 0 ? $refresherInsert(true) : $refresherInsert();
    } else if (location.href.match(/smallVideoAudit!getAuditList/g)) {
        enterLogin($('a[title="提交"]').first());
        $(".box").length > 0 ? $refresherInsert(true) : $refresherInsert();
    //私聊广告消息进审提醒
    } else if (location.href.match(/imMsgAction!toAuditList/g)) {
        setTimeout(() => {
            if ($(".pag")[0].offsetHeight > 51 || $(".pag")[1].offsetHeight > 51 || $(".pag")[2].offsetHeight > 51) {
                $refresherInsert(true);
                $(".content_div input:button").click(() => {
                    setTimeout(() => {
                        location.reload();
                    }, 500);
                });
            } else {
                $refresherInsert();
            }
        }, 500);
    //直播截屏审核
    } else if (location.href.match(/videoLiveAuditAction!videoliveScreenAuditList/g)) {
        //提交londing动画
        $('<div class="loading" style="display: none; cursor: pointer; width: 300px; height: 40px; background: #f40; border-radius: 8px; opacity: 0.8; color: #fff; position: fixed; left: 50%; top: 50%; margin-left: -150px; margin-top: -20px; line-height: 40px; text-align: center; font-size: 28px;">提交中,请稍后</div>').appendTo("body");
        //控制面板写入
        $('<div class="mytool"style="float:right; margin: 8px 0px;font-size: 12px; position: absolute; right: 160px; bottom: 0px;"><span class="how" style="font-size: 8px; color: blue; cursor: pointer; ">如何使用?</span><span style="font-weight:bold;"> 当前页面停留时间:</span><span class="keepTime" style="color:red; min-width: 16px; display:inline-block;font-weight:bold;text-align:right;">0</span><span> 秒 </span><span style="font-weight:bold;"> 刷新次数:</span><span class="refreshTimes" style="color:red;display:inline-block;font-weight:bold;text-align:right;">0</span><span> 次 </span><span style="font-weight:bold;"> 已审核:</span><span class="total" style="color:red;display:inline-block;font-weight:bold;text-align:right;">0</span><span> 张 </span><label for="autInput" style="font-weight:bold; cursor: pointer; ">图片尺寸:</label><input id="autInput" type="input" style="width:22px; height:16px; font-size: 12px; cursor: pointer; "><span>(px)</span><label for="rightPush" style="font-weight:bold; cursor: pointer; "> 右键推流:</label><input id="rightPush" type="checkbox" style="vertical-align: middle; cursor: pointer; width: 12px; height: 12px;">&nbsp&nbsp<label for="hdButton" style="font-weight:bold; cursor: pointer; "> 隐藏按钮:</label><input id="hdButton" type="checkbox" style="vertical-align: middle; cursor: pointer; width: 12px; height: 12px;">&nbsp&nbsp<label for="dbClick" style="font-weight:bold; cursor: pointer; ">双击页面换一批:</label><input id="dbClick" type="checkbox" style="vertical-align: middle; cursor: pointer; width: 12px; height: 12px;"></div>').appendTo(".toolbar:last");
        $('<div class="success" style="display: none; cursor: pointer; width: 200px; height: 40px; background: #f40; border-radius: 8px; opacity: 0.8; color: #fff; position: fixed; left: 50%; top: 72px; margin-left: -150px; line-height: 40px; text-align: center; font-size: 28px;">推流成功</div>').appendTo("body");
        //定义参数变量
        let keepTime = 0, size, db, hd, refreshTimes = 0, demon = 0, total = 0, rp;
        //当前页面停留时间开始计时
        setInterval(() => {
            $(".keepTime").html(keepTime);
            keepTime++;
        }, 1000);
        $(".toolbar .btn_blue").first().add('.toolbar .btn_blue:nth-child(1)').click(function() {
            $(".toolbar .btn_blue").hide();
            $(".loading").css("display", "block");
            let i = 0;
            setInterval(() => {
                if (i % 4 == 0) {
                    $(".loading").html("提交中,请稍后");
                } else if (i % 4 == 1) {
                    $(".loading").html(". 提交中,请稍后 .");
                } else if (i % 4 == 2) {
                    $(".loading").html(". . 提交中,请稍后 . .");
                } else if (i % 4 == 3) {
                    $(".loading").html(". . . 提交中,请稍后 . . .");
                }
                i++;
            }, 200);
            //记录审核刷新次数和已审核
            document.cookie = `refreshTimes=${parseInt(document.cookie.match(/refreshTimes=\d+/g)[0].match(/\d+/g)[0]) + 1};`;
            document.cookie = `total=${parseInt(document.cookie.match(/total=\d+/g)[0].match(/\d+/g)[0]) + $('.content_div table').length};`;
        });
        //页面加载完成后对图片进行重新渲染
        document.onreadystatechange = () => {
            if (document.readyState == "complete") {
                //取消出发弹窗动画
                $('.close').hide();
                $((".showpic tbody tr:nth-child(3) input:visible")).click(function() {
                    setTimeout(() => {
                        cancelAnimate();
                        const target = this.parentNode.parentNode.parentNode.parentNode;
                        if (target.offsetLeft + target.offsetWidth + 300 > document.body.offsetWidth) {
                            $('.showbox:visible')[0].style.left = target.offsetLeft - 300 + 'px';
                            $('.showbox:visible')[0].style.top = target.offsetTop + 80 + 'px';
                        } else {
                            $('.showbox:visible')[0].style.left = target.offsetLeft + target.offsetWidth + 'px';
                            $('.showbox:visible')[0].style.top = target.offsetTop + 80 + 'px';
                        }
                        $('.showbox:visible').on('click', 'input', function(e) {
                            cancelAnimate();
                        });
                    }, 10);
                });
                //根据设定参数添加相应功能
                if (document.cookie.match(/size=\d+/g) && document.cookie.match(/db=\d/g) && document.cookie.match(/hd=\d/g) && document.cookie.match(/refreshTimes=\d+/g) && document.cookie.match(/total=\d+/g) && document.cookie.match(/rp=\d/g)) {
                    size = parseInt(document.cookie.match(/size=\d+;/g)[0].match(/\d+/g)[0]);
                    db = parseInt(document.cookie.match(/db=\d/g)[0].match(/\d/g)[0]);
                    hd = parseInt(document.cookie.match(/hd=\d/g)[0].match(/\d/g)[0]);
                    rp = parseInt(document.cookie.match(/rp=\d/g)[0].match(/\d/g)[0]);
                    refreshTimes = parseInt(document.cookie.match(/refreshTimes=\d+/g)[0].match(/\d+/g)[0]);
                    total = parseInt(document.cookie.match(/total=\d+/g)[0].match(/\d+/g)[0]);
                    $('.refreshTimes').html(refreshTimes);//刷新次数
                    $('.total').html(total);//已审核
                    setSize(size);//设置图片尺寸
                    setButtonSize(size);//设置按钮尺寸
                    setTitleSize(size);//设置昵称
                    $("#autInput").val(size);
                    if (db) {//是否双击换一批
                        $("#dbClick").attr("checked", true);
                        $(document).one('dblclick', () => {
                            $(".btn_blue").first().click();
                        });
                    }
                    if (hd) {//是否隐藏按钮
                        $("#hdButton").attr("checked", true);
                        $("table input:visible").add(".showpic tbody tr:nth-child(3)").addClass('hidebtn').hide();
                    }
                    if (rp) {//是否鼠标右键推流
                        $("#rightPush").attr("checked", true);
                    }
                //首次开启截屏审核的默认样式
                } else {
                    document.cookie = "size=131;";
                    document.cookie = "db=0;";
                    document.cookie = "hd=0;";
                    document.cookie = "rp=0;";
                    document.cookie = 'refreshTimes=0;';
                    document.cookie = 'demon=0;';
                    document.cookie = 'total=0;';
                    $("#autInput").val(131);
                    setSize(131);
                    setButtonSize(130);
                    setTitleSize(130);
                }
                //控制面板事件处理
                $(".mytool").on("click", "input", function(e) {
                    if (this.id === 'dbClick') {
                        if ($(this).is(':checked')) {
                            document.cookie = "db=1;";
                        } else {
                            document.cookie = "db=0;";
                        }
                    } else if (this.id === 'hdButton') {
                        if ($(this).is(':checked')) {
                            document.cookie = "hd=1;";
                        } else {
                            document.cookie = "hd=0;";
                        }
                    } else if (this.id === 'rightPush') {
                        if ($(this).is(':checked')) {
                            document.cookie = "rp=1;";
                        } else {
                            document.cookie = "rp=0;";
                        }
                    }
                });
                //弹出使用说明
                $(".how").click(function() {
                    alert("    1 图片尺寸设置即直播截屏宽度设置,设置不同的宽度会按照图片原有比例对应设置图片高度。。可根据个人喜好和电脑屏幕宽高设置,设置自定义宽度须先点击自定义按钮,随后进行设置。设置值为大于等于130小于等于25的纯阿拉伯数字。\n    2当前脚本对截屏审核界面做了比较大的改动,为了尽可能多的展示图片内容。隐藏掉了 拉黑 推荐 按钮,并且将用户昵称,才艺,PK中,接收方,发起方这些文字信息做了简短处理。但是如果想查看完整的用户昵称信息,只需要将鼠标悬停在经过处理的昵称上就可以了。\n    4 双击页面换一批为,当选中开启后,在页面的任意地方双击会触发 换一批 按钮的单击执行。默认为关闭!\n 以上所有效果均为在当前页面设置,在提交 换一批 之后的所有此页面上生效。关闭当前选项卡之后所有设置的参数会被清空,再次打开请重新设置!\n    5 当鼠标移动到需要处罚的用户时,可以触发快捷键。鼠标移出时失效Q警告,W下榜E禁播R推流T换一批,同时键盘回车可以换一批,鼠标右键也可以推流\n    6  隐藏按钮为当选中后用户界面的处罚按钮都会会被隐藏。此时,你可以选择用键盘操作处罚或者将鼠标移到要处罚的用户点击鼠标中键显示按钮!");
                });
                //自定义图片尺寸处理
                $("#autInput").mousedown(function() {
                    this.value = '';
                });
                $("#autInput").prev().mousedown(function() {
                    $("#autInput").val('');
                });
                $("#autInput").blur(function() {
                    const value = parseInt(this.value);
                    if (value < 130) {
                        document.cookie = "size=130;";
                        this.value = 130;
                        alert("设定宽度过小,已经为你设置为130px");
                    } else if (parseInt(this.value.trim()) > 250) {
                        document.cookie = "size=250;";
                        this.value = 250;
                        alert("设定宽度过大,已经为你设置为250px");
                    } else if (value >= 130 && value <= 250) {
                        document.cookie = `size=${value};`;
                        this.value = value;
                    } else {
                        this.value = size;
                        alert("请输入设定宽度");
                    }
                });
                window.scrollTo(0, 72);//页面自动滚动
                $("body").css("-webkit-user-select", "none");//页面内文字不可选
                $(".showpic").css({//设定截屏容器最小宽高,修复空白bug
                    "margin": "0px 3px",
                    "float": "none",
                    "display": "inline-block",
                    "margin-right": "-4px",
                    "min-height": "250px"
                }).children("table").css({
                    "width": "130px",
                    "margin": "0",
                    "height": "250px",
                    "padding": "0px"
                });
                //去掉性别
                $("tbody tr:nth-child(2) td font").each(function(i, e) {
                    e.style.display = "none";
                });
                //简短用户文字信息
                $('span').each(function(i, e) {
                    if (e.innerHTML === '才艺') {
                        e.innerHTML = '';
                    } else if (e.innerHTML === 'PK') {
                        e.style.display = 'none';
                        e.parentNode.className = 'pk';
                    } else if (e.innerHTML === '已推流') {
                        e.innerHTML = '已推';
                        e.style.float = 'right';
                        e.style.marginRight = '10px';
                    }
                });
                //键盘操作处理和推流
                $('.content_div').on('mouseover', 'table', function(e) {
                    this.tabIndex = 0;
                    this.focus();
                    this.parentNode.style.outline = "blue solid 2px";
                    if ($(this).siblings('table').length === 0 || $(this).find('.pk').length) {
                        $(this).find('input:button').first().attr('onclick', '')
                        let data = this.parentNode.id.split('_');
                        $(this).find('input:button')[0].onclick = function (){
                            addEmpasisUser(data[2],data[1])
                        }
                    }
                    this.onkeydown = function(e) {
                        if (e.code == 'KeyQ') {
                            $(this).find('.btn_blue').filter(function(i, e) {
                                if (e.value == '警告') {
                                    $(e).click();
                                }
                            });
                        } else if (e.code == 'KeyW') {
                            $(this).find('.btn_blue').filter(function(i, e) {
                                if (e.value == '下榜') {
                                    $(e).click();
                                }
                            });
                        } else
                        if (e.code == 'KeyE') {
                            $(this).find('.btn_blue').filter(function(i, e) {
                                if (e.value == '禁播') {
                                    $(e).click();
                                }
                            });
                        } else if (e.code == 'KeyR') {
                            $(this).find('.btn_blue').filter(function(i, e) {
                                if (e.value == '推流') {
                                    $(e).click();
                                }
                            });
                        } else if (e.code == 'KeyT') {
                            this.onkeydown = null;
                            $('.btn_blue').first().click();
                        }
                    }
                    if (rp) {
                    this.oncontextmenu = () => {
                        $(this).find('.btn_blue').filter(function(i, e) {
                            if (e.value == '推流') {
                                $(e).click();
                                }
                            });
                            return false;
                        };
                    }
                    this.onmousedown = (e) => {
                        if (e.button == 1) {
                            if (hd) {
                                let newheight = parseInt($(this).find('img').first().css('height')) - 23;
                                $(this).find('img').first().css('height', newheight + 'px');
                                $(this).find('.hidebtn').show();
                                this.onmousedown = null;
                                return false;
                            }
                        }
                    };
                });
                $('.content_div').on('mouseleave', 'table', function(e) {
                    this.tabIndex = 9999;
                    this.blur();
                    this.parentNode.style.outline = "none";
                    this.onkeydown = null;
                    this.oncontextmenu = null;
                    this.onmousedown = null;
                });
                //压缩表格行高
                $(".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");
            }
        }
    //一对一坐等
    } else if (location.href.match(/videoLivePic!getSingleVideoLiveAuditList/g)) {
        let width = 132;
        let height = width * 1.77;
        $('<div class="mytool"style="float:right; margin: 8px 0px;font-size: 12px; position: absolute; right: 0px; top: 4px;"><span class="how" style="font-size: 8px; color: blue; cursor: pointer; ">如何使用?</span><span style="font-weight:bold;"> 当前页面停留时间:</span><span class="keepTime" style="color:red; min-width: 12px; display:inline-block;font-weight:bold;text-align:right;">0</span><span> s </span>&nbsp&nbsp<label for="dbClick" style="font-weight:bold; cursor: pointer; ">双击页面换一批:</label><input id="dbClick" type="checkbox" style="vertical-align: middle; cursor: pointer; width: 12px; height: 12px;">&nbsp&nbsp&nbsp&nbsp</div>').appendTo("body");
        $('<div class="loading" style="display: none; cursor: pointer; width: 300px; height: 40px; background: #f40; border-radius: 8px; opacity: 0.6; color: #fff; position: fixed; left: 50%; top: 50%; margin-left: -150px; margin-top: -20px; line-height: 40px; text-align: center; font-size: 28px;">提交中,请稍后</div>').appendTo("body");
        let keepTime = 0;
        setInterval(() => {
            $(".keepTime").html(keepTime);
            keepTime++;
        }, 1000);
        enterLogin($(".btn_blue").first());
        $("body").css("-webkit-user-select", "none");
        setTimeout(() => {
            if (document.cookie.match(/Ydb=\d/g)) {
                db = parseInt(document.cookie.match(/Ydb=\d/g)[0].match(/\d/g)[0]);
                if (db) {
                    $("#dbClick").attr("checked", true);
                    $(document).one('dblclick', () => {
                        $(".btn_blue").first().click();
                    });
              }
            } else {
                document.cookie = "Ydb=0;";
            }
            $('object').attr('width', width).attr('height', height);
                $('embed').attr('width', width).attr('height', height);
                $('div[id^="video"]').css('position', 'relative');
                $('div[id^="div"]').css('float', 'none').css('display', 'inline-block').css('min-height', '260px');
                $('.content_div>div>table div[id^="div"]>table').css('width', '130px')
                $('.content').css('margin-right', '0px').css('margin-bottom', '0px')
                $('.content_div>div>table').on('mouseenter', 'table', function() {
                    $(this).find('div[id^="video"]').append('<div class= "hoverbutton" style="opacity: 0.8; position: absolute; right: 0; top:0; width:132px; height: 18px;"><button class ="warn" style="width: 44px; height: 20px; background-color: #2ae; color: #fff; box-sizing: border-box; cursor: pointer; border: 1px solid blue; border-radius: 8px;" type="button">警告</button><button style="width: 44px; height: 20px; background-color: #000; color: #fff; box-sizing: border-box; cursor: pointer; border: 1px solid #ccc; border-radius: 8px;" type="button" class ="black">拉黑</button><button style="width: 44px; height: 20px; background-color: #f0f; color: #fff; box-sizing: border-box; cursor: pointer; border: 1px solid #f40; border-radius: 8px;" type="button" class="sex">色情</button></div>');
                    $('.warn').hover(function() {
                        $(this).css('color', '#2ae').css('background-color', '#fff');
                    }, function() {
                        $(this).css('color', '#fff').css('background-color', '#2ae');
                    });
                    $('.black').hover(function() {
                        $(this).css('color', 'black').css('background-color', '#fff');
                    }, function() {
                        $(this).css('color', '#fff').css('background-color', 'black');
                    });
                    $('.sex').hover(function() {
                        $(this).css('color', '#f0f').css('background-color', '#fff');
                    }, function() {
                        $(this).css('color', '#fff').css('background-color', '#f0f');
                    });
                    $('.warn').click(function() {
                        $(this).parent().parent().parent().parent().parent().find('input:button:nth-child(1)').click();
                    });
                    $('.black').click(function() {
                        $(this).parent().parent().parent().parent().parent().find('input:button:nth-child(2)').click();
                    });
                    $('.sex').click(function() {
                        $(this).parent().parent().parent().parent().parent().find('input:button:nth-child(3)').click();
                    });
                });
                $('.content_div>div>table').on('mouseleave', 'table', function() {
                    $('.hoverbutton').hide();
                    this.oncontextmenu = null;
                });
                $('.content_div>div>table div[id^="div"]>table tbody tr:nth-child(2) td a:nth-child(2)').hide()
                $('.content_div>div>table div[id^="div"]>table tbody tr:nth-child(3)').hide();
                $('.content_div>div>table:nth-child(2) div[id^="div"]>table tr:nth-child(4)').hide();
            $(".mytool").on("click", "input", function(e) {
                if (this.id === 'dbClick') {
                    if ($(this).is(':checked')) {
                        document.cookie = "Ydb=1;";
                    } else {
                        document.cookie = "Ydb=0;";
                    }
                }
            });
            $(".how").click(function() {
                alert("参考直播截屏审核插件使用方法");
            });
        }, 666);
        $(".toolbar .btn_blue").first().click(function() {
            $(".loading").css("display", "block");
            let i = 0;
            setInterval(() => {
                if (i % 4 == 0) {
                    $(".loading").html("提交中,请稍后");
                } else if (i % 4 == 1) {
                    $(".loading").html(". 提交中,请稍后 .");
                } else if (i % 4 == 2) {
                    $(".loading").html(". . 提交中,请稍后 . .");
                } else if (i % 4 == 3) {
                    $(".loading").html(". . . 提交中,请稍后 . . .");
                }
                i++;
            }, 200);
        });
    //重点流
    } else if (location.href.match(/videoLiveAuditAction!videoliveFlowAuditList/g)) {
        let width = 153;//设置重点流UI
        let height = width * 1.77;
        rander(width, height);
        $("body").css("-webkit-user-select", "none");
        $('<div class="mytool"style="float:right; margin: 8px 0px;font-size: 12px; position: absolute; right: 0px; top: 4px;"><span class="how" style="font-size: 8px; color: blue; cursor: pointer; ">如何使用?</span><input id="XXX" type="button" style="vertical-align: middle; cursor: pointer; width: 60px; height: 26px;     border: #87a4c6 1px solid; background: #fff; color: #f40; font-weight:bold; border-radius: 10px; " value="批量XXX">&nbsp&nbsp<label for="dbClick" style="font-weight:bold; cursor: pointer; ">双击页面换一批:</label><input id="dbClick" type="checkbox" style="vertical-align: middle; cursor: pointer; width: 12px; height: 12px;">&nbsp&nbsp&nbsp&nbsp</div>').appendTo("body");
        $('<div class="listNull" style="display: none; cursor: pointer; width: 300px; height: 40px; background: #f40; border-radius: 8px; opacity: 0.8; color: #fff; position: fixed; left: 50%; top: 72px; margin-left: -150px; line-height: 40px; text-align: center; font-size: 28px;">直播队列无等待人数!</div>').appendTo("body");
        $('<div class="loading" style="display: none; cursor: pointer; width: 300px; height: 40px; background: #f40; border-radius: 8px; opacity: 0.6; color: #fff; position: fixed; left: 50%; top: 50%; margin-left: -150px; margin-top: -20px; line-height: 40px; text-align: center; font-size: 28px;">加载中,请稍后</div>').appendTo("body");
        let db;
        if (document.cookie.match(/Zdb=\d/g)) {
                db = parseInt(document.cookie.match(/Zdb=\d/g)[0].match(/\d/g)[0]);
                if (db) {//是否双击换一批
                    $("#dbClick").attr("checked", true);
                    $(document).one('dblclick', () => {
                        location.href='http://wxedmaxma.ipaychat.com/videoLiveAuditAction!videoliveFlowAuditList.action';
                    });
                }
            } else {
                document.cookie = "Zdb=0;";
            }
            $(".mytool").on("click", "input", function(e) {
                if (this.id === 'dbClick') {
                    if ($(this).is(':checked')) {
                        document.cookie = "Zdb=1;";
                    } else {
                        document.cookie = "Zdb=0;";
                    }
                }
            });//使用说明
            $(".how").click(function() {
                alert("鼠标右键标记/取消标记需要叉掉的用户。选好后点击右上角 批量XXX 即可");
            });
        $("#XXX").hover(function () {
            $(this).css('color', '#fff').css('background', '#f40');
        },  function (){
            $(this).css('color', '#f40').css('background', '#fff');;
        });
        //批量叉掉
        $('.content_div>table').on('mouseenter', 'table', function() {
            if ($(this).parent().hasClass('marked')) {
                        this.style.outline = "#f40 solid 2px";
                    } else {
                        this.style.outline = "blue solid 2px";
                    }
            this.oncontextmenu=function(){return false;}
            this.onmousedown = function (e) {
                if (e.buttons == 2) {
                    if ($(this).parent().hasClass('marked')) {
                        $(this).parent().removeClass('marked');
                        this.style.outline = "blue solid 2px";
                        $(this).find('tr:nth-child(4) td a')[0].onclick = null;
                        let data = this.parentNode.id.split('_');
                        $(this).find('tr:nth-child(4) td a').attr('onclick', `singleRef(${data[1]},${data[2]} , 1)`);
                    } else {
                        if ($(this).find('tr:nth-child(4) td a').length) {
                            $(this).parent().addClass('marked');
                            $(this).find('tr:nth-child(4) td a').attr('onclick', '');
                            let data = this.parentNode.id.split('_');
                            $(this).find('tr:nth-child(4) td a')[0].onclick = function () {
                                singleRef(data[1],data[2], 1);
                            }
                            this.style.outline = "#f40 solid 2px";
                        }
                    }
                }

            }
        });
        $('.content_div>table').on('mouseleave', 'table', function() {
            if ($(this).parent().hasClass('marked')) {
                this.style.outline = "#f40 solid 2px";
            } else {
                this.style.outline = "none";
            }
        });
        $("#XXX").click(function () {
            if ($('.marked').length) {
                _num = $('.marked tr:nth-child(4) td a').length;
                $('.marked tr:nth-child(4) td a').click();
            } else {
                location.href='http://wxedmaxma.ipaychat.com/videoLiveAuditAction!videoliveFlowAuditList.action';
            }
        });
        $(".toolbar .btn_blue").first().click(function() {
            $(".loading").css("display", "block");
            let i = 0;
            setInterval(() => {
                if (i % 4 == 0) {
                    $(".loading").html("加载中,请稍后");
                } else if (i % 4 == 1) {
                    $(".loading").html(". 加载中,请稍后 .");
                } else if (i % 4 == 2) {
                    $(".loading").html(". . 加载中,请稍后 . .");
                } else if (i % 4 == 3) {
                    $(".loading").html(". . . 加载中,请稍后 . . .");
                }
                i++;
            }, 200);
        });
    //总榜
    } else if (location.href.match(/videoLivePic!getPopuLiveVideoList/g)) {
        let width = 154;
        let height = width * 1.77;
        setTimeout(() => {
            $('span').each(function(i, e) {
                if (e.innerHTML === '才艺') {
                    e.innerHTML = '才';
                } else if (e.innerHTML === 'PK') {
                    e.innerHTML = '';
                }
            });
            $('object').attr('width', width).attr('height', height);
            $('embed').attr('width', width).attr('height', height);
            $('.content td').css('padding', '0');
            $('.content_div div[id^="div"]>table').css('width', '130px').css('margin', '0').css('margin-left', '1.5px');
            $('.content_div div[id^="div"]>table tr:nth-child(2) a').css('float', 'left').css('width', '60px').css('white-space', 'nowrap').css('overflow', 'hidden').each(function(i, e) {
                $(e).parent().parent().parent().attr("title", $(e).html());
            });;
            $('.content_div  div[id^="div"] table tr:nth-child(3) td input:visible').css('float', 'left').css('width', '50px').css('margin', '0');
            }, 300);
    }
})(window.parent.$);