ZEN-mode
by
noromanba
2014-01-16 [2014/01/16 03:23:22]
(Forked from
≡ by
noromanba)
simulate small-screen mode likes embed Opera (K-tai, Wii et al.)
-
/*
* @title ZEN-mode
* @description simulate small-screen mode likes embed Opera (K-tai, Wii et al.)
* @include http://*
* @include https://*
* @contributor noromanba http://let.hatelabo.jp/noromanba/let/gYC-x6_17M6-Kw
* @license MIT License http://opensource.org/licenses/MIT
* @javascript_url
*/
(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');
var slice = Array.prototype.slice;
slice.call(document.images).forEach(function (img) {
img.style.maxWidth = '100%';
});
slice.call(document.styleSheets).forEach(function (css) {
css.disabled = true;
});
})();
-
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。