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.)
@@ -3,8 +3,9 @@
* @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
+ * @contributor noromanba http://let.hatelabo.jp/noromanba/let/gYC-x6_17M6-Kw
+ * @license MIT License http://opensource.org/licenses/MIT
+ * @javascript_url
*/
(function () {
@@ -14,14 +15,11 @@
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%';
+ var slice = Array.prototype.slice;
+ slice.call(document.images).forEach(function (img) {
+ img.style.maxWidth = '100%';
});
-
- Array.prototype.slice.call(document.styleSheets).forEach(function (css) {
- css.disabled = true;
+ slice.call(document.styleSheets).forEach(function (css) {
+ css.disabled = true;
});
})();
(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 です。