mambax7/smartfaq

View on GitHub

Showing 275 of 649 total issues

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

function hideObject(obj) {
    runHook("hideObject", FBEFORE);
    var theObj = (olNs4 ? obj : obj.style);
    if (olNs6 && olShowId > 0) {
        clearTimeout(olShowId);
Severity: Major
Found in assets/js/overlib/mini/overlib_mini.js and 1 other location - About 1 day to fix
assets/js/overlib/overlib.js on lines 1073..1096

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 197.

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 hideObject(obj) {
    runHook("hideObject", FBEFORE);

    var theObj = (olNs4 ? obj : obj.style);
    if (olNs6 && olShowId > 0) {
Severity: Major
Found in assets/js/overlib/overlib.js and 1 other location - About 1 day to fix
assets/js/overlib/mini/overlib_mini.js on lines 848..866

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 197.

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

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

function layerWrite(txt) {
    txt += "\n";
    if (olNs4) {
        var lyr = o3_frame.document.overDiv.document
        lyr.write(txt)
Severity: Major
Found in assets/js/overlib/mini/overlib_mini.js and 1 other location - About 7 hrs to fix
assets/js/overlib/overlib.js on lines 1040..1060

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 194.

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

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

function layerWrite(txt) {
    txt += "\n";
    if (olNs4) {
        var lyr = o3_frame.document.overDiv.document
        lyr.write(txt)
Severity: Major
Found in assets/js/overlib/overlib.js and 1 other location - About 7 hrs to fix
assets/js/overlib/mini/overlib_mini.js on lines 823..841

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 194.

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 getRefByName(l, d) {
    var r = null, j

    d = (d || document)

Severity: Major
Found in assets/js/overlib/overlib_anchor.js and 1 other location - About 7 hrs to fix
assets/js/overlib/mini/overlib_anchor_mini.js on lines 300..312

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 194.

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 olMouseCapture() {
    capExtent = document;
    var fN, mseHandler = olMouseMove;
    var re = /function[ ]+(\w+)\(/;
    if (document.onmousemove || (!olIe4 && window.onmousemove)) {
Severity: Major
Found in assets/js/overlib/mini/overlib_mini.js and 1 other location - About 7 hrs to fix
assets/js/overlib/overlib.js on lines 714..733

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 194.

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 getRefByName(l, d) {
    var r = null, j
    d = (d || document)
    if (d.images[l]) return d.images[l]
    else if (d.anchors[l]) return d.anchors[l]; else if (d.layers && d.layers.length > 0) {
Severity: Major
Found in assets/js/overlib/mini/overlib_anchor_mini.js and 1 other location - About 7 hrs to fix
assets/js/overlib/overlib_anchor.js on lines 421..437

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 194.

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 olMouseCapture() {
    capExtent = document;
    var fN, mseHandler = olMouseMove;
    var re = /function[ ]+(\w+)\(/;

Severity: Major
Found in assets/js/overlib/overlib.js and 1 other location - About 7 hrs to fix
assets/js/overlib/mini/overlib_mini.js on lines 522..538

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 194.

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 (fN) {
            fN = fN.toString().match(re);
            if (fN && fN.length) {
                for (i = 0; i < fN.length; i++) {
                    if (/anonymous/.test(fN[i])) continue;
Severity: Major
Found in assets/js/overlib/mini/overlib_mini.js and 1 other location - About 7 hrs to fix
assets/js/overlib/overlib.js on lines 1201..1213

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 185.

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 (fN) {
            fN = fN.toString().match(re);
            if (fN && fN.length) {
                for (i = 0; i < fN.length; i++) {
                    if (/anonymous/.test(fN[i])) continue;
Severity: Major
Found in assets/js/overlib/overlib.js and 1 other location - About 7 hrs to fix
assets/js/overlib/mini/overlib_mini.js on lines 937..949

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 185.

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 getRefById(l, d) {
    var r = "", j

    d = (d || document)
    if (d.all) return d.all[l]
Severity: Major
Found in assets/js/overlib/overlib_anchor.js and 1 other location - About 7 hrs to fix
assets/js/overlib/mini/overlib_anchor_mini.js on lines 286..299

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 178.

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 getRefById(l, d) {
    var r = "", j
    d = (d || document)
    if (d.all) return d.all[l]
    else if (d.getElementById) return d.getElementById(l)
Severity: Major
Found in assets/js/overlib/mini/overlib_anchor_mini.js and 1 other location - About 7 hrs to fix
assets/js/overlib/overlib_anchor.js on lines 402..418

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 178.

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

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

    if (!isNaN(mp) || typeof mp == 'object') {
        if (typeof mp == 'object') {
            fx = parseFloat(mp[0]);
            fy = parseFloat(mp[1]);
        } else
Severity: Major
Found in assets/js/overlib/overlib_anchor.js and 1 other location - About 7 hrs to fix
assets/js/overlib/mini/overlib_anchor_mini.js on lines 241..252

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 176.

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

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

    if (!isNaN(mp) || typeof mp == 'object') {
        if (typeof mp == 'object') {
            fx = parseFloat(mp[0]);
            fy = parseFloat(mp[1]);
        } else
Severity: Major
Found in assets/js/overlib/mini/overlib_anchor_mini.js and 1 other location - About 7 hrs to fix
assets/js/overlib/overlib_anchor.js on lines 349..360

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 176.

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 ol_content_simple(text) {
    txt = '<table width="' + o3_width + '" border="0" cellpadding="' + o3_border + '" cellspacing="0" ' + (o3_bgclass ? 'class="' + o3_bgclass + '"' : o3_bgcolor + ' ' + o3_height) + '><tr><td><table width="100%" border="0" cellpadding="' + o3_cellpad + '" cellspacing="0" ' + (o3_fgclass ? 'class="' + o3_fgclass + '"' : o3_fgcolor + ' ' + o3_fgbackground + ' ' + o3_height) + '><tr><td valign="TOP"' + (o3_textfontclass ? ' class="' + o3_textfontclass + '">' : '>') + (o3_textfontclass ? '' : wrapStr(0, o3_textsize, 'text')) + text + (o3_textfontclass ? '' : wrapStr(1, o3_textsize)) + '</td></tr></table></td></tr></table>';
    set_background("");
    return txt;
}
Severity: Major
Found in assets/js/overlib/mini/overlib_mini.js and 1 other location - About 6 hrs to fix
assets/js/overlib/overlib.js on lines 472..477

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 170.

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 ol_content_simple(text) {
    txt = '<table width="' + o3_width + '" border="0" cellpadding="' + o3_border + '" cellspacing="0" ' + (o3_bgclass ? 'class="' + o3_bgclass + '"' : o3_bgcolor + ' ' + o3_height) + '><tr><td><table width="100%" border="0" cellpadding="' + o3_cellpad + '" cellspacing="0" ' + (o3_fgclass ? 'class="' + o3_fgclass + '"' : o3_fgcolor + ' ' + o3_fgbackground + ' ' + o3_height) + '><tr><td valign="TOP"' + (o3_textfontclass ? ' class="' + o3_textfontclass + '">' : '>') + (o3_textfontclass ? '' : wrapStr(0, o3_textsize, 'text')) + text + (o3_textfontclass ? '' : wrapStr(1, o3_textsize)) + '</td></tr></table></td></tr></table>';

    set_background("");
    return txt;
Severity: Major
Found in assets/js/overlib/overlib.js and 1 other location - About 6 hrs to fix
assets/js/overlib/mini/overlib_mini.js on lines 353..357

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 170.

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

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

function repositionOver() {
    var X, Y, pgLeft, pgTop;
    pgTop = getPageScrollY();
    pgLeft = getPageScrollX();
    X = getLayerLeft(over) - pgLeft;
Severity: Major
Found in assets/js/overlib/overlib_followscroll.js and 1 other location - About 6 hrs to fix
assets/js/overlib/mini/overlib_followscroll_mini.js on lines 159..167

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 161.

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

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

function repositionOver() {
    var X, Y, pgLeft, pgTop;
    pgTop = getPageScrollY();
    pgLeft = getPageScrollX();
    X = getLayerLeft(over) - pgLeft;
Severity: Major
Found in assets/js/overlib/mini/overlib_followscroll_mini.js and 1 other location - About 6 hrs to fix
assets/js/overlib/overlib_followscroll.js on lines 246..255

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 161.

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 (hookType == FREPLACE) {
            hookPt.ovload = fnRef;  // replace normal overlib routine
            if (fnHookTo.indexOf('ol_content_') > -1) hookPt.alt[pms[CSSOFF - 1 - pmStart]] = fnRef;

        } else if (hookType == FBEFORE || hookType == FAFTER) {
Severity: Major
Found in assets/js/overlib/overlib.js and 1 other location - About 6 hrs to fix
assets/js/overlib/mini/overlib_mini.js on lines 1019..1032

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 158.

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 (hookType == FREPLACE) {
            hookPt.ovload = fnRef;
            if (fnHookTo.indexOf('ol_content_') > -1) hookPt.alt[pms[CSSOFF - 1 - pmStart]] = fnRef;
        } else if (hookType == FBEFORE || hookType == FAFTER) {
            var hookPt = (hookType == 1 ? hookPt.before : hookPt.after);
Severity: Major
Found in assets/js/overlib/mini/overlib_mini.js and 1 other location - About 6 hrs to fix
assets/js/overlib/overlib.js on lines 1317..1334

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 158.

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

Severity
Category
Status
Source
Language