From 421748b4e73e4f82d9380f849561d1165a2e9051 Mon Sep 17 00:00:00 2001 From: surunzi Date: Tue, 17 May 2016 17:47:20 +0800 Subject: [PATCH] Fix: Network, resources style --- README.md | 8 +++++++- src/Network/Network.scss | 1 - src/Network/Request.es6 | 4 ++-- src/Resources/Resources.scss | 3 +++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3fc2fc2..defb025 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,13 @@ Logging things out on mobile browser is never an easy stuff. I used to include ` ![Demo](http://7xn2zy.com1.z0.glb.clouddn.com/eruda_qrcode.png) -Browse it on your phone: [http://liriliri.github.io/eruda/index.html](http://liriliri.github.io/eruda/index.html) +Browse it on your phone: [http://liriliri.github.io/eruda/](http://liriliri.github.io/eruda/) + +In order to try it on different sites, execute the script below on address bar. + +```javascript +javascript:(function () { var script = document.createElement('script'); script.src="//liriliri.github.io/eruda/eruda.min.js"; document.body.appendChild(script); script.onload=function () { eruda.init() } })(); +``` ## Features diff --git a/src/Network/Network.scss b/src/Network/Network.scss index 38e70f3..005f72d 100644 --- a/src/Network/Network.scss +++ b/src/Network/Network.scss @@ -54,7 +54,6 @@ overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; - height: 40px; span { display: inline-block; line-height: 40px; diff --git a/src/Network/Request.es6 b/src/Network/Request.es6 index 322aba3..73877a3 100644 --- a/src/Network/Request.es6 +++ b/src/Network/Request.es6 @@ -70,9 +70,9 @@ function getFileName(url) { var ret = util.last(url.split('/')); - if (ret.indexOf('?') > -1) ret = ret.split('?')[0]; + if (ret.indexOf('?') > -1) ret = ret.split('?')[0].trim(); - return ret; + return ret === '' ? 'unknown' : ret; } function getType(contentType) diff --git a/src/Resources/Resources.scss b/src/Resources/Resources.scss index 0680657..0a6ea26 100644 --- a/src/Resources/Resources.scss +++ b/src/Resources/Resources.scss @@ -85,6 +85,9 @@ } &.key { white-space: nowrap; + max-width: 120px; + overflow-x: auto; + -webkit-overflow-scrolling: touch; } &.control { width: 40px;