Collapse Go Tests

    
      
  • /*
     * @title fold tests
     * @description Github の /files ページで Go のテストファイルを折りたたむ
     * @include http://*
     * @license MIT License
     */
    
    document.querySelectorAll('.file-header').forEach((header) => {
      name = header.querySelector('.file-info a').innerText;
      if (!/_test.go$/.test(name)) return;
      button = header.querySelector('button.js-details-target');
      button.click();
    });
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2018/02/06 18:45:36 - 2018-02-06
  2. 2018/02/06 18:44:17 - 2018-02-06