Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/redux-fr.../redux-co.../assets/js/vendor
File: cookie.js
// jscs:disable
[0] Fix | Delete
// jshint ignore: start
[1] Fix | Delete
[2] Fix | Delete
/*!
[3] Fix | Delete
* jQuery Cookie Plugin v1.4.1
[4] Fix | Delete
* https://github.com/carhartl/jquery-cookie
[5] Fix | Delete
*
[6] Fix | Delete
* Copyright 2006, 2014 Klaus Hartl
[7] Fix | Delete
* Released under the MIT license
[8] Fix | Delete
*/
[9] Fix | Delete
(function( factory ) {
[10] Fix | Delete
if ( typeof define === 'function' && define.amd ) {
[11] Fix | Delete
// AMD (Register as an anonymous module)
[12] Fix | Delete
define( ['jquery'], factory );
[13] Fix | Delete
} else if ( typeof exports === 'object' ) {
[14] Fix | Delete
// Node/CommonJS
[15] Fix | Delete
module.exports = factory( require( 'jquery' ) );
[16] Fix | Delete
} else {
[17] Fix | Delete
// Browser globals
[18] Fix | Delete
factory( jQuery );
[19] Fix | Delete
}
[20] Fix | Delete
}( function( $ ) {
[21] Fix | Delete
[22] Fix | Delete
var pluses = /\+/g;
[23] Fix | Delete
[24] Fix | Delete
function encode( s ) {
[25] Fix | Delete
return config.raw ? s : encodeURIComponent( s );
[26] Fix | Delete
}
[27] Fix | Delete
[28] Fix | Delete
function decode( s ) {
[29] Fix | Delete
return config.raw ? s : decodeURIComponent( s );
[30] Fix | Delete
}
[31] Fix | Delete
[32] Fix | Delete
function stringifyCookieValue( value ) {
[33] Fix | Delete
return encode( config.json ? JSON.stringify( value ) : String( value ) );
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
function parseCookieValue( s ) {
[37] Fix | Delete
if ( s.indexOf( '"' ) === 0 ) {
[38] Fix | Delete
// This is a quoted cookie as according to RFC2068, unescape...
[39] Fix | Delete
s = s.slice( 1, - 1 ).replace( /\\"/g, '"' ).replace( /\\\\/g, '\\' );
[40] Fix | Delete
}
[41] Fix | Delete
[42] Fix | Delete
try {
[43] Fix | Delete
// Replace server-side written pluses with spaces.
[44] Fix | Delete
// If we can't decode the cookie, ignore it, it's unusable.
[45] Fix | Delete
// If we can't parse the cookie, ignore it, it's unusable.
[46] Fix | Delete
s = decodeURIComponent( s.replace( pluses, ' ' ) );
[47] Fix | Delete
return config.json ? JSON.parse( s ) : s;
[48] Fix | Delete
} catch ( e ) {
[49] Fix | Delete
}
[50] Fix | Delete
}
[51] Fix | Delete
[52] Fix | Delete
function read( s, converter ) {
[53] Fix | Delete
var value = config.raw ? s : parseCookieValue( s );
[54] Fix | Delete
return 'function' === typeof converter ? converter( value ) : value;
[55] Fix | Delete
}
[56] Fix | Delete
[57] Fix | Delete
var config = $.cookie = function( key, value, options ) {
[58] Fix | Delete
[59] Fix | Delete
// Write
[60] Fix | Delete
[61] Fix | Delete
if ( arguments.length > 1 && 'function' !== typeof value ) {
[62] Fix | Delete
options = $.extend( {}, config.defaults, options );
[63] Fix | Delete
[64] Fix | Delete
if ( typeof options.expires === 'number' ) {
[65] Fix | Delete
var days = options.expires, t = options.expires = new Date();
[66] Fix | Delete
t.setMilliseconds( t.getMilliseconds() + days * 864e+5 );
[67] Fix | Delete
}
[68] Fix | Delete
[69] Fix | Delete
return (document.cookie = [encode( key ), '=', stringifyCookieValue( value ), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
[70] Fix | Delete
options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : ''].join( '' ));
[71] Fix | Delete
}
[72] Fix | Delete
[73] Fix | Delete
// Read
[74] Fix | Delete
[75] Fix | Delete
var result = key ? undefined : {}, // To prevent the for loop in the first place assign an empty array
[76] Fix | Delete
// in case there are no cookies at all. Also prevents odd result when
[77] Fix | Delete
// calling $.cookie().
[78] Fix | Delete
cookies = document.cookie ? document.cookie.split( '; ' ) : [], i = 0, l = cookies.length;
[79] Fix | Delete
[80] Fix | Delete
for ( ; i < l; i ++ ) {
[81] Fix | Delete
var parts = cookies[i].split( '=' ), name = decode( parts.shift() ), cookie = parts.join( '=' );
[82] Fix | Delete
[83] Fix | Delete
if ( key === name ) {
[84] Fix | Delete
// If second argument (value) is a function it's a converter...
[85] Fix | Delete
result = read( cookie, value );
[86] Fix | Delete
break;
[87] Fix | Delete
}
[88] Fix | Delete
[89] Fix | Delete
// Prevent storing a cookie that we couldn't decode.
[90] Fix | Delete
if ( ! key && (cookie = read( cookie )) !== undefined ) {
[91] Fix | Delete
result[name] = cookie;
[92] Fix | Delete
}
[93] Fix | Delete
}
[94] Fix | Delete
[95] Fix | Delete
return result;
[96] Fix | Delete
};
[97] Fix | Delete
[98] Fix | Delete
config.defaults = {};
[99] Fix | Delete
[100] Fix | Delete
$.removeCookie = function( key, options ) {
[101] Fix | Delete
// Must not alter options, thus extending a fresh object...
[102] Fix | Delete
$.cookie( key, '', $.extend( {}, options, {expires: - 1} ) );
[103] Fix | Delete
return ! $.cookie( key );
[104] Fix | Delete
};
[105] Fix | Delete
[106] Fix | Delete
} ));
[107] Fix | Delete
[108] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function