妖狐吧ios移动端适配

妖狐吧ios移动端适配,增加使用体验

当前为 2024-02-22 提交的版本,查看 最新版本

// ==UserScript==
// @name         妖狐吧ios移动端适配
// @namespace    https://smlsy.com/
// @version      0.0.6
// @description  妖狐吧ios移动端适配,增加使用体验
// @author       生机勃勃的勃勃
// @match        https://smlsy.com/*
// @match        https://www.smlsy.com/*
// @match        https://yaohubaba.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=baidu.com
// @grant        GM_addStyle
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    function setCookie(name, value, expires) {
        var d = new Date();
        d.setTime(d.getTime() + (expires * 24 * 60 * 60 * 1000));
        var expiresDate = "expires=" + d.toUTCString();
        document.cookie = name + "=" + value + ";" + expiresDate + ";path=/";
    }

    function getCookie(name) {
        var cookieName = name + "=";
        var cookies = document.cookie.split(';');
        for (var i = 0; i < cookies.length; i++) {
            var cookie = cookies[i].trim();
            if (cookie.indexOf(cookieName) === 0) {
                return cookie.substring(cookieName.length, cookie.length);
            }
        }
        return "";
    }

    var token_key = 'PHPSESSID'
    var token_value = getCookie(token_key)
    // 延长登录(不可用)校验时间 - 30天内不需要重复登录(不可用)
    setCookie(token_key, token_value, 30)


    // 预览图放大
    // var previewImageDomList = document.getElementById('cdn_server_flag_phone').querySelectorAll('.preview-picture img')
    // previewImageDomList.forEach(ele => {
    //     const highImageSrc = ele.dataset.org
    //     if (highImageSrc) {
    //         ele.dataset.org = ele.src
    //         ele.src = highImageSrc
    //     }
    // })


    GM_addStyle(`
        @media screen and (max-device-width: 600px) {
            #locate_0 {
                padding-bottom: calc(30px + constant(safe-area-inset-bottom)); /* 兼容 iOS < 11.2 */
                padding-bottom: calc(30px + env(safe-area-inset-bottom)); /* 兼容 iOS >= 11.2 */
            }
            .bar-main {
                display: flex;
            }
            .bar-main .search-bar {
                flex-shrink: 0;
            }
            .bar-main .search-bar input, input#search {
                width: 759px !important;
            }
            .bar-main .language {
                display: none;
            }
            .side-bar {
                display: none;
            }
            .nav-bag .nav {
                height: auto;
            }
            .nav-bag .nav .personal-center {
                display: flex;
                justify-content: flex-end;
                padding: 30px 0;
                position: relative;
            }
            .nav-bag .nav-bar {
                display: flex;
                justify-content: space-around;
                position: relative;
                padding: 8px 0;
            }
            .nav-bag .nav-title {
                font-size: 36px;
                line-height: 36px;
                border-right: none;
                position: relative;
                margin: 0;
                padding: 30px 20px;
            }
            .nav-bag .nav-title .nav-title-down {
                top: 100%;
                width: auto;
                left: 50%;
                transform: translateX(-50%);
            }
            .nav-bag .nav-title .nav-title-down a {
                padding: 35px 42px;
                width: auto;
                height: auto;
                line-height: unset;
                font-size: 38px;
            }
            #locate_bottom {
                display: none;
            }
        }
    `)
    // 列表
    GM_addStyle(`
        @media screen and (max-device-width: 600px) {
            html .item_video {
                width: calc(50% - 36px);
                margin-left: 18px;
                margin-right: 18px;
                border: 3px solid #e8e8e8;
                border-radius: 12px;
                margin-top: 30px;
                overflow: hidden;
                padding-bottom: 20px;
                box-sizing: border-box;
            }
            html .item_video .item_video_yuanchuang {
                width: 90px;
                height: 141px;
                background-size: 90px 141px;
                top: 9px;
            }

            html .item_video .video_duration {
                font-size: 30px;
                border-radius: 8px;
                padding: 4px 12px;
                background: rgba(0,0,0,.6);
                top: 4px;
            }
            html .item_video .new_video_icon {
                top: 47px;
                right: 6px;
            }
            html .item_video .new_video_icon img {
                height: 66px;
            }
            html .item_video .save_to_icon {
                display: none;
            }

            html .item_video .playlist_on_video_list_s {
                height: auto;
                padding: 6px 8px;
            }

            html .item_video .playlist_on_video_list_s td {
                font-size: 28px;
            }

            html .item_video .playlist_on_video_list_s .povl_icon_s {
                width: 40px
                height: 40px;
            }

            html .item_video .playlist_on_video_list_s .povl_icon_s img {
                width: 40px;
                height: 40px;
                margin-right: 10px
            }

            html .item_video .video_list_discount_line_tile_in {
                font-size: 24px;
                font-weight: bold;
                text-align: right;
                padding-right: 30px;
            }


            html .item_video .video_title {
                font-size: 36px;
            }
            html .item_video .video_title .video_fav_num {
                top: -40px;
                left: 3px;
                font-size: 39px;
                text-shadow: 2px 2px 12px #ff6161;
            }
            html .item_video .video_txt_float {
                margin: 30px 4px 10px 8px;
                width: calc(50% - 12px);
            }
            html .item_video .video_txt_float p {
                font-size: 34px !important;
                width: auto;
            }
            html .item_video .go_to_support_btn {
                margin-bottom: -16px;
                margin-top: 15px;
                font-size: 30px;
                border-radius: 8px;
            }
        }
    `)
    // 筛选
    GM_addStyle(`
        @media screen and (max-device-width: 600px) {
            html .pages {
                font-size: 40px !important;
                height: auto;
                line-height: unset;
                margin-bottom: 15px;
            }
            html .pages a, html .pages strong {
                margin: 0;
                padding: 2px 15px;
                text-decoration: none!important;
                margin-top: 22px;
                display: inline-block;
                border-radius: 10px;
            }
            html .pages .next {
                padding: 2px 18px;
                text-decoration: none!important;
            }
        }
    `)
    // 登录(不可用)
    GM_addStyle(`
        @media screen and (max-device-width: 600px) {
            #login_panel .login_form_table input {
                height: 123px;
                line-height: 123px;
                font-size: 60px !important;
            }
        }
    `)
    /*********************************************************** */
    // 视频播放页
    GM_addStyle(`
        @media screen and (max-device-width: 600px) {
            html div:has(>div>div[alt="uploader"]) {
                display: flex;
                flex-direction: column;
                padding: 20px 40px;
                background: #333;
                margin-top: 0 !important;
            }
            html div:has(>div[alt="uploader"]) {
                width: auto !important;
                flex-grow: 1;
            }
            html div[alt="uploader"] {
                display: flex;
                width: 100%;
            }
            hteml div[alt="uploader"] > div:nth-child(1) {
                flex-shrink: 0;
            }
            html div[alt="uploader"] > div:nth-child(2) {
                font-size: 32px !important;
                display: flex;
                align-items: center;
                flex: 1;
            }
            html div[alt="uploader"] > div:nth-child(2) > div:nth-child(1) {
                margin-left: 4px;
                flex: 1;
            }
            html div[alt="uploader"] > div:nth-child(2) > div:nth-child(2) {
                flex-shrink: 0;
            }
            html div[alt="uploader"] > div:nth-child(2) .userActionContainer > div:nth-child(2) {
                font-size: 24px !important;
                text-align: center !important;
            }
            html div[alt="uploader"] > div:nth-child(2) .userActionContainer > div:nth-child(1) {
                transform: scale(1.5);
                margin: 6px 32px !important;
            }
            html div:has(>div>div[alt="uploader"]) > div:nth-child(2) {
                display: flex;
                width: 100% !important;
                font-size: 24px !important;
                align-items: center;
                border-bottom: none !important;
                border-top: 2px solid #666 !important;
                padding-bottom: 0px !important;
            }
            html div:has(>div>div[alt="uploader"]) > div:nth-child(2) > div {
                margin-right: 12px !important;
            }
            html div:has(>div>div[alt="uploader"]) > div:nth-child(2) > div:nth-child(1) button {
                font-size: 20px !important;
                padding: 12px 30px !important;
                border-radius: 11px !important;;
                background: #131313 !important;;
                outline: none;
                border: none;
            }
            html .descript_content {
                font-size: 40px;
                padding: 20px 40px;
                word-break: break-word;
            }
            html .descript_title {
                font-size: 36px;
                padding: 20px 40px;
                word-break: break-word;
                line-height: 1.5;
                border-top: 1px solid #666;
            }
            html div[alt="tag"] {
                padding: 0 40px !important;
                margin-top: 40px;
            }
            html div[alt="tag"] .video_tag {
                font-size: 28px !important;
                margin-right: 14px !important;
                margin-bottom: 12px;
                border-radius: 16px;
            }
            html #comment_top {
                display: none;
            }
            html .comment_body {
                margin: 40px;
                padding: 20px;
                background: #333;
                border-radius: 18px;
            }
            html .comment_body {
                margin: 40px;
                padding: 28px;
                background: #333;
                border-radius: 40px;
            }
            html .comment_body .comment_item {
                font-size: 30px;
                display: flex;
                width: 100% !important;
                border-radius: 10px;
                overflow: hidden;
                margin-bottom: 7px;
                margin-right: 0;
                padding: 10px 20px;
            }
            html .comment_body .comment_item .comment_username {
                border-radius: 0 10px 10px 0px;
            }
            html .comment_body .comment_submit {
                width: 100%;
                display: flex;
                margin-top: 16px;
            }
            html .comment_body .comment_submit .comment_submit_input {
                width: 100%;
            }
            html .comment_body .comment_submit .comment_submit_input input {
                width: 100% !important;
                font-size: 36px !important;
                line-height: 58px !important;
                border-radius: 30px 0 0 30px !important;
                text-indent: 2rem !important;
            }
            html .comment_body .comment_submit .comment_submit_btn {
                flex-shrink: 0;
                width: auto;
            }
            html .comment_body .comment_submit .comment_submit_btn .green-btn-wraper span,
            html .comment_body .comment_submit .comment_submit_btn .green-btn span {
                font-size: 26px !important;
                line-height: 60px !important;
            }
            html .comment_body .comment_submit .comment_submit_btn .green-btn-wraper,
            html .comment_body .comment_submit .comment_submit_btn .green-btn {
                background: #44ab00;
                height: 60px;
                border-radius: 0px 30px 30px 0px !important;
            }
            html button#fav_button {
                line-height: 1.5;
                padding: 13px 0;
                border: 0;
                box-shadow: inset 0 0 18px -2px #ad7f7f;
            }
            html .video_baseinfo {
                background: #8e8e8e;
            }
            html #cdn_server_flag_phone {
                display: flex;
                overflow-x: scroll;
            }
            html #cdn_server_flag_phone .preview-picture {
                flex-shrink: 0;
            }
            html .preview-picture-slide img {
                height: 640px;
            }
            html div[alt="Related Video"] {
                display: flex;
                flex-direction: column;
            }
            html div[alt="Related Video"] > div {

            }
        }
    `)
})();

QingJ © 2025

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