登录 立即注册

首页 > 绿虎论坛 > 软件开发 > 网站开发 (发帖)

和 Codex 一块儿搓了个新前端 hu60next


『回复列表(110|隐藏机器人聊天)』

100.

由于快速翻页器的缺失,我现在只能通过修改URL来快速回到第一页
image.png(611.61 KB)

(/@Ta/2026-07-29 16:19//)

101.

@老虎会游泳 #99 现在可以了

(/@Ta/2026-07-29 16:19//)

102. 发言已通过机审,仅登录用户可见。
<script>// 检测并转换楼层数字为链接
(function() {
    var containers = document.querySelectorAll('.floor-content.comments-content.user-content, .floor_content.user-content');
    if (!containers.length) return;

    var baseUrl = window.location.href.split('?')[0].split('#')[0];
    var processed = new Set();

    function walk(node) {
        if (node.nodeType === 3) {
            var text = node.nodeValue;
            var regex = /(?:^|\s| )#(\d+)(?=\s| |$)/g;
            var match, lastIndex = 0, parts = [], found = false;

            while ((match = regex.exec(text)) !== null) {
                var num = match[1];
                if (processed.has(num)) continue;
                processed.add(num);
                found = true;
                if (match.index > lastIndex) parts.push(text.substring(lastIndex, match.index));
                var link = document.createElement('a');
                link.href = baseUrl + '?floor=' + num + '#' + num;
                link.textContent = ' #' + num;
                parts.push(link);
                lastIndex = match.index + match[0].length;
            }

            if (found) {
                if (lastIndex < text.length) parts.push(text.substring(lastIndex));
                var fragment = document.createDocumentFragment();
                parts.forEach(function(part) {
                    fragment.appendChild(typeof part === 'string' ? document.createTextNode(part) : part);
                });
                node.parentNode.replaceChild(fragment, node);
            }
        } else if (node.nodeType === 1 && node.tagName !== 'A' && node.tagName !== 'SCRIPT') {
            Array.from(node.childNodes).forEach(walk);
        }
    }

    containers.forEach(function(container) {
        Array.from(container.childNodes).forEach(walk);
    });
})();
</script>
(/@Ta/2026-07-29 17:29//)

103.

@咯叽,不错

(/@Ta/2026-07-29 19:45//)

104.

@咯叽 #102 已实现。老虎部署吧 @老虎会游泳

(/@Ta/2026-07-29 19:54//)

105.

@rkonfj #104 可否添加网页插件功能支持,我觉得这个功能还是非常有意思的。

(/@Ta/2026-07-29 19:58//)

106.

@rkonfj #104 已更新。

(/@Ta/2026-07-29 20:06//)

107.

新版的帖子页面,相关管理人员无法对其进行修改,删除等操作。这就有点麻烦。

(/@Ta/2026-07-29 20:08//)

108.

评论区也一样

(/@Ta/2026-07-29 20:09//)

109.

手机版没有搜索框

(/@Ta/2026-07-29 20:12//)

110.

还有,你们觉得翻页的过渡动画观感好吗?我不太喜欢,不如直接一步到位跳转到应该去的位置

(/@Ta/2026-07-29 20:14//)

上一页 6/6页,共110楼

回复需要登录

7月29日 20:14 星期三

本站由hu60wap6驱动

备案号: 京ICP备18041936号-1