Greasy Fork

Greasy Fork is available in English.

V2EX打开新帖跳到第一页

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

当前为 2020-01-10 提交的版本,查看 最新版本

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

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