Showing 77 of 1,299 total issues
File opentip-jquery.custom.js
has 1673 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Generated by CoffeeScript 1.4.0
/*
#
# Opentip v2.4.6 (Custom Build)
#
- Create a ticketCreate a ticket
File newoptions.js
has 729 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var lastPage;
var save = true;
var tracks = [];
var pages = [];
var trackInfo = [];
- Create a ticketCreate a ticket
File options.js
has 660 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var lastPage;
var save = true;
var tracks = [];
var pages = [];
var trackInfo = [];
- Create a ticketCreate a ticket
Function alarmHandler
has 262 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function alarmHandler(alarm) {
var views = chrome.extension.getViews({type: "popup"});
var options = localJSON("options") || {};
//Login
- Create a ticketCreate a ticket
File eventPage.js
has 518 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
//Switch for alarm state
var alarmRunning = false;
//Storage for runtime event functions
var msgFunctions = {};
- Create a ticketCreate a ticket
Function _draw
has 206 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Opentip.prototype._draw = function() {
var backgroundCanvas, bulge, canvasDimensions, canvasPosition, closeButton, closeButtonInner, closeButtonOuter, ctx, drawCorner, drawLine, hb, position, stemBase, stemLength, _i, _len, _ref, _ref1, _ref2,
_this = this;
if (!(this.backgroundCanvas && this.redraw)) {
return;
- Create a ticketCreate a ticket
Function Joint
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
Open
Opentip.Joint = (function() {
function Joint(pointerString) {
if (pointerString == null) {
return;
- 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 Opentip
has 154 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Opentip(element, content, title, options) {
var elementsOpentips, hideTrigger, methodToBind, optionSources, prop, styleName, _i, _j, _len, _len1, _ref, _ref1, _ref2, _tmpStyle,
_this = this;
this.id = ++Opentip.lastId;
this.debug("Creating Opentip.");
- Create a ticketCreate a ticket
Function preinit
has 150 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function preinit() {
$.get(chrome.extension.getURL("content.html"), function(d) {
$("body").append(d);
crapi.clone(function(d) {
- Create a ticketCreate a ticket
Function check_watchlist
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function check_watchlist(update, callback) {
if (typeof update == "undefined") update = true;
if (typeof callback == "undefined") callback = function(){};
var email = $('#email').val();
- Create a ticketCreate a ticket
Function check_watchlist
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function check_watchlist(update, callback) {
if (typeof update == "undefined") update = true;
if (typeof callback == "undefined") callback = function(){};
var email = $('#email').val();
- Create a ticketCreate a ticket
Function getPosition
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Opentip.prototype.getPosition = function(tipJoint, targetJoint, stem) {
var additionalHorizontal, additionalVertical, offsetDistance, position, stemLength, targetDimensions, targetPosition, unwrappedTarget, _ref;
if (!this.container) {
return;
}
- Create a ticketCreate a ticket
Function parseNotifs
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseNotifs() {
//Grab storage
crapi.clone(function(d) {
//Login
modapi.login(function(me) {
- Create a ticketCreate a ticket
Function _ensureViewportContainment
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Opentip.prototype._ensureViewportContainment = function(position) {
var needsRepositioning, newSticksOut, originals, revertedX, revertedY, scrollOffset, stem, sticksOut, targetJoint, tipJoint, viewportDimensions, viewportPosition;
stem = this.options.stem;
originals = {
position: position,
- Create a ticketCreate a ticket
Function _iterate
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _iterate() {
var wChanged = [];
$.each(wParsed, function(i, v) {
var wItem = v;
- Create a ticketCreate a ticket
Function _iterate
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _iterate() {
var wChanged = [];
$.each(wParsed, function(i, v) {
var wItem = v;
- Create a ticketCreate a ticket
File crapi.js
has 319 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* exported handle, getBlob, getDataUri, localJSON, showView, _factory */
/*!
* App Helpers
*/
- Create a ticketCreate a ticket
Function Joint
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Opentip.Joint = (function() {
function Joint(pointerString) {
if (pointerString == null) {
return;
- Create a ticketCreate a ticket
Function editTrack
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function editTrack(id, page) {
if (!$('#tab-tracks aside').length) {
$('#tab-tracks').prepend('<aside style="display: none">' +
'<div class="container">' +
'<div class="aside-cover"><img src="img/loadingealarget.gif"></div>' +
- Create a ticketCreate a ticket
Function editTrack
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function editTrack(id, page) {
if (!$('#tab-tracks aside').length) {
$('#tab-tracks').prepend('<aside style="display: none">' +
'<div class="container">' +
'<div class="aside-cover"><img src="img/loadingealarget.gif"></div>' +
- Create a ticketCreate a ticket