fossasia/loklak_webclient

View on GitHub

Showing 566 of 915 total issues

Avoid deeply nested control flow statements.
Open

                if (sizes) {
                    property.sizes = sizes;
                }
Severity: Major
Found in iframely/lib/plugins/system/meta/HTMLMetaHandler.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                    if (media) {
                        property.media = media;
                    }
    Severity: Major
    Found in iframely/lib/plugins/system/meta/HTMLMetaHandler.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              while (!match && j < res.length) {
                                  match = uri.match(res[j]);
                                  j++;
                              }
      Severity: Major
      Found in iframely/lib/core.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if (match) {
                                    registerDomainPlugin(plugin, null);
                                }
        Severity: Major
        Found in iframely/lib/core.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if (!(key in context) || key === 'whitelistRecord') {
                                      context[key] = r.data[key];
                                      hasNewData = true;
                                  }
          Severity: Major
          Found in iframely/lib/core.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                            if (type) {
                                property.type = type;
                            }
            Severity: Major
            Found in iframely/lib/plugins/system/meta/HTMLMetaHandler.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                          if (!exists) {
                                              initialPlugins.push(plugins[foundPluginId]);
                                          }
              Severity: Major
              Found in iframely/lib/core.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                            if (error) {
                                                console.error(error.reason);
                                                if (error.evidence) {
                                                    console.error(error.evidence+'\n');
                                                }
                Severity: Major
                Found in iframely/lib/loader/pluginLoader.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          for(var type in protocol) {
                                              if (!(type in recordProtocol)) {
                                                  recordProtocol[type] = protocol[type];
                                              }
                                          }
                  Severity: Major
                  Found in iframely/lib/whitelist.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if (!recordProtocol) {
                                                recordProtocol = record[protocolId] = {};
                                            } else {
                                                recordProtocol = _.extend({}, recordProtocol);
                                            }
                    Severity: Major
                    Found in iframely/lib/whitelist.js - About 45 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                              if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC || e.which == KEY.ENTER || e.which === KEY.BACKSPACE) {
                                return;
                              }
                      Severity: Major
                      Found in app/js/components/select.js - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                    if (('File' in w && data instanceof w.File) ||
                                        ('Blob' in w && data instanceof w.Blob) ||
                                        ('FileList' in w && data instanceof w.FileList)) {
                                        data = {file: data};
                                    }
                        Severity: Major
                        Found in app/js/components/hello.all.js - About 40 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                                      if (i) {
                                          var n = w;
                                          n.rE || n.eE || (k += r),
                                          D += f();
                                          do
                          Severity: Major
                          Found in app/js/components/highlight.js - About 40 mins to fix

                            Consider simplifying this complex logical expression.
                            Open

                                    if (!/\btoken\b/.test(responseType) ||
                                    parseInt(provider.oauth.version, 10) < 2 ||
                                    (opts.display === 'none' && provider.oauth.grant && session && session.refresh_token)) {
                            
                                        // Add the oauth endpoints
                            Severity: Major
                            Found in app/js/components/hello.all.js - About 40 mins to fix

                              Consider simplifying this complex logical expression.
                              Open

                                          if ((meta.og.video && !meta.og.type )|| (meta.og.type && typeof meta.og.type === 'string' && meta.og.type.match(/video|movie/i)) || /\/videos?\//i.test(url)) {
                              
                                              has_player = true;
                                          }
                              Severity: Major
                              Found in iframely/plugins/meta/media-detector.js - About 40 mins to fix

                                Consider simplifying this complex logical expression.
                                Open

                                                if (n += a.offsetTop || 0,
                                                s += a.offsetLeft || 0,
                                                n += parseInt(o.DomUtil.getStyle(a, "borderTopWidth"), 10) || 0,
                                                s += parseInt(o.DomUtil.getStyle(a, "borderLeftWidth"), 10) || 0,
                                                i = o.DomUtil.getStyle(a, "position"),
                                Severity: Major
                                Found in app/js/components/leaflet.js - About 40 mins to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                              if (this._moved = !1,
                                              !(t.shiftKey || 1 !== t.which && 1 !== t.button && !t.touches || (o.DomEvent.stopPropagation(t),
                                              o.Draggable._disabled || (o.DomUtil.disableImageDrag(),
                                              o.DomUtil.disableTextSelection(),
                                              this._moving)))) {
                                  Severity: Major
                                  Found in app/js/components/leaflet.js - About 40 mins to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                                    if ("relative" === i && !a.offsetLeft) {
                                                        var l = o.DomUtil.getStyle(a, "width")
                                                          , u = o.DomUtil.getStyle(a, "max-width")
                                                          , c = a.getBoundingClientRect();
                                                        ("none" !== l || "none" !== u) && (s += c.left + a.clientLeft),
                                    Severity: Major
                                    Found in app/js/components/leaflet.js - About 40 mins to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                                  if (/article|blog|news|post|noticia/i.test(url) 
                                                      || (/\/(\d{4})\/(\d{2})\/(\d{2})/).test(url) 
                                                      || (meta.og && meta.og.type && typeof meta.og.type === 'string' && meta.og.type.match(/article|post/i))) {
                                                      
                                                      has_reader = true;
                                      Severity: Major
                                      Found in iframely/plugins/meta/media-detector.js - About 40 mins to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                            if (req.oauthshim &&
                                                    req.oauthshim.redirect &&
                                                    req.oauthshim.data &&
                                                    req.oauthshim.data.access_token &&
                                                    req.oauthshim.options &&
                                        Severity: Major
                                        Found in oauth-proxy/index.js - About 40 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language