Update deprecated jQuery functions for jquery.cookie.js

This commit is contained in:
roykho 2021-02-04 07:26:10 -08:00 committed by Jonathan Sadowski
parent 6b7b8d7b8e
commit ebdaaa3f08
2 changed files with 6 additions and 6 deletions

View File

@ -49,14 +49,14 @@
function read(s, converter) {
var value = config.raw ? s : parseCookieValue(s);
return $.isFunction(converter) ? converter(value) : value;
return 'function' === typeof converter ? converter(value) : value;
}
var config = $.cookie = function (key, value, options) {
// Write
if (value !== undefined && !$.isFunction(value)) {
if (value !== undefined && 'function' !== typeof value) {
options = $.extend({}, config.defaults, options);
if (typeof options.expires === 'number') {
@ -114,4 +114,4 @@
return !$.cookie(key);
};
}));
}));

View File

@ -1,7 +1,7 @@
/*!
* jquery.zeroclipboard
* Bind to the `beforecopy`, `copy`, `aftercopy`, and `copy-error` events, custom DOM-like events for clipboard injection generated using jQuery's Special Events API and ZeroClipboard's Core module.
* Copyright (c) 2014
* Copyright (c) 2014
* Licensed MIT
* https://github.com/zeroclipboard/jquery.zeroclipboard
* v0.2.0
@ -474,7 +474,7 @@
* The underlying implementation of `ZeroClipboard.destroy`.
* @private
*/
var _destroy = function() {
var _destroy = function() {console.log('zero', ZeroClipboard);
ZeroClipboard.clearData();
ZeroClipboard.blur();
ZeroClipboard.emit("destroy");
@ -1878,4 +1878,4 @@
}
})(jQuery, function() {
return this || window;
}());
}());