这个论坛很酷

xqbbs (UID: 2661) 8月前

2142 3

样式美观,操作方便,美中不足的是字体太小。

 

这家伙太懒了,什么也没留下。
已有评论 (3)
  • V 胖虎_ (UID: 2112) @Ta
    8月前 (胖虎网络)
    1

    可以自己写脚本,把字体放大,哈哈

  • ᴍᴊᴊ (UID: 2662) @Ta
    8月前
    2

    大佬

  • V 胖虎_ (UID: 2112) @Ta
    8月前 (胖虎网络)
    3

    在油猴里粘贴下面的代码即可实现字体放大,最后的数字可以改成你需要在原来基础上加多少

    // ==UserScript==
    // @name         字体放大
    // @version      0.1
    // @description  try to take over the world!
    // @author       You
    // @match        *://dalao.net/*
    // @match       *://www.dalao.net/*
    // @icon         https://www.google.com/s2/favicons?sz=64&domain=dalao.net
    // @grant        none
    // ==/UserScript==
    
    (function() {// 获取所有文本节点
    const textNodes = [];
    function getTextNodes(node) {
      if (node.nodeType === Node.TEXT_NODE) {
        textNodes.push(node);
      } else {
        const children = node.childNodes;
        for (let i = 0; i < children.length; i++) {
          getTextNodes(children[i]);
        }
      }
    }
        console.log(textNodes)
    // 修改文字大小
    function changeTextSize(size) {
      for (let i = 0; i < textNodes.length; i++) {
        const parentElement = textNodes[i].parentNode;
        const computedStyle = window.getComputedStyle(parentElement);
        const currentSize = computedStyle.getPropertyValue('font-size');
        const currentValue = parseFloat(currentSize);
        const unit = currentSize.replace(currentValue, '');
           console.log(unit)
        parentElement.style.fontSize = (currentValue + size) + unit;
      }
    }
    getTextNodes(document.body);
    // 调用 changeTextSize 函数来增大文字大小(例如,增加 2 像素)
    changeTextSize(2);
    })();
    • 大佬论坛
      4
      登录后才可回帖  登录 注册

本站同款香港KC服务器 酷盾安全联盟 智能优化防护 ROOVPS 便宜服务器 盾云SCDN 月付只需1元起