-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathindex.html
112 lines (88 loc) · 4.91 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title>Debug.js by binnng</title>
<style type="text/css">
a[href*="tongji.baidu"]{
display: none;
}
</style>
</head>
<body>
<div id="container">
<div class="inner">
<header>
<h1>Debug.js</h1>
<h2>在手机上打印调试信息。</h2>
</header>
<section id="downloads" class="clearfix">
<a href="https://github.com/binnng/debug.js/zipball/master" id="download-zip" class="button"><span>Download .zip</span></a>
<a href="https://github.com/binnng/debug.js/tarball/master" id="download-tar-gz" class="button"><span>Download .tar.gz</span></a>
<a href="https://github.com/binnng/debug.js" id="view-on-github" class="button"><span>View on GitHub</span></a>
</section>
<hr>
<section id="main_content">
<h1>
<a name="debugjs" class="anchor" href="#debugjs"><span class="octicon octicon-link"></span></a>debug.js</h1>
<p>在手机上打印调试信息。</p>
<h3>
<a name="%E5%BF%AB%E9%80%9F%E4%B8%8A%E6%89%8B" class="anchor" href="#%E5%BF%AB%E9%80%9F%E4%B8%8A%E6%89%8B"><span class="octicon octicon-link"></span></a>快速上手</h3>
<div class="highlight highlight-javascript"><pre><span class="nx">debug</span><span class="p">.</span><span class="nx">success</span><span class="p">(</span><span class="s2">"This is success message:)"</span><span class="p">);</span>
<span class="nx">debug</span><span class="p">.</span><span class="nx">error</span><span class="p">(</span><span class="s2">"This is error message:)"</span><span class="p">);</span>
<span class="nx">debug</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">"This is primary message:)"</span><span class="p">);</span>
<span class="nx">debug</span><span class="p">.</span><span class="nx">log</span><span class="p">({</span><span class="nx">a</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span> <span class="nx">b</span><span class="o">:</span> <span class="mi">2</span><span class="p">});</span>
<span class="nx">debug</span><span class="p">.</span><span class="nx">log</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]);</span>
</pre></div>
<p>为了方便调试,<code>debug.js</code>会默认开启捕捉浏览器的报错。如果你不需要这个功能,可以这样禁止它:</p>
<pre>
debug.guai();
</pre>
<h3>
<a name="%E9%A2%84%E8%A7%88" class="anchor" href="#%E9%A2%84%E8%A7%88"><span class="octicon octicon-link"></span></a>预览</h3>
<p><img src="https://cloud.githubusercontent.com/assets/2696107/4680760/96b74744-560d-11e4-92bb-ab1e2af40573.png" alt="preview"></p>
<h3>
<a name="%E9%A2%84%E8%A7%88" class="anchor" href="#%E9%A2%84%E8%A7%88"><span class="octicon octicon-link"></span></a>安装</h3>
<pre>
bower install binnng/debug.js
</pre>
<pre>
component install binnng/debug.js
</pre>
<h3>
<a name="%E9%A2%84%E8%A7%88" class="anchor" href="#%E9%A2%84%E8%A7%88"><span class="octicon octicon-link"></span></a>Angualr</h3>
<p>如果你使用angular:</p>
<pre>
var app = angular.module("mifan", [
"binnng/debug"
]);
app.controller("ctrl", function($debug) {
$debug.success("Welcome to debug.js");
});
</pre>
<h3>
<a name="%E9%A2%84%E8%A7%88" class="anchor" href="#%E9%A2%84%E8%A7%88"><span class="octicon octicon-link"></span></a>源码</h3>
<p><a href="http://binnng.github.io/debug.js/docs/debug.html">http://binnng.github.io/debug.js/docs/debug.html</a></p>
<h3>
<a name="%E9%A2%84%E8%A7%88" class="anchor" href="#%E9%A2%84%E8%A7%88"><span class="octicon octicon-link"></span></a>Demo</h3>
<p><a href="http://binnng.github.io/debug.js/demo/index.html">http://binnng.github.io/debug.js/demo/index.html</a></p>
</section>
<footer>
Debug.js is maintained by <a href="https://github.com/binnng">binnng</a><br>
This page was generated by <a href="http://pages.github.com">GitHub Pages</a>. Tactile theme by <a href="https://twitter.com/jasonlong">Jason Long</a>.
</footer>
</div>
</div>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F0808592e3802a8d59e78e2e601623a22' type='text/javascript'%3E%3C/script%3E"));
</script>
</body>
</html>