web/assets/app.js
function init(opts) {
      var self = this;

      // Elements
      _logContainer = opts.container;
      _filterInput = opts.filterInput;
      _filterInput.focus();
      _topbar = opts.topbar;
      _body = opts.body;

      _setFilterValueFromURL(_filterInput, window.location.toString());

      // Filter input bind
      _filterInput.addEventListener('keyup', function(e) {
        // ESC
        if (e.keyCode === 27) {
          this.value = '';
          _filterValue = '';
        } else {
          _filterValue = this.value;
        }
        _setFilterParam(_filterValue, window.location.toString());
        _filterLogs();
      });

      // Favicon counter bind
      window.addEventListener(
        'blur',
        function() {
          _isWindowFocused = false;
        },
        true
      );
      window.addEventListener(
        'focus',
        function() {
          _isWindowFocused = true;
          _faviconReset();
        },
        true
      );

      // socket.io init
      _socket = opts.socket;
      _socket
        .on('options:lines', function(limit) {
          _linesLimit = limit;
        })
        .on('options:hide-topbar', function() {
          _topbar.className += ' hide';
          _body.className = 'no-topbar';
        })
        .on('options:no-indent', function() {
          _logContainer.className += ' no-indent';
        })
        .on('options:highlightConfig', function(highlightConfig) {
          _highlightConfig = highlightConfig;
        })
        .on('line', function(line) {
          self.log(line);
        });
    }
function init(opts) {
      var self = this;

      // Elements
      _logContainer = opts.container;
      _filterInput = opts.filterInput;
      _filterInput.focus();
      _topbar = opts.topbar;
      _body = opts.body;

      _setFilterValueFromURL(_filterInput, window.location.toString());

      // Filter input bind
      _filterInput.addEventListener('keyup', function(e) {
        // ESC
        if (e.keyCode === 27) {
          this.value = '';
          _filterValue = '';
        } else {
          _filterValue = this.value;
        }
        _setFilterParam(_filterValue, window.location.toString());
        _filterLogs();
      });

      // Favicon counter bind
      window.addEventListener(
        'blur',
        function() {
          _isWindowFocused = false;
        },
        true
      );
      window.addEventListener(
        'focus',
        function() {
          _isWindowFocused = true;
          _faviconReset();
        },
        true
      );

      // socket.io init
      _socket = opts.socket;
      _socket
        .on('options:lines', function(limit) {
          _linesLimit = limit;
        })
        .on('options:hide-topbar', function() {
          _topbar.className += ' hide';
          _body.className = 'no-topbar';
        })
        .on('options:no-indent', function() {
          _logContainer.className += ' no-indent';
        })
        .on('options:highlightConfig', function(highlightConfig) {
          _highlightConfig = highlightConfig;
        })
        .on('line', function(line) {
          self.log(line);
        });
    }
function init ( opts ) { var self = this ; // Elements _logContainer = opts . container ; _filterInput = opts . filterInput ; _filterInput . focus ( ) ; _topbar = opts . topbar ; _body = opts . body ; _setFilterValueFromURL ( _filterInput , window . location . toString ( ) ) ; // Filter input bind _filterInput . addEventListener ( 'keyup' , function ( e ) { // ESC if ( e . keyCode === 27 ) { this . value = '' ; _filterValue = '' ; } else { _filterValue = this . value ; } _setFilterParam ( _filterValue , window . location . toString ( ) ) ; _filterLogs ( ) ; } ) ; // Favicon counter bind window . addEventListener ( 'blur' , function ( ) { _isWindowFocused = false ; } , true ) ; window . addEventListener ( 'focus' , function ( ) { _isWindowFocused = true ; _faviconReset ( ) ; } , true ) ; // socket.io init _socket = opts . socket ; _socket . on ( 'options:lines' , function ( limit ) { _linesLimit = limit ; } ) . on ( 'options:hide-topbar' , function ( ) { _topbar . className += ' hide' ; _body . className = 'no-topbar' ; } ) . on ( 'options:no-indent' , function ( ) { _logContainer . className += ' no-indent' ; } ) . on ( 'options:highlightConfig' , function ( highlightConfig ) { _highlightConfig = highlightConfig ; } ) . on ( 'line' , function ( line ) { self . log ( line ) ; } ) ; }
Init socket.io communication and log container

@param {Object} opts options
Init socket . io communication and log container