Geek-Research-Lab/MeowJS

View on GitHub
NotAdded/video/new.js

Summary

Maintainability
C
1 day
Test Coverage

Function onReady has 99 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    client.onReady = function() {
        xConsole.append('<li>Connected. Get PeerID '+client.peerID);
        xConsole.append('<li>Select a file to share: <input type=file id=xFile />');
        z('#xFile').on('change', function (xEvent) {
            z('#xFile').attr('disabled', true);
Severity: Major
Found in NotAdded/video/new.js - About 3 hrs to fix

    Function onMeta has 80 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                client.onMeta = function(meta) {
                    client.file.write(file, 0, function () {
                        client.pieceQueue = [];
                        client.finishedPiece = x.map(client.finishedPiece, function() {
                            return 1;
    Severity: Major
    Found in NotAdded/video/new.js - About 3 hrs to fix

      Function onMessage has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                                  peer.onMessage = function(data) {
                                      var xData, piece, block;
                                      if(x.isObject(data) || data.indexOf('{') === 0) {
                                          var msg = x.isObject(data) ? data : JSON.parse(data);
                                          if(msg.cmd === 'request block') {}
      Severity: Minor
      Found in NotAdded/video/new.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status