V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
爱意满满的作品展示区。
fqxufo

chrome 扩展,快速跳转到 github repo 的最初 commit

  •  
  •   fqxufo ·
    fqxufo · Jul 15, 2019 · 3064 views
    This topic created in 2479 days ago, the information mentioned may be changed or developed.

    大家都说阅读源代码是学习编程最好的办法,但是 GitHub 网页端好像没有方便的跳转到最初 commit 的方法。所以我做了一个这样的扩展,可以在 commit 页面翻页按钮之后增加一个 initial 的按钮,点击后可以直接跳转到最初的 10 个 commits。

    源代码: https://github.com/fqxufo/goto-initial-commits

    chrome 商店地址: https://chrome.google.com/webstore/detail/goto-intial-commits/ioofnglbpfjhjafchlogpiloffdhcnpa

    https://i.imgur.com/TNetWxU.png

    https://i.imgur.com/uFH4H9z.png

    4 replies    2019-07-15 12:41:43 +08:00
    loveless21
        1
    loveless21  
       Jul 15, 2019
    Good
    Yourshell
        2
    Yourshell  
       Jul 15, 2019
    迁移到 userscript 吧
    fqxufo
        3
    fqxufo  
    OP
       Jul 15, 2019
    @Yourshell 最开始是准备写成油猴脚本的,后来发现 github 用了 pjax 技术加载页面,用脚步无法检测到 pushstate 状态的改变。
    所以用 chrome 扩展,可以用动态嵌入 js 文件到原页面的方式,可以在原页面的 js 运行环境中,就可以拿到 pushstate 状态的变化,再据此执行代码
    MarsCHOU
        4
    MarsCHOU  
       Jul 15, 2019
    已试用 不过好像和 github -older 功能重复了吧?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1197 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 23:13 · PVG 07:13 · LAX 16:13 · JFK 19:13
    ♥ Do have faith in what you're doing.