Giter Site home page Giter Site logo

eruda's Introduction

Eruda

Console for Mobile Browsers.

Eruda

Why

Logging things out on mobile browser is never an easy stuff. I used to include window onerror alert script inside pages to find out JavaScript errors, kind of stupid and inefficient. Desktop browser DevTools is great, and I wish there is a similar one on mobile side, which leads to the creation of Eruda.

Demo

Demo

Browse it on your phone: http://liriliri.github.io/eruda/index.html?eruda=true

Features

  • Console: Display JavaScript logs.
  • Elements: Check dom state.
  • Network: Show performance timing.
  • Resource: Show localStorage, cookie information.
  • Info: Show url, user agent info.
  • Snippets: Include snippets you used most often.
  • Features: Browser feature detections.

Install

You can get it on npm.

npm install eruda --save

Add this script to your page.

(function () {
    var src = 'node_modules/eruda/dist/eruda.min.js';
    if (!/eruda=true/.test(window.location) && localStorage.getItem('active-eruda') != 'true') return;
    document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
})();

The JavaScript file size is quite huge and therefore not suitable to include in mobile pages. We add this script to make sure eruda is loaded only when eruda is set to true on url(http://example.com/?eruda=true).

Plugins

It is possible to enhance Eruda with more features by writing plugins. Please check eruda-fps, a plugin for displaying page fps info, as a start example to write your own custom tool panels.

License

Eruda is released under the MIT license. Please see LICENSE for full details.

eruda's People

Contributors

surunzi avatar

Watchers

James Cloos avatar yupeng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.