ZEN-mode

    @@ -14,7 +14,14 @@ style.setProperty('max-width', '70%', 'important'); style.setProperty('font-size', '28px', 'important'); + Array.prototype.slice.call(document.images).forEach(function (img) { + //if(!img.src || !/\.(jpe?g|png|gif)(\?|$)/i.test(img.src)) return; + + //img.tabIndex = img.tabIndex || 0; + img.style.maxWidth = '100%'; + }); + Array.prototype.slice.call(document.styleSheets).forEach(function (css) { - css.disabled = true; + css.disabled = true; }); })();
  • /*
     * @title ZEN-mode
     * @description simulate small-screen mode likes embed Opera (K-tai, Wii et al.)
     * @include http://*
     * @include https://*
     * @license MIT License http://nrm.mit-license.org/2013
     * @require
     */
    
    (function () {
        var style = document.body.style;
        style.setProperty('margin-left', 'auto', 'important');
        style.setProperty('margin-right', 'auto', 'important');
        style.setProperty('max-width', '70%', 'important');
        style.setProperty('font-size', '28px', 'important');
    
        Array.prototype.slice.call(document.images).forEach(function (img) {
                //if(!img.src || !/\.(jpe?g|png|gif)(\?|$)/i.test(img.src)) return;
    
                //img.tabIndex = img.tabIndex || 0;
                img.style.maxWidth = '100%';
        });
    
        Array.prototype.slice.call(document.styleSheets).forEach(function (css) {
                css.disabled = true;
        });
    })();
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2014/01/16 03:23:22 - 2014-01-16
  2. 2014/01/16 02:47:40 - 2014-01-16
  3. 2013/03/31 06:16:11 - 2013-03-31
  4. 2013/03/21 03:43:39 - 2013-03-21
  5. 2013/03/19 07:49:52 - 2013-03-19
  6. 2013/03/19 07:20:57 - 2013-03-19
  7. 2013/03/19 06:17:51 - 2013-03-19