Showing 17 of 21 total issues
File push-state-tree.js
has 794 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
//! push-state-tree - v0.16.0 - 2024-03-30
//* https://github.com/gartz/pushStateTree/
//* Copyright (c) 2024 Gabriel Reitz Giannattasio <g@rtz.sh>; Licensed
var PushStateTree = {options: {VERSION: '0.16.0'}};
File pushStateTree.js
has 793 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
(function (root) {
"use strict";
var document = root.document;
var window = root.window;
Function exports
has 223 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
grunt.initConfig({
meta: {
pkg: grunt.file.readJSON('package.json'),
Function PushStateTree
has 181 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function PushStateTree(options) {
options = options || {};
// Enforce the usage of PushState API, available on all modern browsers.
// True by default
options[USE_PUSH_STATE] = options[USE_PUSH_STATE] !== false;
Function PushStateTree
has 181 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function PushStateTree(options) {
options = options || {};
// Enforce the usage of PushState API, available on all modern browsers.
// True by default
options[USE_PUSH_STATE] = options[USE_PUSH_STATE] !== false;
Function rulesDispatcher
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
rulesDispatcher: function () {
// Will dispatch the right events in each rule
/*jshint validthis:true */
// Cache the URI, in case of an event try to change it
Function rulesDispatcher
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
rulesDispatcher: function () {
// Will dispatch the right events in each rule
/*jshint validthis:true */
// Cache the URI, in case of an event try to change it
Function recursiveDispatcher
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function recursiveDispatcher(uri, oldURI, ruleElement) {
if (!ruleElement.rule) return;
var useURI = uri;
var useOldURI = oldURI;
Function recursiveDispatcher
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function recursiveDispatcher(uri, oldURI, ruleElement) {
if (!ruleElement.rule) return;
var useURI = uri;
var useOldURI = oldURI;
Function createRule
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createRule: function (options) {
// Create a pushstreamtree-rule element from a literal object
var rule = document.createElement("pushstatetree-rule");
Function createRule
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createRule: function (options) {
// Create a pushstreamtree-rule element from a literal object
var rule = document.createElement("pushstatetree-rule");
Function removeEventListenerFunc
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var removeEventListenerFunc = function (type, handler) {
if (!this.__bindedFunctions) {
this.__bindedFunctions = [];
}
Function removeEventListenerFunc
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var removeEventListenerFunc = function (type, handler) {
if (!this.__bindedFunctions) {
this.__bindedFunctions = [];
}
Function get
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
get: function () {
if (cachedUri.url === root.location.href) return cachedUri.uri;
var ignoreHash = options[IGNORE_HASH];
Function get
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
get: function () {
if (cachedUri.url === root.location.href) return cachedUri.uri;
var ignoreHash = options[IGNORE_HASH];
Function addEventListenerFunc
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var addEventListenerFunc = function (type, handler) {
if (!this.__bindedFunctions) {
this.__bindedFunctions = [];
}
Function addEventListenerFunc
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var addEventListenerFunc = function (type, handler) {
if (!this.__bindedFunctions) {
this.__bindedFunctions = [];
}