V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
fqxufo
V2EX  ›  分享创造

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

  •  
  •   fqxufo ·
    fqxufo · 2019-07-15 09:10:26 +08:00 · 2029 次点击
    这是一个创建于 1740 天前的主题,其中的信息可能已经有所发展或是发生改变。

    大家都说阅读源代码是学习编程最好的办法,但是 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 条回复    2019-07-15 12:41:43 +08:00
    loveless21
        1
    loveless21  
       2019-07-15 10:00:19 +08:00
    Good
    Yourshell
        2
    Yourshell  
       2019-07-15 10:37:09 +08:00
    迁移到 userscript 吧
    fqxufo
        3
    fqxufo  
    OP
       2019-07-15 10:43:10 +08:00
    @Yourshell 最开始是准备写成油猴脚本的,后来发现 github 用了 pjax 技术加载页面,用脚步无法检测到 pushstate 状态的改变。
    所以用 chrome 扩展,可以用动态嵌入 js 文件到原页面的方式,可以在原页面的 js 运行环境中,就可以拿到 pushstate 状态的变化,再据此执行代码
    MarsCHOU
        4
    MarsCHOU  
       2019-07-15 12:41:43 +08:00
    已试用 不过好像和 github -older 功能重复了吧?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5218 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 08:47 · PVG 16:47 · LAX 01:47 · JFK 04:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.