codefirst/AsakusaSatellite

View on GitHub
app/assets/javascripts/jquery-dropUploader.js

Summary

Maintainability
C
1 day
Test Coverage

Function dropUploader has 124 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $.fn.dropUploader = function(options){
        var self       = this;
        var options    = options;

        /**
Severity: Major
Found in app/assets/javascripts/jquery-dropUploader.js - About 4 hrs to fix

    Function result has 100 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            var result = this.each(function(){
                var elm = this;
                if(window.addEventListener){
                    elm.addEventListener(
                        'dragenter',
    Severity: Major
    Found in app/assets/javascripts/jquery-dropUploader.js - About 4 hrs to fix

      Consider simplifying this complex logical expression.
      Open

                  if(window.addEventListener){
                      elm.addEventListener(
                          'dragenter',
                          (options['onDragenter'] || function(){}),
                          options['bubbling']
      Severity: Major
      Found in app/assets/javascripts/jquery-dropUploader.js - About 1 hr to fix

        Avoid deeply nested control flow statements.
        Open

                                                    if(typeof options['onProgress'] === 'function'){
                                                        options['onProgress'](0);
                                                    }
        Severity: Major
        Found in app/assets/javascripts/jquery-dropUploader.js - About 45 mins to fix

          There are no issues that match your filters.

          Category
          Status