plugins/pjax/public/javascripts/jquery.pjax.js
File jquery.pjax.js
has 423 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// jquery.pjax.js
// copyright chris wanstrath
// https://github.com/defunkt/jquery-pjax
(function($){
Function pjax
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function pjax(options) {
options = $.extend(true, {}, $.ajaxSettings, pjax.defaults, options)
if ($.isFunction(options.url)) {
options.url = options.url()
Function success
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
options.success = function(data, status, xhr) {
// If $.pjax.defaults.version is a function, invoke it first.
// Otherwise it can be a static string.
var currentVersion = (typeof $.pjax.defaults.version === 'function') ?
$.pjax.defaults.version() :
Function onPjaxPopstate
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function onPjaxPopstate(event) {
var state = event.state
if (state && state.container) {
// When coming forward from a separate history session, will get an
Function extractContainer
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function extractContainer(data, xhr, options) {
var obj = {}
// Prefer X-PJAX-URL header if it was set, otherwise fallback to
// using the original requested url.
Function fallbackPjax
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fallbackPjax(options) {
var url = $.isFunction(options.url) ? options.url() : options.url,
method = options.type ? options.type.toUpperCase() : 'GET'
var form = $('<form>', {