上一主题 下一主题
ScriptCat,新一代的脚本管理器脚本站,与全世界分享你的用户脚本油猴脚本开发指南教程目录
返回列表 发新帖

论坛大师・Discuz! 修改版 (2024-2025 update by wwwab)

[复制链接]
  • TA的每日心情
    开心
    2025-10-30 17:49
  • 签到天数: 1 天

    [LV.1]初来乍到

    1

    主题

    1

    回帖

    5

    积分

    助理工程师

    积分
    5

    油中3周年油中2周年新人报道

    发表于 2025-3-14 20:28:51 | 显示全部楼层 | 阅读模式
    安装此脚本 如何安装? 脚本问题反馈 给脚本评分 查看代码

    当前版本(1.4.8)全局配置:

        const GLOBAL_CONFIG = {
    
            // Posts' sortord: 'unlocked', 'lastpost', 'threadcreate'(author dateline)
            // 主题帖排序方式: 'unlocked, 'lastpost', 'threadcreate'(author dateline)
            // 主題帖排序方式: 'unlocked, 'lastpost', 'threadcreate'(author dateline)
            thread_sortord: 'unlocked',
    
            // Lock the skin style: true/false
            // 固定皮肤样式: true/false
            // 固定皮膚樣式: true/false
            lock_skin: false,
    
            // Clean posts' format: true/false
            // 清除帖子格式: true/false
            // 清除帖子格式: true/false
            clean_post: false,
    
            // Display the users' online status: 'None', 'Standard', 'Advanced'
            // 显示用户的在线状态: 'None', 'Standard', 'Advanced'
            // 顯示用戶的在線狀態: 'None', 'Standard', 'Advanced'
            detection_mode: 'Advanced',
    
            // 小圆点(Small Dot): 'mode1'
            // Emoji or 文本(Text): 'mode2'
            standard_mode_detection_display_style: 'mode1',
            advanced_mode_detection_display_style: 'mode2',
    
            // Text Beautification: true/false
            // 文本字體美化: true/false
            // 文字字体美化: true/false
            text_beautification: true,
    
            // Code Beautification: true/false
            // 代码美化:true/false
            // 程式碼美化:true/false
            code_beautification: true,
    
            // text_size_linespacing_adjust in posts: true/false
            // 帖子文字大小行距优化: true/false
            // 帖子文本大小行距優化: true/false
            textsize_linespacing_adjust: true,
            line_height: '30px',
            font_size: '18px',
    
            // Block Baidu_tongji code: true/false
            // 屏蔽百度统计: true/false
            // 屏蔽百度統計: true/false
            block_baidu_hm: true,
    
            // Turn the avatar to high definition (Apply big size avatar): true/false
            // 头像转为高清晰度: true/false
            // 頭像轉為高清晰度: true/false
            big_size_avatar: true,
    
            // Picture Optimization (Overwrite the thumb picture into big size picture): true/false
            // 图片优化(将预览图覆盖为大图): true/false
            // 圖片優化(將預覽圖覆蓋為大圖): true/false
            picture_optimization: true,
    
            // Theme beautification: true/false
            // 主题美化: true/false
            // 主題美化: true/false
            theme_beautification: false,
    
            // Warning record query button: true/false
            // 警告记录查询按钮: true/false
            // 警告記錄查詢按鈕: true/false
            show_warning_record_button: false,
    
            // Scene Mode: 'Standard', 'Family', 'Office'
            // 场景模式: 'Standard', 'Family', 'Office'
            // 場景模式: 'Standard', 'Family', 'Office'
            scene_mode: 'Standard',
    
            // Automatically refresh after modifying settings on webpage: true/false,
            // 在网页上修改设置后自动刷新: true/false,
            // 在網頁上修改設置後自動刷新: true/false,
            auto_reload: true,
    
            // Display Eomji: true/false
            // 显示Emoji: true/false
            // 顯示Emoji: true/false
            display_emoji: true,
    
        }
        // Global Settings · End
    
        // Message Edit Settings · Start
        const Message_Edit_CONFIG = {
    
            // Bypass the word limit of reply: true/false
            // 回帖字数限制绕过: true/false
            // 回帖字數限制繞過: true/false
            word_count_limit_bypass: true,
    
            // Add a tail automatically at the end of the reply: true/false; Tail content: Text
            // 回帖小尾巴: true/false;回帖小尾巴内容: Text
            // 回帖小尾巴: true/false;回帖小尾巴內容: Text
            reply_tail: false,
            reply_tail_content: '  喵~',
    
            // Add a prefix automatically at the end of the reply: true/false; Prefix content: Text
            // 回帖小前缀: true/false;回帖小前缀内容: Text
            // 回帖小前綴: true/false;回帖小前綴内容: Text
            reply_prefix: false,
            reply_prefix_content: '',
    
            // Enable in the private messages post: true/false
            // 在私信中启用: true/false
            // 在私信中啟用: true/false
            private_messages_Enable: false,
    
            // Enable in the comment messages post: true/false
            // 在点评中启用: true/false
            // 在點評中啟用: true/false
            comment_messages_Enable: false,
    
        }
        // Message Edit Settings · End

    说明:

    1. 此项目基于mxdh的论坛大师・Discuz!修改版Main]和论坛大师・Discuz!修改版Full维护和优化。
    2. 此项目基于hostname的论坛大师・Discuz! 界面美化、移除广告、功能增强、回帖强显……,遵照GPL-3.0开放源代码。
  • TA的每日心情
    开心
    2025-10-30 08:34
  • 签到天数: 692 天

    [LV.9]以坛为家II

    12

    主题

    52

    回帖

    415

    积分

    高级工程师

    积分
    415

    挑战者 lv2

    发表于 2025-3-14 20:58:05 | 显示全部楼层
    const url = new URL(href);
            const orderby = url.searchParams.get('orderby');
            if (!orderby) {
                url.searchParams.set('orderby', 'dateline');
                return unsafeWindow.document.location.href = url.toString();
            }


    排序的话,直接修改网页url,重新加载网页,这种方式我觉得更加合适。这种方式,用户感知不到,并且不会有任何因为修改而导致的bug。非常简单粗暴。你上面的方式我也用过
    回复

    使用道具 举报

  • TA的每日心情
    开心
    2025-10-30 08:34
  • 签到天数: 692 天

    [LV.9]以坛为家II

    12

    主题

    52

    回帖

    415

    积分

    高级工程师

    积分
    415

    挑战者 lv2

    发表于 2025-3-14 20:58:35 | 显示全部楼层
    const url = new URL(href);
            const orderby = url.searchParams.get('orderby');
            if (!orderby) {
                url.searchParams.set('orderby', 'dateline');
                return unsafeWindow.document.location.href = url.toString();
            }


    排序的话,直接修改网页url,重新加载网页,这种方式我觉得更加合适。这种方式,用户感知不到,并且不会有任何因为修改而导致的bug。非常简单粗暴。你上面的方式我也用过
    回复

    使用道具 举报

  • TA的每日心情
    开心
    2025-10-30 17:49
  • 签到天数: 1 天

    [LV.1]初来乍到

    1

    主题

    1

    回帖

    5

    积分

    助理工程师

    积分
    5

    油中3周年油中2周年新人报道

    发表于 2025-3-14 21:07:57 | 显示全部楼层
    yhzc2023 发表于 2025-3-14 20:58
    const url = new URL(href);
            const orderby = url.searchParams.get('orderby');
            if (!ord ...

    目前就是你说的那种方式(修改网页URL跳转),见代码`switch (thread_sortord)`部分。
    回复

    使用道具 举报

    发表回复

    本版积分规则

    快速回复 返回顶部 返回列表