WebMvc/Scripts/jquery.cookie.js
(开头部分) 14KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* Copyright (c) 2005 - 2010, James Auldridge
* All rights reserved.
*
* Licensed under the BSD, MIT, and GPL (your choice!) Licenses:
* http://code.google.com/p/cookies/wiki/License
*
*/
var jaaulde = window.jaaulde || {};
jaaulde.utils = jaaulde.utils || {};
jaaulde.utils.cookies = (function ()
{
var resolveOptions, assembleOptionsString, parseCookies, constructor, defaultOptions = {
expiresAt: null,
path: '/',
domain: null,
secure: false
};
/**
* resolveOptions - receive an options object and ensure all options are present and valid, replacing with defaults where necessary
*
* @access private
* @static
* @parameter Object options - optional options to start with
* @return Object complete and valid options object
*/
resolveOptions = function (options)
{
var returnValue, expireDate;
if (typeof options !== 'object' || options === null)
{
returnValue = defaultOptions;
}
else
{
returnValue = {
expiresAt: defaultOptions.expiresAt,
path: defaultOptions.path,
domain: defaultOptions.domain,
secure: defaultOptions.secure
};
if (typeof options.expiresAt === 'object' && options.expiresAt instanceof Date)
{
returnValue.expiresAt = options.expiresAt;
}
else if (typeof options.hoursToLive === 'number' && options.hoursToLive !== 0)
{
expireDate = new Date();
expireDate.setTime(expireDate.getTime() + (options.hoursToLive * 60 * 60 * 1000));
returnValue.expiresAt = expireDate;
}
if (typeof options.path === 'string' && options.path !== '')
{
returnValue.path = options.path;
}
if (typeof options.domain === 'string' && options.domain !== '')
后面还有 390 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
