devcows/hugo-universal-theme

View on GitHub

Showing 28 of 69 total issues

File hpneo.gmaps.js has 1686 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function(root, factory) {
  if(typeof exports === 'object') {
    module.exports = factory();
  }
  else if(typeof define === 'function' && define.amd) {
Severity: Major
Found in static/js/hpneo.gmaps.js - About 4 days to fix

    Function GMaps has 258 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var GMaps = (function(global) {
      "use strict";
    
      var doc = document;
    
    
    Severity: Major
    Found in static/js/hpneo.gmaps.js - About 1 day to fix

      Function GMaps has 254 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        var GMaps = function(options) {
          if (!this) return new GMaps(options);
      
          options.zoom = options.zoom || 15;
          options.mapType = options.mapType || 'roadmap';
      Severity: Major
      Found in static/js/hpneo.gmaps.js - About 1 day to fix

        Function staticMapURL has 169 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        GMaps.staticMapURL = function(options){
          var parameters = [],
              data,
              static_root = 'https://maps.googleapis.com/maps/api/staticmap';
        
        
        Severity: Major
        Found in static/js/hpneo.gmaps.js - About 6 hrs to fix

          Function drawOverlay has 92 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          GMaps.prototype.drawOverlay = function(options) {
            var overlay = new google.maps.OverlayView(),
                auto_show = true;
          
            overlay.setMap(this.map);
          Severity: Major
          Found in static/js/hpneo.gmaps.js - About 3 hrs to fix

            File front.js has 307 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /* global $this: true */
            /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "animationsSlider" }] */
            
            if ($.cookie('themeCSSpath')) {
              $('link#theme-stylesheet').attr('href', $.cookie('themeCSSpath'))
            Severity: Minor
            Found in static/js/front.js - About 3 hrs to fix

              Function createMarker has 81 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              GMaps.prototype.createMarker = function(options) {
                if (options.lat == undefined && options.lng == undefined && options.position == undefined) {
                  throw 'No latitude or longitude defined.';
                }
              
              
              Severity: Major
              Found in static/js/hpneo.gmaps.js - About 3 hrs to fix

                Function addLayer has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                GMaps.prototype.addLayer = function(layerName, options) {
                  //var default_layers = ['weather', 'clouds', 'traffic', 'transit', 'bicycling', 'panoramio', 'places'];
                  options = options || {};
                  var layer;
                
                
                Severity: Major
                Found in static/js/hpneo.gmaps.js - About 2 hrs to fix

                  Function map has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function map () {
                    if ($('#map').length) {
                      var lat = $('#gmap-lat').val()
                      var lng = $('#gmap-lng').val()
                      var direction = $('#gmap-dir').val()
                  Severity: Major
                  Found in static/js/gmaps.init.js - About 2 hrs to fix

                    Function getRoutes has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    GMaps.prototype.getRoutes = function(options) {
                      switch (options.travelMode) {
                        case 'bicycling':
                          travelMode = google.maps.TravelMode.BICYCLING;
                          break;
                    Severity: Major
                    Found in static/js/hpneo.gmaps.js - About 2 hrs to fix

                      Consider simplifying this complex logical expression.
                      Open

                        if ($('.owl-carousel').length) {
                          $('.customers').owlCarousel({
                            items: ($('.customers').attr('data-items') || 6),
                            slideSpeed: ($('.customers').attr('data-slide-speed') || 2000),
                            paginationSpeed: ($('.customers').attr('data-pagination-speed') || 1000),
                      Severity: Critical
                      Found in static/js/front.js - About 2 hrs to fix

                        Consider simplifying this complex logical expression.
                        Open

                                if (options.search || options.nearbySearch || options.radarSearch) {
                                  var placeSearchRequest  = {
                                    bounds : options.bounds || null,
                                    keyword : options.keyword || null,
                                    location : options.location || null,
                        Severity: Critical
                        Found in static/js/hpneo.gmaps.js - About 2 hrs to fix

                          Function drawSteppedRoute has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          GMaps.prototype.drawSteppedRoute = function(options) {
                            var self = this;
                            
                            if (options.origin && options.destination) {
                              this.getRoutes({
                          Severity: Minor
                          Found in static/js/hpneo.gmaps.js - About 1 hr to fix

                            Function drawPolyline has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            GMaps.prototype.drawPolyline = function(options) {
                              var path = [],
                                  points = options.path;
                            
                              if (points.length) {
                            Severity: Minor
                            Found in static/js/hpneo.gmaps.js - About 1 hr to fix

                              Function travelRoute has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              GMaps.prototype.travelRoute = function(options) {
                                if (options.origin && options.destination) {
                                  this.getRoutes({
                                    origin: options.origin,
                                    destination: options.destination,
                              Severity: Minor
                              Found in static/js/hpneo.gmaps.js - About 1 hr to fix

                                Function draw has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  overlay.draw = function() {
                                    var projection = this.getProjection(),
                                        pixel = projection.fromLatLngToDivPixel(new google.maps.LatLng(options.lat, options.lng));
                                
                                    options.horizontalOffset = options.horizontalOffset || 0;
                                Severity: Minor
                                Found in static/js/hpneo.gmaps.js - About 1 hr to fix

                                  Function createControl has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  GMaps.prototype.createControl = function(options) {
                                    var control = document.createElement('div');
                                  
                                    control.style.cursor = 'pointer';
                                    
                                  Severity: Minor
                                  Found in static/js/hpneo.gmaps.js - About 1 hr to fix

                                    Function sliders has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function sliders () {
                                      if ($('.owl-carousel').length) {
                                        $('.customers').owlCarousel({
                                          items: ($('.customers').attr('data-items') || 6),
                                          slideSpeed: ($('.customers').attr('data-slide-speed') || 2000),
                                    Severity: Minor
                                    Found in static/js/front.js - About 1 hr to fix

                                      Function onAdd has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        overlay.onAdd = function() {
                                          var el = document.createElement('div');
                                      
                                          el.style.borderStyle = "none";
                                          el.style.borderWidth = "0px";
                                      Severity: Minor
                                      Found in static/js/hpneo.gmaps.js - About 1 hr to fix

                                        Function getElevations has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        GMaps.prototype.getElevations = function(options) {
                                          options = extend_object({
                                            locations: [],
                                            path : false,
                                            samples : 256
                                        Severity: Minor
                                        Found in static/js/hpneo.gmaps.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language