fossasia/loklak_webclient

View on GitHub

Showing 566 of 915 total issues

Function getData has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    getData: function(url, og, whitelistRecord) {

        // do not process if there is a whitelist record for this domain as processing will take longer
        if (!whitelistRecord.isDefault && whitelistRecord.isAllowed && whitelistRecord.isAllowed('og.video')) {return;}
        
Severity: Minor
Found in iframely/plugins/links/promo/og-youtube.js - About 1 hr to fix

    Function histogramDirective has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function histogramDirective($window) {
        return {
            restrict: 'E',
            template: '<div></div>',
            replace: true,
    Severity: Minor
    Found in app/js/directives/histogram.js - About 1 hr to fix

      Function _setupUIElements has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          var _setupUIElements = function() {
              var item,
                  classAttr,
                  uiElement;
      
      
      Severity: Minor
      Found in app/js/components/photoswipe-ui-default.js - About 1 hr to fix

        Function getLink has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            getLink: function (oembed) {
        
                var links = [];
        
                if (oembed.type === "photo") {
        Severity: Minor
        Found in iframely/plugins/domains/smugmug.com.js - About 1 hr to fix

          Function getLink has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              getLink: function(sm4, whitelistRecord) {
          
                  if (!(sm4.video && sm4.video.embed && whitelistRecord.isAllowed && whitelistRecord.isAllowed('sm4.video'))) {
                      return;
                  }
          Severity: Minor
          Found in iframely/plugins/links/sm4.js - About 1 hr to fix

            Function getData has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                getData: function(urlMatch, request, options, cb) {
            
                    var consumer_key = options.getProviderOptions('tumblr.consumer_key');
            
                    if (!consumer_key) {
            Severity: Minor
            Found in iframely/plugins/domains/tumblr.com/tumblr.api.js - About 1 hr to fix

              Function format has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function format(o, headers, req) {
                      if (typeof o === 'boolean') {
                          o = {success: o};
                      }
              
              
              Severity: Minor
              Found in app/js/components/hello.all.js - About 1 hr to fix

                Function l has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function l(e, a, i) {
                        function n() {
                            return e.length && a.length ? e[0].offset != a[0].offset ? e[0].offset < a[0].offset ? e : a : "start" == a[0].event ? e : a : e.length ? e : a
                        }
                        function o(e) {
                Severity: Minor
                Found in app/js/components/highlight.js - About 1 hr to fix

                  Function link has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              link : function ($scope, $element, $attrs) {
                                 // Watch for changes on scope if model is provided
                                 if ($attrs.fullscreen) {
                                    $scope.$watch($attrs.fullscreen, function(value) {
                                       var isEnabled = Fullscreen.isEnabled();
                  Severity: Minor
                  Found in app/js/components/angular-fullscreen.js - About 1 hr to fix

                    Function getPropFunction has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function getPropFunction(params) {
                          var func;
                    
                          if(!params.exclude && !params.include) {
                            func = function(properties) {
                    Severity: Minor
                    Found in app/js/components/geojson.js - About 1 hr to fix

                      Function controller has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              controller: function($scope, $element) {
                                  $scope.showMoreAction = false;
                      
                                  // Modal can be closed by clicking around the modal
                                  $scope.closeModal = function(event) {
                      Severity: Minor
                      Found in app/js/directives/searchModal.js - About 1 hr to fix

                        Function link has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              link: function (scope, element, attrs) {
                                var canvas  = element.find('canvas')[0];
                                var context = canvas.getContext('2d');
                                var chart;
                        
                        
                        Severity: Minor
                        Found in app/js/directives/chartjs-directive.js - About 1 hr to fix

                          Function static has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              exports.static = function(root, options){
                                  options = options || {};
                          
                                  // root required
                                  if (!root) throw new Error('static() root path required');
                          Severity: Minor
                          Found in iframely/utils.js - About 1 hr to fix

                            Function getLink has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                getLink: function(htmlparser, cb) {
                            
                                    var end = false;
                            
                                    var parser =  {
                            Severity: Minor
                            Found in iframely/plugins/domains/v.pptv.com.js - About 1 hr to fix

                              Function getLink has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  getLink: function(oembed, whitelistRecord) {
                              
                              
                                      if (!(oembed.type === "video" && whitelistRecord.isAllowed && whitelistRecord.isAllowed('oembed.video'))) {
                                          return;
                              Severity: Minor
                              Found in iframely/plugins/links/oembed-video.js - About 1 hr to fix

                                Function getPluginMethods has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function getPluginMethods(pluginPath,plugin) {
                                        var methods = {};
                                        for (var name in plugin) {
                                            var func = plugin[name];
                                            if (typeof func === "function" && PLUGIN_METHODS.indexOf(name) > -1) {
                                Severity: Minor
                                Found in iframely/lib/loader/pluginLoader.js - About 1 hr to fix

                                  Function filterMap has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      vm.filterMap = function() {
                                          cancelAllRequest();
                                          if (window.map) { delete(window.map); }
                                          vm.newStasuses = [];
                                          $rootScope.root.globalFilter = "map";
                                  Severity: Minor
                                  Found in app/js/controllers/search.js - About 1 hr to fix

                                    Function _dropHandler has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                          var _dropHandler = function(droppedItemIndex) {
                                            var theList = scope.$eval(attrs.uiSelectSort),
                                              itemToMove = theList[droppedItemIndex],
                                              newIndex = null;
                                    
                                    
                                    Severity: Minor
                                    Found in app/js/components/select.js - About 1 hr to fix

                                      Function getLinks has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          getLinks: function(__promoUri, promo) {
                                      
                                              var hasGoodLinks = false;
                                              var links = promo.links.filter(function(link) {
                                                  var match = _.intersection(link.rel, CONFIG.PROMO_RELS);
                                      Severity: Minor
                                      Found in iframely/plugins/links/promo/promo.js - About 1 hr to fix

                                        Function getLink has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            getLink: function(urlMatch, og, options, cb) {
                                        
                                        
                                                if (!og.image) {
                                                    cb('OG image not available');            
                                        Severity: Minor
                                        Found in iframely/plugins/domains/geogebra.org.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language