rahulkapoor90/VITacademics-Enhancement-Suite

View on GitHub

Showing 255 of 1,018 total issues

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

(function() {
  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  ga.src = 'https://ssl.google-analytics.com/ga.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
Extension for chrome/scripts/google-analytics/ansyncTracking.js on lines 5..9

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

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() {
  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  ga.src = 'https://ssl.google-analytics.com/ga.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
Extension for Edge/scripts/google-analytics/ansyncTracking.js on lines 5..9

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

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 (i == data.length - 1) {
                    if (arr.length > 0) {
                        chrome.storage.local.set({ assignments: data });
                    }
                    var obj1 = { "msg": "score", "data": arr };
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 1 other location - About 2 hrs to fix
Extension for chrome/scripts/home/assignMsg.js on lines 82..89

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

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 (i == data.length - 1) {
                        if (arr.length > 0) {
                            chrome.storage.local.set({ assignments: data });
                        }
                        var obj1 = { "msg": "new", "data": arr };
Severity: Major
Found in Extension for chrome/scripts/home/assignMsg.js and 1 other location - About 2 hrs to fix
Extension for chrome/scripts/home/assignMsg.js on lines 44..51

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

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 6 locations. Consider refactoring.
Open

    sendMessage(tabId, message, responseCallback) {
        bridgeLog.DoActionAndLog(() => {
            if (typeof responseCallback !== "undefined" && typeof responseCallback !== "null") {
                myBrowser.tabs.sendMessage(tabId, message, responseCallback);
            }
Severity: Major
Found in Extension for Edge/backgroundScriptsAPIBridge.js and 5 other locations - About 2 hrs to fix
Extension for Edge/backgroundScriptsAPIBridge.js on lines 258..267
Extension for Edge/backgroundScriptsAPIBridge.js on lines 604..613
Extension for Edge/backgroundScriptsAPIBridge.js on lines 624..633
Extension for Edge/backgroundScriptsAPIBridge.js on lines 659..668
Extension for Edge/backgroundScriptsAPIBridge.js on lines 809..818

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

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 6 locations. Consider refactoring.
Open

    update(tabId, updateProperties, callback) {
        bridgeLog.DoActionAndLog(() => {
            if (typeof callback !== "undefined" && typeof callback !== "null") {
                myBrowser.tabs.update(tabId, updateProperties, callback);
            }
Severity: Major
Found in Extension for Edge/backgroundScriptsAPIBridge.js and 5 other locations - About 2 hrs to fix
Extension for Edge/backgroundScriptsAPIBridge.js on lines 258..267
Extension for Edge/backgroundScriptsAPIBridge.js on lines 604..613
Extension for Edge/backgroundScriptsAPIBridge.js on lines 624..633
Extension for Edge/backgroundScriptsAPIBridge.js on lines 649..658
Extension for Edge/backgroundScriptsAPIBridge.js on lines 809..818

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

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 6 locations. Consider refactoring.
Open

    executeScript(tabId, details, callback) {
        bridgeLog.DoActionAndLog(() => {
            if (typeof callback !== "undefined" && typeof callback !== "null") {
                myBrowser.tabs.executeScript(tabId, details, callback);
            }
Severity: Major
Found in Extension for Edge/backgroundScriptsAPIBridge.js and 5 other locations - About 2 hrs to fix
Extension for Edge/backgroundScriptsAPIBridge.js on lines 258..267
Extension for Edge/backgroundScriptsAPIBridge.js on lines 624..633
Extension for Edge/backgroundScriptsAPIBridge.js on lines 649..658
Extension for Edge/backgroundScriptsAPIBridge.js on lines 659..668
Extension for Edge/backgroundScriptsAPIBridge.js on lines 809..818

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

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 6 locations. Consider refactoring.
Open

    insertCSS(tabId, details, callback) {
        bridgeLog.DoActionAndLog(() => {
            if (typeof callback !== "undefined" && typeof callback !== "null") {
                myBrowser.tabs.insertCSS(tabId, details, callback);
            }
Severity: Major
Found in Extension for Edge/backgroundScriptsAPIBridge.js and 5 other locations - About 2 hrs to fix
Extension for Edge/backgroundScriptsAPIBridge.js on lines 258..267
Extension for Edge/backgroundScriptsAPIBridge.js on lines 604..613
Extension for Edge/backgroundScriptsAPIBridge.js on lines 649..658
Extension for Edge/backgroundScriptsAPIBridge.js on lines 659..668
Extension for Edge/backgroundScriptsAPIBridge.js on lines 809..818

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

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 6 locations. Consider refactoring.
Open

    update(id, updateProperties, callback) {
        bridgeLog.DoActionAndLog(() => {
            if (typeof callback !== "undefined" && typeof callback !== "null") {
                myBrowser.contextMenus.update(id, updateProperties, callback);
            }
Severity: Major
Found in Extension for Edge/backgroundScriptsAPIBridge.js and 5 other locations - About 2 hrs to fix
Extension for Edge/backgroundScriptsAPIBridge.js on lines 604..613
Extension for Edge/backgroundScriptsAPIBridge.js on lines 624..633
Extension for Edge/backgroundScriptsAPIBridge.js on lines 649..658
Extension for Edge/backgroundScriptsAPIBridge.js on lines 659..668
Extension for Edge/backgroundScriptsAPIBridge.js on lines 809..818

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

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 6 locations. Consider refactoring.
Open

    update(windowId, updateInfo, callback) {
        bridgeLog.DoActionAndLog(() => {
            if (typeof callback !== "undefined" && typeof callback !== "null") {
                myBrowser.windows.update(windowId, updateInfo, callback);
            }
Severity: Major
Found in Extension for Edge/backgroundScriptsAPIBridge.js and 5 other locations - About 2 hrs to fix
Extension for Edge/backgroundScriptsAPIBridge.js on lines 258..267
Extension for Edge/backgroundScriptsAPIBridge.js on lines 604..613
Extension for Edge/backgroundScriptsAPIBridge.js on lines 624..633
Extension for Edge/backgroundScriptsAPIBridge.js on lines 649..658
Extension for Edge/backgroundScriptsAPIBridge.js on lines 659..668

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

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 3 locations. Consider refactoring.
Open

function getDateString(date) {
    var month = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
    return ("0"+date.getDate()).slice(-2)
            +"-"+
            month[date.getMonth()]
Severity: Major
Found in Extension for Edge/scripts/attendance/attendance.js and 2 other locations - About 2 hrs to fix
Extension for Firefox/scripts/attendance/attendance.js on lines 1..8
Extension for chrome/scripts/attendance/attendance.js on lines 1..8

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

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 3 locations. Consider refactoring.
Open

function getDateString(date) {
    var month = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
    return ("0"+date.getDate()).slice(-2)
            +"-"+
            month[date.getMonth()]
Severity: Major
Found in Extension for chrome/scripts/attendance/attendance.js and 2 other locations - About 2 hrs to fix
Extension for Edge/scripts/attendance/attendance.js on lines 1..8
Extension for Firefox/scripts/attendance/attendance.js on lines 1..8

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

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 3 locations. Consider refactoring.
Open

function getDateString(date) {
    var month = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
    return ("0"+date.getDate()).slice(-2)
            +"-"+
            month[date.getMonth()]
Severity: Major
Found in Extension for Firefox/scripts/attendance/attendance.js and 2 other locations - About 2 hrs to fix
Extension for Edge/scripts/attendance/attendance.js on lines 1..8
Extension for chrome/scripts/attendance/attendance.js on lines 1..8

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

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 7 locations. Consider refactoring.
Open

    remove(tabId, callback) {
        bridgeLog.DoActionAndLog(() => {
            if (typeof callback !== "undefined" && typeof callback !== "null") {
                myBrowser.tabs.remove(tabId, callback);
            }
Severity: Major
Found in Extension for Edge/backgroundScriptsAPIBridge.js and 6 other locations - About 2 hrs to fix
Extension for Edge/backgroundScriptsAPIBridge.js on lines 228..237
Extension for Edge/backgroundScriptsAPIBridge.js on lines 238..247
Extension for Edge/backgroundScriptsAPIBridge.js on lines 280..289
Extension for Edge/backgroundScriptsAPIBridge.js on lines 290..299
Extension for Edge/backgroundScriptsAPIBridge.js on lines 589..598
Extension for Edge/backgroundScriptsAPIBridge.js on lines 779..788

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

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 7 locations. Consider refactoring.
Open

    set(details, callback) {
        bridgeLog.DoActionAndLog(() => {
            if (typeof callback !== "undefined" && typeof callback !== "null") {
                myBrowser.cookies.set(details, callback);
            }
Severity: Major
Found in Extension for Edge/backgroundScriptsAPIBridge.js and 6 other locations - About 2 hrs to fix
Extension for Edge/backgroundScriptsAPIBridge.js on lines 228..237
Extension for Edge/backgroundScriptsAPIBridge.js on lines 238..247
Extension for Edge/backgroundScriptsAPIBridge.js on lines 280..289
Extension for Edge/backgroundScriptsAPIBridge.js on lines 589..598
Extension for Edge/backgroundScriptsAPIBridge.js on lines 639..648
Extension for Edge/backgroundScriptsAPIBridge.js on lines 779..788

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

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 7 locations. Consider refactoring.
Open

    create(createProperties, callback) {
        bridgeLog.DoActionAndLog(() => {
            if (typeof callback !== "undefined" && typeof callback !== "null") {
                myBrowser.tabs.create(createProperties, callback);
            }
Severity: Major
Found in Extension for Edge/backgroundScriptsAPIBridge.js and 6 other locations - About 2 hrs to fix
Extension for Edge/backgroundScriptsAPIBridge.js on lines 228..237
Extension for Edge/backgroundScriptsAPIBridge.js on lines 238..247
Extension for Edge/backgroundScriptsAPIBridge.js on lines 280..289
Extension for Edge/backgroundScriptsAPIBridge.js on lines 290..299
Extension for Edge/backgroundScriptsAPIBridge.js on lines 639..648
Extension for Edge/backgroundScriptsAPIBridge.js on lines 779..788

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

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 7 locations. Consider refactoring.
Open

    remove(menuItemId, callback) {
        bridgeLog.DoActionAndLog(() => {
            if (typeof callback !== "undefined" && typeof callback !== "null") {
                myBrowser.contextMenus.remove(menuItemId, callback);
            }
Severity: Major
Found in Extension for Edge/backgroundScriptsAPIBridge.js and 6 other locations - About 2 hrs to fix
Extension for Edge/backgroundScriptsAPIBridge.js on lines 228..237
Extension for Edge/backgroundScriptsAPIBridge.js on lines 280..289
Extension for Edge/backgroundScriptsAPIBridge.js on lines 290..299
Extension for Edge/backgroundScriptsAPIBridge.js on lines 589..598
Extension for Edge/backgroundScriptsAPIBridge.js on lines 639..648
Extension for Edge/backgroundScriptsAPIBridge.js on lines 779..788

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

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 7 locations. Consider refactoring.
Open

    create(createData, callback) {
        bridgeLog.DoActionAndLog(() => {
            if (typeof callback !== "undefined" && typeof callback !== "null") {
                myBrowser.windows.create(createData, callback);
            }
Severity: Major
Found in Extension for Edge/backgroundScriptsAPIBridge.js and 6 other locations - About 2 hrs to fix
Extension for Edge/backgroundScriptsAPIBridge.js on lines 228..237
Extension for Edge/backgroundScriptsAPIBridge.js on lines 238..247
Extension for Edge/backgroundScriptsAPIBridge.js on lines 280..289
Extension for Edge/backgroundScriptsAPIBridge.js on lines 290..299
Extension for Edge/backgroundScriptsAPIBridge.js on lines 589..598
Extension for Edge/backgroundScriptsAPIBridge.js on lines 639..648

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

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 7 locations. Consider refactoring.
Open

    remove(details, callback) {
        bridgeLog.DoActionAndLog(() => {
            if (typeof callback !== "undefined" && typeof callback !== "null") {
                myBrowser.cookies.remove(details, callback);
            }
Severity: Major
Found in Extension for Edge/backgroundScriptsAPIBridge.js and 6 other locations - About 2 hrs to fix
Extension for Edge/backgroundScriptsAPIBridge.js on lines 228..237
Extension for Edge/backgroundScriptsAPIBridge.js on lines 238..247
Extension for Edge/backgroundScriptsAPIBridge.js on lines 290..299
Extension for Edge/backgroundScriptsAPIBridge.js on lines 589..598
Extension for Edge/backgroundScriptsAPIBridge.js on lines 639..648
Extension for Edge/backgroundScriptsAPIBridge.js on lines 779..788

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

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 7 locations. Consider refactoring.
Open

    create(createProperties, callback) {
        bridgeLog.DoActionAndLog(() => {
            if (typeof callback !== "undefined" && typeof callback !== "null") {
                myBrowser.contextMenus.create(createProperties, callback);
            }
Severity: Major
Found in Extension for Edge/backgroundScriptsAPIBridge.js and 6 other locations - About 2 hrs to fix
Extension for Edge/backgroundScriptsAPIBridge.js on lines 238..247
Extension for Edge/backgroundScriptsAPIBridge.js on lines 280..289
Extension for Edge/backgroundScriptsAPIBridge.js on lines 290..299
Extension for Edge/backgroundScriptsAPIBridge.js on lines 589..598
Extension for Edge/backgroundScriptsAPIBridge.js on lines 639..648
Extension for Edge/backgroundScriptsAPIBridge.js on lines 779..788

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

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