V2EX打开新帖跳到第一页

V2EX打开新帖默认跳到最新回复,这个是让直接跳到第一页回复内容

目前为 2021-03-11 提交的版本。查看 最新版本

// ==UserScript==
// @name           V2EX打开新帖跳到第一页
// @description    V2EX打开新帖默认跳到最新回复,这个是让直接跳到第一页回复内容
// @author         ss
// @include        https://*.v2ex.com/*
// @include        https://v2ex.com/*
// @version        2021.03.11
// @grant        none
// @namespace https://gf.qytechs.cn/users/314878
// ==/UserScript==

(function(){
    var topicLinks = document.getElementsByClassName('topic-link');
    var linksHot = document.querySelectorAll(".item_hot_topic_title a")
    if (topicLinks.length) {
        for (var i=0; i<topicLinks.length; i++) {
            topicLinks[i].href = topicLinks[i].href.split('#')[0] + '?p=1';
        }
    }
    if (linksHot.length) {
        for (var i=0; i<linksHot.length; i++) {
            linksHot[i].href = linksHot[i].href.split('#')[0] + '?p=1';
        }
    }
})()

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址