[GitHub] Zen Mode Wiki

  • /*
     * @title       [GitHub] Zen Mode Wiki
     * @description GitHub の Wiki で Zen Mode を利用する
     * @include     https://github.com/*
     * @license     MIT License
     * @javascript_url
     */
    (function() {
      var style_id = 'm4i-zen-mode';
    
      var style = document.getElementById(style_id);
      if (style) {
        style.parentNode.removeChild(style);
    
      } else {
        style = document.createElement('style');
        style.id = style_id;
    
        var css = [
          '#gollum-editor-body {',
            'margin:   0 !important;',
            'position: absolute;',
            'top:      0;',
            'left:     0;',
            'width:    100%;',
            'height:   100% !important;',
            'z-index:  10000;',
          '}',
          '#gollum-editor-submit {',
            'position: absolute;',
            'bottom:   10px;',
            'right:    100px;',
            'z-index:  10001;',
          '}',
          '#gollum-editor-preview {',
            'position: absolute;',
            'bottom:   10px;',
            'right:    10px;',
            'z-index:  10001;',
          '}',
        ].join('\n');
    
        style.appendChild(document.createTextNode(css));
        document.getElementsByTagName('head')[0].appendChild(style);
      }
    })();
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2013/11/01 10:54:03 - 2013-11-01
  2. 2013/11/01 10:50:14 - 2013-11-01