ImpressCMS/impresscms

View on GitHub
htdocs/include/xoops.js

Summary

Maintainability
F
1 wk
Test Coverage

File xoops.js has 512 lines of code (exceeds 250 allowed). Consider refactoring.
Open

if ( typeof window.$ != 'function' ) {
    function $() {
        var elements = new Array();

        for (var i = 0; i < arguments.length; i++) {
Severity: Major
Found in htdocs/include/xoops.js - About 1 day to fix

    Function xoopsCodeText has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

    function xoopsCodeText(id, hiddentext, enterTextboxPhrase){
        var textareaDom = xoopsGetElementById(id);
        var textDom = xoopsGetElementById(id + "Addtext");
        var fontDom = xoopsGetElementById(id + "Font");
        var colorDom = xoopsGetElementById(id + "Color");
    Severity: Minor
    Found in htdocs/include/xoops.js - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Consider simplifying this complex logical expression.
    Open

        if ( text != null && text != "" ) {
            if (enterCodeLangPhrase == null) {
                enterCodeLangPhrase = "Now, enter the language of your code.";
            }
            if (CodeLangTypePhrase == null) {
    Severity: Critical
    Found in htdocs/include/xoops.js - About 2 hrs to fix

      Function xoopsValidate has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
      Open

      function xoopsValidate(subjectId, textareaId, submitId, plzCompletePhrase, msgTooLongPhrase, allowedCharPhrase, currCharPhrase) {
          var maxchars = 65535;
          var subjectDom = xoopsGetElementById(subjectId);
          var textareaDom = xoopsGetElementById(textareaId);
          var submitDom = xoopsGetElementById(submitId);
      Severity: Minor
      Found in htdocs/include/xoops.js - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function xoopsCodeCode has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
      Open

      function xoopsCodeCode(id, enterCodePhrase, enterCodeLangPhrase, CodeLangTypePhrase, errorCodeLangPhrase){
          if (enterCodePhrase == null) {
              enterCodePhrase = "Enter the codes that you want to add.";
          }
          var text = prompt(enterCodePhrase, "");
      Severity: Minor
      Found in htdocs/include/xoops.js - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function xoopsCodeText has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function xoopsCodeText(id, hiddentext, enterTextboxPhrase){
          var textareaDom = xoopsGetElementById(id);
          var textDom = xoopsGetElementById(id + "Addtext");
          var fontDom = xoopsGetElementById(id + "Font");
          var colorDom = xoopsGetElementById(id + "Color");
      Severity: Major
      Found in htdocs/include/xoops.js - About 2 hrs to fix

        Function xoopsCodeImg has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

        function xoopsCodeImg(id, enterImgUrlPhrase, enterImgPosPhrase, imgPosRorLPhrase, errorImgPosPhrase){
            if (enterImgUrlPhrase == null) {
                enterImgUrlPhrase = "Enter the URL of the image you want to add:";
            }
            var text = prompt(enterImgUrlPhrase, "");
        Severity: Minor
        Found in htdocs/include/xoops.js - About 2 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function xoopsCodeUrl has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

        function xoopsCodeUrl(id, enterUrlPhrase, enterWebsitePhrase){
            if (enterUrlPhrase == null) {
                enterUrlPhrase = "Enter the URL of the link you want to add:";
            }
            var text = prompt(enterUrlPhrase, "");
        Severity: Minor
        Found in htdocs/include/xoops.js - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Consider simplifying this complex logical expression.
        Open

            if ( text != null && text != "" ) {
                if (enterImgPosPhrase == null) {
                    enterImgPosPhrase = "Now, enter the position of the image.";
                }
                if (imgPosRorLPhrase == null) {
        Severity: Critical
        Found in htdocs/include/xoops.js - About 1 hr to fix

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

          function xoopsCodeCode(id, enterCodePhrase, enterCodeLangPhrase, CodeLangTypePhrase, errorCodeLangPhrase){
              if (enterCodePhrase == null) {
                  enterCodePhrase = "Enter the codes that you want to add.";
              }
              var text = prompt(enterCodePhrase, "");
          Severity: Minor
          Found in htdocs/include/xoops.js - About 1 hr to fix

            Function xoopsValidate has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function xoopsValidate(subjectId, textareaId, submitId, plzCompletePhrase, msgTooLongPhrase, allowedCharPhrase, currCharPhrase) {
                var maxchars = 65535;
                var subjectDom = xoopsGetElementById(subjectId);
                var textareaDom = xoopsGetElementById(textareaId);
                var submitDom = xoopsGetElementById(submitId);
            Severity: Minor
            Found in htdocs/include/xoops.js - About 1 hr to fix

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

              function xoopsCodeImg(id, enterImgUrlPhrase, enterImgPosPhrase, imgPosRorLPhrase, errorImgPosPhrase){
                  if (enterImgUrlPhrase == null) {
                      enterImgUrlPhrase = "Enter the URL of the image you want to add:";
                  }
                  var text = prompt(enterImgUrlPhrase, "");
              Severity: Minor
              Found in htdocs/include/xoops.js - About 1 hr to fix

                Function xoopsValidate has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                function xoopsValidate(subjectId, textareaId, submitId, plzCompletePhrase, msgTooLongPhrase, allowedCharPhrase, currCharPhrase) {
                Severity: Major
                Found in htdocs/include/xoops.js - About 50 mins to fix

                  Function $ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function $() {
                          var elements = new Array();
                  
                          for (var i = 0; i < arguments.length; i++) {
                              var element = arguments[i];
                  Severity: Minor
                  Found in htdocs/include/xoops.js - About 45 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function openWithSelfMain has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  function openWithSelfMain(url,name,width,height,returnwindow) {
                  Severity: Minor
                  Found in htdocs/include/xoops.js - About 35 mins to fix

                    Function xoopsCodeCode has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    function xoopsCodeCode(id, enterCodePhrase, enterCodeLangPhrase, CodeLangTypePhrase, errorCodeLangPhrase){
                    Severity: Minor
                    Found in htdocs/include/xoops.js - About 35 mins to fix

                      Function showImgSelected has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      function showImgSelected(imgId, selectId, imgDir, extra, xoopsUrl) {
                      Severity: Minor
                      Found in htdocs/include/xoops.js - About 35 mins to fix

                        Function xoopsCodeImg has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        function xoopsCodeImg(id, enterImgUrlPhrase, enterImgPosPhrase, imgPosRorLPhrase, errorImgPosPhrase){
                        Severity: Minor
                        Found in htdocs/include/xoops.js - About 35 mins to fix

                          Function xoopsInsertText has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function xoopsInsertText(domobj, text)
                          {
                              if (domobj.createTextRange && domobj.caretPos){
                                    var caretPos = domobj.caretPos;
                                  caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) 
                          Severity: Minor
                          Found in htdocs/include/xoops.js - About 35 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              if (domobj.createTextRange && domobj.caretPos){
                                    var caretPos = domobj.caretPos;
                                  caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) 
                          == ' ' ? text + ' ' : text;  
                              } else if (domobj.getSelection && domobj.caretPos){
                          Severity: Major
                          Found in htdocs/include/xoops.js and 1 other location - About 7 hrs to fix
                          htdocs/modules/system/admin/images/js/imanager.js on lines 68..78

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 182.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                          function xoopsmakecenter(id,enterHiddenPhrase){
                              if (enterHiddenPhrase == null) {
                                  enterHiddenPhrase = "Enter The Text To Be Aligned On The Center Side:";
                              }
                              var text = prompt(enterHiddenPhrase, "");
                          Severity: Major
                          Found in htdocs/include/xoops.js and 1 other location - About 5 hrs to fix
                          htdocs/include/xoops.js on lines 367..383

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 149.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                          function xoopsmakeright(id,enterHiddenPhrase){
                              if (enterHiddenPhrase == null) {
                                  enterHiddenPhrase = "Enter The Text To Be Aligned On The Right Side:";
                              }
                              var text = prompt(enterHiddenPhrase, "");
                          Severity: Major
                          Found in htdocs/include/xoops.js and 1 other location - About 5 hrs to fix
                          htdocs/include/xoops.js on lines 350..366

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 149.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  if ( text2 == "l" || text2 == "L" ) {
                                      text2 = " align=left";
                                  } else if ( text2 == "r" || text2 == "R" ) {
                                      text2 = " align=right";
                                  } else if ( text2 == "c" || text2 == "C" ) {
                          Severity: Major
                          Found in htdocs/include/xoops.js and 1 other location - About 2 hrs to fix
                          htdocs/include/xoops.js on lines 406..414

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 91.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  } else if ( text2 == "c" || text2 == "C" ) {
                                      text2 = "_css";
                                  } else if ( text2 == "j" || text2 == "J" ) {
                                      text2 = "_js";
                                  } else if ( text2 == "h" || text2 == "H" ) {
                          Severity: Major
                          Found in htdocs/include/xoops.js and 1 other location - About 2 hrs to fix
                          htdocs/include/xoops.js on lines 272..280

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 91.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              for (i=0; i<divs.length;i++){
                                  if (/classname/.test(divs[i].className)){
                                      divs[i].style.display = 'none';
                                  }
                              }
                          Severity: Major
                          Found in htdocs/include/xoops.js and 1 other location - About 1 hr to fix
                          htdocs/modules/system/admin/images/js/imanager.js on lines 3..7

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 67.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 4 locations. Consider refactoring.
                          Open

                          function changeDisplay(id){
                              var elestyle = xoopsGetElementById(id).style;
                              if (elestyle.display == "block") {
                                  elestyle.display = "none";
                              } else {
                          Severity: Major
                          Found in htdocs/include/xoops.js and 3 other locations - About 1 hr to fix
                          htdocs/include/xoops.js on lines 96..103
                          htdocs/include/xoops.js on lines 105..112
                          htdocs/include/xoops.js on lines 114..121

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 65.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 4 locations. Consider refactoring.
                          Open

                          function makeLineThrough(id){
                              var eleStyle = xoopsGetElementById(id).style;
                              if (eleStyle.textDecoration != "line-through") {
                                  eleStyle.textDecoration = "line-through";
                              } else {
                          Severity: Major
                          Found in htdocs/include/xoops.js and 3 other locations - About 1 hr to fix
                          htdocs/include/xoops.js on lines 70..77
                          htdocs/include/xoops.js on lines 96..103
                          htdocs/include/xoops.js on lines 105..112

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 65.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 4 locations. Consider refactoring.
                          Open

                          function makeItalic(id){
                              var eleStyle = xoopsGetElementById(id).style;
                              if (eleStyle.fontStyle != "italic") {
                                  eleStyle.fontStyle = "italic";
                              } else {
                          Severity: Major
                          Found in htdocs/include/xoops.js and 3 other locations - About 1 hr to fix
                          htdocs/include/xoops.js on lines 70..77
                          htdocs/include/xoops.js on lines 105..112
                          htdocs/include/xoops.js on lines 114..121

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 65.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 4 locations. Consider refactoring.
                          Open

                          function makeUnderline(id){
                              var eleStyle = xoopsGetElementById(id).style;
                              if (eleStyle.textDecoration != "underline") {
                                  eleStyle.textDecoration = "underline";
                              } else {
                          Severity: Major
                          Found in htdocs/include/xoops.js and 3 other locations - About 1 hr to fix
                          htdocs/include/xoops.js on lines 70..77
                          htdocs/include/xoops.js on lines 96..103
                          htdocs/include/xoops.js on lines 114..121

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 65.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  while ( ( text2 != "" ) && ( text2 != "p" ) && ( text2 != "P" ) && ( text2 != "c" ) && ( text2 != "C" )  && ( text2 != "j" ) && ( text2 != "J" )  && ( text2 != "h" ) && ( text2 != "H" ) && ( text2 != null ) ) {
                          Severity: Minor
                          Found in htdocs/include/xoops.js and 1 other location - About 55 mins to fix
                          htdocs/include/xoops.js on lines 269..269

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 54.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  while ( ( text2 != "" ) && ( text2 != "r" ) && ( text2 != "R" ) && ( text2 != "c" ) && ( text2 != "C" ) && ( text2 != "l" ) && ( text2 != "L" ) && ( text2 != null ) ) {
                          Severity: Minor
                          Found in htdocs/include/xoops.js and 1 other location - About 55 mins to fix
                          htdocs/include/xoops.js on lines 401..401

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 54.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                                  if ( colorDomValue != "COLOR") {
                                      textDomValue = "[color=" + colorDomValue + "]" + textDomValue + "[/color]";
                                      colorDom.options[0].selected = true;
                                  }
                          Severity: Major
                          Found in htdocs/include/xoops.js and 2 other locations - About 55 mins to fix
                          htdocs/include/xoops.js on lines 439..442
                          htdocs/include/xoops.js on lines 447..450

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 53.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                                  if ( sizeDomValue != "SIZE") {
                                      textDomValue = "[size=" + sizeDomValue + "]" + textDomValue + "[/size]";
                                      sizeDom.options[0].selected = true;
                                  }
                          Severity: Major
                          Found in htdocs/include/xoops.js and 2 other locations - About 55 mins to fix
                          htdocs/include/xoops.js on lines 439..442
                          htdocs/include/xoops.js on lines 443..446

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 53.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                                  if ( fontDomValue != "FONT") {
                                      textDomValue = "[font=" + fontDomValue + "]" + textDomValue + "[/font]";
                                      fontDom.options[0].selected = true;
                                  }
                          Severity: Major
                          Found in htdocs/include/xoops.js and 2 other locations - About 55 mins to fix
                          htdocs/include/xoops.js on lines 443..446
                          htdocs/include/xoops.js on lines 447..450

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 53.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Unexpected trailing spaces found.
                          Open

                                  caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) 
                          Severity: Minor
                          Found in htdocs/include/xoops.js by editorconfig

                          Unexpected trailing spaces found.
                          Open

                              
                          Severity: Minor
                          Found in htdocs/include/xoops.js by editorconfig

                          Unexpected trailing spaces found.
                          Open

                                  
                          Severity: Minor
                          Found in htdocs/include/xoops.js by editorconfig

                          Unexpected spaces found.
                          Open

                                }
                          Severity: Minor
                          Found in htdocs/include/xoops.js by editorconfig

                          Unexpected spaces found.
                          Open

                                   viewFoto(img);
                          Severity: Minor
                          Found in htdocs/include/xoops.js by editorconfig

                          Unexpected trailing spaces found.
                          Open

                                  
                          Severity: Minor
                          Found in htdocs/include/xoops.js by editorconfig

                          Unexpected spaces found.
                          Open

                                    var caretPos = domobj.caretPos;
                          Severity: Minor
                          Found in htdocs/include/xoops.js by editorconfig

                          Unexpected trailing spaces found.
                          Open

                                  caretPos.text = caretPos.text.charat(caretPos.text.length - 1)  
                          Severity: Minor
                          Found in htdocs/include/xoops.js by editorconfig

                          Unexpected trailing spaces found.
                          Open

                          == ' ' ? text + ' ' : text;  
                          Severity: Minor
                          Found in htdocs/include/xoops.js by editorconfig

                          Unexpected trailing spaces found.
                          Open

                                  
                          Severity: Minor
                          Found in htdocs/include/xoops.js by editorconfig

                          Unexpected spaces found.
                          Open

                                 return new_window;
                          Severity: Minor
                          Found in htdocs/include/xoops.js by editorconfig

                          Unexpected trailing spaces found.
                          Open

                                  
                          Severity: Minor
                          Found in htdocs/include/xoops.js by editorconfig

                          There are no issues that match your filters.

                          Category
                          Status