Showing 292 of 636 total issues
File options.js
has 439 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
This file is part of All Mangas Reader.
All Mangas Reader is free software: you can redistribute it and/or modify
- Create a ticketCreate a ticket
Function init
has 158 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init() {
getMirrors(function (mirrorsT) {
mirrors = mirrorsT,
i;
var doDeleteMirs = false;
- Create a ticketCreate a ticket
Function restore_mirrors
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
function restore_mirrors() {
"use strict";
mirrors = chrome.extension.getBackgroundPage().mirrors || [];
mangas = chrome.extension.getBackgroundPage().mangaList || [];
actmirrors = chrome.extension.getBackgroundPage().actMirrors || [];
- Read upRead up
- Create a ticketCreate a ticket
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 bindCatsButtons
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
function bindCatsButtons() {
"use strict";
$(".actcatview").unbind();
$(".actcatview").click(function (event) {
$(".category:not(.addcategory):not(.newcat):not(.clearcategory)").removeClass("include").removeClass("exclude");
- Create a ticketCreate a ticket
Function createMangaEntryBlock
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createMangaEntryBlock(mangas, where) {
"use strict";
var isRead = false;
var isUpdate = true;
if (mangas.length) {
- Create a ticketCreate a ticket
Function save_options
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
function save_options() {
"use strict";
var obj = {},
colPicks = $(".colorPicker");
- Read upRead up
- Create a ticketCreate a ticket
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 onLoadImage
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
function onLoadImage() {
if ($(this).data("canvasId")) {
var width, height;
var ancCan = $("#" + $(this).data("canvasId"));
- Create a ticketCreate a ticket
Function transformImagesInBook
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
function transformImagesInBook(where, mode, res){
//mode = 1 --> images are displayed on top of one another
//mode = 2 --> images are displayed two by two occidental reading mode
//mode = 3 --> images are displayed two by two japanese reading mode
- Create a ticketCreate a ticket
Function mergeLists
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
function mergeLists(server, exten) {
var lstres = [];
setChapNoTot(server);
setChapNoTot(exten);
- Create a ticketCreate a ticket
Function addMultipleMangas
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
function addMultipleMangas(mgs, where) {
var hasChanges = false;
for (var i = 0; i < mgs.length; i++) {
if (mgs[i].change) {
hasChanges = true;
- Read upRead up
- Create a ticketCreate a ticket
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 onLoadImage
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
function onLoadImage() {
if ($(this).data("canvasId")) {
var width, height;
var ancCan = $("#" + $(this).data("canvasId"));
- Read upRead up
- Create a ticketCreate a ticket
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 updateFromSite
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
function updateFromSite(mangas, merge) {
if (!merge) {
var deleteAr = [];
for (var i = 0; i < mangaList.length; i++) {
deleteAr[deleteAr.length] = i;
- Read upRead up
- Create a ticketCreate a ticket
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 setKeys
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setKeys() {
//disable default websites shortcuts (mangafox)
document.onkeypress=null;
document.onkeydown=null;
document.onkeyup=null;
- Create a ticketCreate a ticket
Function loadSearch
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
function loadSearch(td, toSearch) {
td.data("nbToLoad", mirrors.length);
td.data("ancNbToLoad", mirrors.length);
$(".amrfind", td).attr("src", chrome.extension.getURL("img/load16.gif"));
$(".amrfind", td).unbind("click");
- Read upRead up
- Create a ticketCreate a ticket
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
File BSync.js
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
// This code will be changed for the storage.sync call of Chrome.
function BSync (_opt) {
this.options = {};
- Create a ticketCreate a ticket
Function refreshTag
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function refreshTag() {
var nbNews = 0;
var listDone = [];
for (var i = 0; i < mangaList.length; i++) {
if (mangaList[i].listChaps.length > 0) {
- Read upRead up
- Create a ticketCreate a ticket
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 createMangaEntryList
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createMangaEntryList(mangas, where) {
"use strict";
var isRead = false;
var isUpdate = true;
if (mangas.length) {
- Create a ticketCreate a ticket
Function onRead
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
onRead : function (json, bookmark) {
console.log('Reading incoming synchronisation');
if (!(json == undefined || json == null || json == "null")) {
console.log(' - Updating incoming entries');
- Read upRead up
- Create a ticketCreate a ticket
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 restore_mirrors
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
function restore_mirrors() {
"use strict";
mirrors = chrome.extension.getBackgroundPage().mirrors || [];
mangas = chrome.extension.getBackgroundPage().mangaList || [];
actmirrors = chrome.extension.getBackgroundPage().actMirrors || [];
- Create a ticketCreate a ticket
Function createMangaEntryBlock
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
function createMangaEntryBlock(mangas, where) {
"use strict";
var isRead = false;
var isUpdate = true;
if (mangas.length) {
- Read upRead up
- Create a ticketCreate a ticket
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"