aozora tategaki

    @@ -53,9 +53,12 @@ // 先見日記用 var css2 = commentToText(function () {/* - #bass-content-body > center > table:nth-child(2) { - height:auto!important; - } +#bass-content-body > center > table:nth-child(2) { + height:auto!important; +} +#bass-archive > header { + display:none; +} */}); css = css + css2;
  • /*
     * @title aozora tategaki
     * @include http://www.aozora.gr.jp/cards/*
     * @require https://raw.github.com/necolas/normalize.css/master/normalize.css
     */
    
    // 青空文庫 縦書き拡張 http://subtech.g.hatena.ne.jp/cho45/20110319/1300542682
    // cf. https://gist.github.com/cho45/875989
    
    // normalize.css https://github.com/necolas/normalize.css
    
    // commentToText
    // https://github.com/tombfix/core/blob/2b0f251ff7d5968a138e2a4e8d24d5947005826a/xpi/chrome/content/library/01_utility.js#L2489
    
    var styles = document.styleSheets;
    for (var i = 0, it; it = styles[i]; i++) {
        it.disabled = true;
    }
    
    var css = commentToText(function () {/*
        body {
            font-family: "ヒラギノ明朝 Pro W3","HG明朝E","MS P明朝","MS 明朝",serif; !important;
            font-size: 14pt !important;
            line-height: 1.8em !important;
            padding: 1em !important;
            -webkit-writing-mode: vertical-rl;
            writing-mode: vertical-rl;
            overflow-y:hidden;
            text-align: justify;
            letter-spacing: 0.1em;
            background-color: grey !important;
            color: black !important;
            top: 0;
            right: 0;
            margin: 14pt;
        }
        a {
            text-decoration:none;
            pointer-events: none;
            color: black !important;
        }
        rt {
            display:none;
        }
        img {
            max-height:100%;
            width:auto;
        }
        pre {
            white-space:pre-wrap;
        }
    */});
    
    // 先見日記用
    var css2 = commentToText(function () {/*
    #bass-content-body > center > table:nth-child(2) {
        height:auto!important;
    }
    #bass-archive > header {
        display:none;
    }
    */});
    
    css = css + css2;
    
    var style = document.createElement('style');
    style.type = 'text/css';
    style.appendChild(document.createTextNode(css));
    document.querySelector('head').appendChild(style);
    
    // bug for rendering ruby elements
    document.body.innerHTML = document.body.innerHTML;
    
    document.body.addEventListener('mousewheel', function (e) {
        if (e.wheelDeltaX) {
            document.body.scrollLeft -= e.wheelDeltaX;
        } else {
            document.body.scrollLeft += e.wheelDelta;
        }
        e.preventDefault();
    }, false);
    
    // commentToText via tombloo 
    function commentToText(commentFunc) {
        return (commentFunc).toString().replace(/^.*?\r?\n/, '').replace(/\r?\n.*?$/, '');
    }
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2016/09/21 15:06:29 - 2016-09-21
  2. 2015/02/13 17:59:23 - 2015-02-13
  3. 2015/02/10 18:43:54 - 2015-02-10
  4. 2015/02/10 18:43:06 - 2015-02-10
  5. 2015/02/10 18:42:10 - 2015-02-10
  6. 2015/02/10 18:39:25 - 2015-02-10
  7. 2015/02/10 18:36:30 - 2015-02-10
  8. 2014/09/19 17:12:40 - 2014-09-19
  9. 2014/08/18 19:36:19 - 2014-08-18
  10. 2014/08/18 19:35:57 - 2014-08-18
  11. 2014/08/11 09:10:27 - 2014-08-11
  12. 2014/08/11 09:07:05 - 2014-08-11
  13. 2014/08/07 09:32:35 - 2014-08-07
  14. 2014/08/07 09:29:15 - 2014-08-07
  15. 2014/08/06 19:33:19 - 2014-08-06
  16. 2014/08/06 19:32:38 - 2014-08-06
  17. 2014/08/06 17:17:09 - 2014-08-06
  18. 2014/07/23 11:15:32 - 2014-07-23
  19. 2014/07/22 18:00:52 - 2014-07-22
  20. 2014/07/22 17:59:18 - 2014-07-22
  21. 2014/07/22 17:58:46 - 2014-07-22
  22. 2014/07/22 11:00:23 - 2014-07-22
  23. 2014/07/14 16:34:36 - 2014-07-14
  24. 2014/06/13 14:28:01 - 2014-06-13
  25. 2013/10/21 10:24:16 - 2013-10-21
  26. 2013/09/27 18:46:26 - 2013-09-27
  27. 2013/09/07 10:11:37 - 2013-09-07
  28. 2013/09/06 17:02:13 - 2013-09-06
  29. 2013/09/06 16:19:26 - 2013-09-06
  30. 2013/09/06 16:13:10 - 2013-09-06
  31. 2013/09/06 15:43:47 - 2013-09-06
  32. 2013/09/06 15:00:05 - 2013-09-06
  33. 2013/09/06 12:50:09 - 2013-09-06
  34. 2013/09/06 12:45:56 - 2013-09-06
  35. 2013/09/06 12:06:46 - 2013-09-06
  36. 2013/09/04 18:04:52 - 2013-09-04
  37. 2013/09/04 17:59:36 - 2013-09-04
  38. 2013/08/29 16:37:22 - 2013-08-29
  39. 2013/08/29 16:36:23 - 2013-08-29
  40. 2013/08/29 11:02:47 - 2013-08-29
  41. 2013/08/29 11:02:23 - 2013-08-29
  42. 2013/08/29 10:58:16 - 2013-08-29
  43. 2013/08/29 10:48:52 - 2013-08-29
  44. 2013/08/28 12:25:14 - 2013-08-28
  45. 2013/08/27 19:11:44 - 2013-08-27
  46. 2013/08/27 18:40:31 - 2013-08-27
  47. 2013/08/27 18:31:31 - 2013-08-27
  48. 2013/08/27 18:29:09 - 2013-08-27
  49. 2013/08/27 18:28:02 - 2013-08-27
  50. 2013/08/27 18:26:57 - 2013-08-27
  51. 2013/08/27 18:25:56 - 2013-08-27