• Stars
    star
    17,281
  • Rank 1,487 (Top 0.04 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 8 years ago
  • Updated 17 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Console for mobile browsers

Eruda

Console for Mobile Browsers.

NPM version Build status Test coverage Downloads License

中文

Demo

Demo

Browse it on your phone: https://eruda.liriliri.io/

In order to try it for different sites, execute the script below on browser address bar.

javascript:(function () { var script = document.createElement('script'); script.src="https://cdn.jsdelivr.net/npm/eruda"; document.body.append(script); script.onload = function () { eruda.init(); } })();

Features

  • Console: Display JavaScript logs.
  • Elements: Check dom state.
  • Network: Show requests status.
  • Resources: Show localStorage, cookie information.
  • Info: Show url, user agent info.
  • Snippets: Include snippets used most often.
  • Sources: Html, js, css source viewer.

Install

You can get it on npm.

npm install eruda --save

Add this script to your page.

<script src="node_modules/eruda/eruda.js"></script>
<script>eruda.init();</script>

It's also available on jsDelivr and cdnjs.

<script src="//cdn.jsdelivr.net/npm/eruda"></script>
<script>eruda.init();</script>

The JavaScript file size is quite huge(about 100kb gzipped) and therefore not suitable to include in mobile pages. It's recommended to make sure eruda is loaded only when eruda is set to true on url(http://example.com/?eruda=true), for example:

;(function () {
    var src = '//cdn.jsdelivr.net/npm/eruda';
    if (!/eruda=true/.test(window.location) && localStorage.getItem('active-eruda') != 'true') return;
    document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
    document.write('<scr' + 'ipt>eruda.init();</scr' + 'ipt>');
})();

Configuration

When initialization, a configuration object can be passed in.

  • container: Container element. If not set, it will append an element directly under html root element.
  • tool: Choose which default tools you want, by default all will be added.

For more information, please check the documentation.

let el = document.createElement('div');
document.body.appendChild(el);

eruda.init({
    container: el,
    tool: ['console', 'elements']
});

Plugins

If you want to create a plugin yourself, follow the guides here.

Related Projects

  • eruda-android: Simple webview with eruda loaded automatically.
  • chii: Remote debugging tool.
  • chobitsu: Chrome devtools protocol JavaScript implementation.
  • licia: Utility library used by eruda.
  • luna: UI components used by eruda.

Third Party

Backers

Contribution

Read Contributing Guide for development setup instructions.

More Repositories

1

licia

Useful utility collection with zero dependencies
JavaScript
2,258
star
2

chii

Remote debugging tool
JavaScript
1,569
star
3

eustia

Tool for generating utility libraries
TypeScript
285
star
4

chobitsu

Chrome devtools protocol JavaScript implementation
TypeScript
244
star
5

luna

UI library
TypeScript
202
star
6

eruda-android

Simple webview with eruda loaded automatically
Kotlin
85
star
7

webvn

HTML5 visual novel engine
JavaScript
82
star
8

vivy-docs

Stable diffusion desktop app
53
star
9

whistle.chii

Whistle Chii plugin
JavaScript
40
star
10

liriliri

HTML5 visual novel engine
JavaScript
38
star
11

eruda-code

Eruda plugin for running JavaScript code
JavaScript
26
star
12

eruda-fps

Eruda plugin for displaying fps info
JavaScript
24
star
13

eruda-dom

Eruda plugin for navigating dom tree
JavaScript
19
star
14

vscode-settings-editor

VS Code visual editor for settings like npm package.json
TypeScript
18
star
15

eruda-features

Eruda plugin for browser feature detections
JavaScript
11
star
16

fione

A collection of utility libraries used by liriliri projects
JavaScript
10
star
17

eruda-plugin

Eruda plugin template
JavaScript
9
star
18

eruda-memory

Eruda plugin for displaying memory
JavaScript
9
star
19

eruda-timing

Eruda plugin for performance and resource timing
JavaScript
8
star
20

tinker

Toolbox for developers
TypeScript
5
star
21

eruda-geolocation

Eruda plugin for testing geolocation
JavaScript
4
star
22

webvn-demo

WebVN Html5 Visual Novel Engine Sample Project
JavaScript
4
star
23

eruda-docs

Eruda website
JavaScript
4
star
24

eruda-monitor

Eruda plugin for displaying fps and memory
JavaScript
4
star
25

eruda-touches

Eruda plugin for visualizing screen touches
JavaScript
3
star
26

eruda-worker

Eruda plugin for displaying web worker status
JavaScript
3
star
27

eruda-orientation

Eruda plugin for testing orientation api
JavaScript
3
star
28

eris

Node c++ addon utilities
C++
3
star
29

lina

Mobile UI library
3
star
30

eruda-vue

Eruda plugin for vue
JavaScript
3
star
31

eustia-component

Eustia component transpiler
JavaScript
3
star
32

deedlit

Simple scripting language
JavaScript
2
star
33

eustia-docs

Eustia website
JavaScript
2
star
34

eustia-babel

Eustia es6 transpiler
JavaScript
2
star
35

eustia-json

Eustia json transpiler
JavaScript
2
star
36

licia-docs

Licia website
JavaScript
1
star
37

webvn-jsdoc3

Jsdoc3 template for WebVN
JavaScript
1
star
38

eriri

WebGL 2d library
1
star
39

eruda-benchmark

Eruda plugin for running JavaScript benchmarks
JavaScript
1
star
40

eustia-lodash

Eustia lodash adapter
JavaScript
1
star