UNPKG

3.31 kBMarkdownView Raw
1# console-log-div
2
3> Clones console.log calls to a created div in the page. Great for demos and experiments.
4
5[Demo](http://glebbahmutov.com/console-log-div/test/index.html)
6
7[![NPM][console-log-div-icon] ][console-log-div-url]
8
9[![Build status][console-log-div-ci-image] ][console-log-div-ci-url]
10[![dependencies][console-log-div-dependencies-image] ][console-log-div-dependencies-url]
11[![devdependencies][console-log-div-devdependencies-image] ][console-log-div-devdependencies-url]
12
13Screenshot
14
15![console-log-div image][console-log-div image]
16
17## Use
18
19* Grab using npm or bower under name `console-log-div`.
20* Include 'console-log-div.js' in your page. `console.log` calls will be shown in the div on the page.
21
22```
23<script src="bower_components/console-log-div/console-log-div.js"></script>
24```
25
26The created div will have class `.console-log-div`, thus you can style it
27
28```
29<style>
30.console-log-div {
31 border: 1px solid gray;
32 padding: 5px 10px;
33 border-radius: 5px;
34 width: 95% !important;
35 background-color: #efefef;
36}
37</style>
38```
39
40### Small print
41
42Author: Gleb Bahmutov &copy; 2015
43
44* [@bahmutov](https://twitter.com/bahmutov)
45* [glebbahmutov.com](http://glebbahmutov.com)
46* [blog](http://bahmutov.calepin.co/)
47
48License: MIT - do anything with the code, but don't blame me if it does not work.
49
50Spread the word: tweet, star on github, etc.
51
52Support: if you find any problems with this module, email / tweet /
53[open issue](https://github.com/bahmutov/console-log-div/issues) on Github
54
55## MIT License
56
57Copyright (c) 2015 Gleb Bahmutov
58
59Permission is hereby granted, free of charge, to any person
60obtaining a copy of this software and associated documentation
61files (the "Software"), to deal in the Software without
62restriction, including without limitation the rights to use,
63copy, modify, merge, publish, distribute, sublicense, and/or sell
64copies of the Software, and to permit persons to whom the
65Software is furnished to do so, subject to the following
66conditions:
67
68The above copyright notice and this permission notice shall be
69included in all copies or substantial portions of the Software.
70
71THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
72EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
73OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
74NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
75HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
76WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
77FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
78OTHER DEALINGS IN THE SOFTWARE.
79
80[console-log-div-icon]: https://nodei.co/npm/console-log-div.png?downloads=true
81[console-log-div-url]: https://npmjs.org/package/console-log-div
82[console-log-div-ci-image]: https://travis-ci.org/bahmutov/console-log-div.png?branch=master
83[console-log-div-ci-url]: https://travis-ci.org/bahmutov/console-log-div
84[console-log-div-dependencies-image]: https://david-dm.org/bahmutov/console-log-div.png
85[console-log-div-dependencies-url]: https://david-dm.org/bahmutov/console-log-div
86[console-log-div-devdependencies-image]: https://david-dm.org/bahmutov/console-log-div/dev-status.png
87[console-log-div-devdependencies-url]: https://david-dm.org/bahmutov/console-log-div#info=devDependencies
88[console-log-div image]: images/console-log-div.png