这个论坛很酷

xqbbs  (UID: 2661) [复制链接]
帖子链接已复制到剪贴板
帖子已经有人评论啦,不支持删除!

4236 3

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

 

这家伙太懒了,什么也没留下。
已有评论 ( 3 )
  • 头像
    V 胖虎_ (UID: 2112)
    1楼

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

  • 头像
    ᴍᴊᴊ (UID: 2662)
    2楼

    表情大佬

  • 头像
    V 胖虎_ (UID: 2112)
    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);
    })();
域名市场
   域名载入中...
创建新帖
自助推广购买广告位
确认删除
确定要删除这篇帖子吗?删除后将无法恢复。
删除成功
帖子已成功删除,页面将自动刷新。
删除失败
删除帖子时发生错误,请稍后再试。