Greasy Fork

wz-skai

视频区域js

目前为 2015-11-27 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.greasyfork.icu/scripts/14224/89871/wz-skai.js

var acfix_setScroll = false;

function start() {
    if ($('#area-comment-inner').size() > 0) {
        setInterval(doFixVideo, 1000);
    }
     if ($('#article-mainer').size() > 0) {
        setInterval(doFix, 1000);
    }
}
function doFixVideo(){
     $('.author-comment.top .name').css("color", "#aaa");
    $('.item-comment.item-comment-quote .author-comment').css("display", "none");
    $('.item-comment.item-comment-quote .author-comment.top').css("display", "block");
    $(".item-comment.item-comment-quote").toArray().forEach(function(q){
        c = $(q).children();
        var t,m;
        if (c.size() == 4) {
            t = c[1];
            m = c[2];
        } else if (c.size() == 3) {
            t = c[0];
            m = c[1];
        }
        if ($(t).hasClass("top")) {
            $(t).insertAfter(m);
        }
    });
    $('#area-comment-inner').css('width', '1032px');
    $('.right_-main .divtop').css('width', '270px').css('margin-left', 0);
    $('.right_-main .divtop .right').css('width', '190px');
    $('.right_-main .divtop .divtop_bottom').css('width', '280px');
    $('.right_-main .divbottom').css('display', 'none');
    $('.right_-main .divmiddle').css('width', '270px').css('margin-left', 0);
    $('.right_-main .divmiddle .div_right').css('display', 'none');
    $('.right_-main .divmiddle .div_left').css('width', '100%');
    $('#article-mainer .right_').css('width', '180px');
    $('#area-bottom-view').css('width', '1032px');
    $('#area-comment').css('width', '1032px');
    $('#area-editor').css('width', '1022px');
    $('.item-comment').css('padding-bottom', "0px");
    $('.right_-main .right_ .bottom_').css("font-size", "13px");
    $('.right_-main .right_').css("width", "160px");
}
function doFix() {
    if (acfix_setScroll == false) {
        $(window).on('scroll', function(){$('.right_-main').css("position", "relative"); $('#area-title-view').css('position', 'relative')});
        acfix_setScroll = true;
    }
    $('.author-comment.top .name').css("color", "#aaa");
    $('.item-comment.item-comment-quote .author-comment').css("display", "none");
    $('.item-comment.item-comment-quote .author-comment.top').css("display", "block");
    $(".item-comment.item-comment-quote").toArray().forEach(function(q){
        c = $(q).children();
        var t,m;
        if (c.size() == 4) {
            t = c[1];
            m = c[2];
        } else if (c.size() == 3) {
            t = c[0];
            m = c[1];
        }
        if ($(t).hasClass("top")) {
            $(t).insertAfter(m);
        }
    });
    $('#article-mainer').css('width', '1032px');
    $('.right_-main .divtop').css('width', '270px').css('margin-left', 0);
    $('.right_-main .divtop .right').css('width', '190px');
    $('.right_-main .divtop .divtop_bottom').css('width', '280px');
    $('.right_-main .divbottom').css('display', 'none');
    $('.right_-main .divmiddle').css('width', '270px').css('margin-left', 0);
    $('.right_-main .divmiddle .div_right').css('display', 'none');
    $('.right_-main .divmiddle .div_left').css('width', '100%');
    $('#article-mainer .right_').css('width', '180px');
    $('#area-bottom-view').css('width', '1032px');
    $('#area-comment').css('width', '1032px');
    $('#area-editor').css('width', '1022px');
    $('.item-comment').css('padding-bottom', "0px");
    $('.right_-main .right_ .bottom_').css("font-size", "13px");
    $('.right_-main .right_').css("width", "160px");
}