本帖最后由 seer007100 于 2021-3-8 23:00 编辑 
當我剛使用論壇新版介面是,我第一件發現的事就是帖子在寬螢幕裝置上太小了。假如你有同樣的困擾,可以使用這個我開發的 UserScript 來令帖子的寬度設定成與導航列相同。
螢幕截圖


下載
你可以到 Greasy Fork 下載:點我前往
原始碼
复制代码
當我剛使用論壇新版介面是,我第一件發現的事就是帖子在寬螢幕裝置上太小了。假如你有同樣的困擾,可以使用這個我開發的 UserScript 來令帖子的寬度設定成與導航列相同。
螢幕截圖
下載
你可以到 Greasy Fork 下載:點我前往
原始碼
- // ==UserScript==
 
- // @name               MCBBS New Layout: Forum Post Width Improvement
 
- // @description        Widen the post width in the new MCBBS layout, thus improve the user experience of wide-screen device users.
 
- // @name:zh-TW         MCBBS 新版介面帖子寬度修正
 
- // @description:zh-TW  修正 MCBBS 新版介面中帖子的寬度,以使寬螢幕的用戶能夠獲得更佳的使用體驗。
 
- // @license            AGPL-3.0-or-later
 
- // @author             Jason Kwok
 
- // @namespace          https://jasonhk.dev/
 
- // @version            0.1.2
 
- // @match              http*://www.mcbbs.net/*
 
- // @run-at             document-end
 
- // @grant              none
 
- // @updateURL          https://greasyfork.org/scripts/422875/code/422875.meta.js
 
- // @downloadURL        https://greasyfork.org/scripts/422875/code/422875.user.js
 
- // @supportURL         https://greasyfork.org/scripts/422875/feedback
 
- // ==/UserScript==
 
 
- /* global cookiepre */
 
 
- if (!isMobileVersion() && isNewLayoutEnabled())
 
- {
 
-     const main = document.querySelector(".p-body-main");
 
-     if ((main instanceof HTMLElement) && (main.querySelector("#postlist") !== null))
 
-     {
 
-         main.style.maxWidth = "100%";
 
-     }
 
- }
 
 
- function getCookies()
 
- {
 
-     return new Map(document.cookie.split("; ").map((pair) => (pair.includes("=") ? pair.split("=") : ["", pair])));
 
- }
 
 
- function isNewLayoutEnabled()
 
- {
 
-     if (typeof cookiepre !== "string") { return false; }
 
-     return (getCookies().get(`${ cookiepre }use_newTemplate`) === "1");
 
- }
 
 
- function isMobileVersion()
 
- {
 
-     return Array.prototype.some.call(document.documentElement.classList, (className) => className.startsWith("pixel-ratio-"));
 
- }
 
建议参考mcbbs extender发到软件版去
哇哦   这就是dalao吗
Wudji 发表于 2021-3-8 22:57
建议参考mcbbs extender发到软件版去
現在可能太簡單了,假如之後功能再多一點也許會發佈到軟件版。
