isNotoSerif!

    @@ -1,17 +1,17 @@ /* * @title isNotoSerif! - * @description fix "NotoSerif Subset OTF" wrong links; It's not to a Serif but a Sans! WTH + * @description [Fixed] fix "NotoSerif Subset OTF" wrong links * @include https://www.google.com/get/noto/help/cjk/ * @license MIT License http://opensource.org/licenses/MIT * @javascript_url */ +// already has been fixed c.f. +// http://ptech.g.hatena.ne.jp/noromanba/20170404/1491337619 + // UserScript // https://gist.github.com/noromanba/a479fa5bc3c4619383ee62f6af74c923 -// c.f. -// http://ptech.g.hatena.ne.jp/noromanba/20170404/1491337619 - // "Region-specific Subset OpenType/CFF (Subset OTF)" section c.f. // https://www.google.com/get/noto/help/cjk/ (() => {
  • /*
     * @title isNotoSerif!
     * @description [Fixed] fix "NotoSerif Subset OTF" wrong links
     * @include https://www.google.com/get/noto/help/cjk/
     * @license MIT License http://opensource.org/licenses/MIT
     * @javascript_url
     */
    
    // already has been fixed c.f.
    // http://ptech.g.hatena.ne.jp/noromanba/20170404/1491337619
    
    // UserScript
    // https://gist.github.com/noromanba/a479fa5bc3c4619383ee62f6af74c923
    
    // "Region-specific Subset OpenType/CFF (Subset OTF)" section c.f.
    //  https://www.google.com/get/noto/help/cjk/
    (() => {
        'use strict';
    
        // XXX use XPath, smart
        // TODO assertion
        const subsetOTF = [...document.body.querySelectorAll('.cjk-downloads')].pop();
        const subsetOTFSerif = [...subsetOTF.querySelectorAll('tbody tr')].pop();
    
        Array.from(subsetOTFSerif.querySelectorAll([
          'a[href*="/NotoSans"]'
        ]), serif => serif.href = serif.href.replace(/\/NotoSans/, '/NotoSerif'));
    })();
    
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2017/04/07 01:26:07 - 2017-04-07
  2. 2017/04/07 01:19:35 - 2017-04-07
  3. 2017/04/05 09:53:45 - 2017-04-05
  4. 2017/04/05 09:41:46 - 2017-04-05
  5. 2017/04/05 04:29:45 - 2017-04-05
  6. 2017/04/05 04:22:01 - 2017-04-05