From ebdaaa3f0862e60acc08f9633b7d354db5ea6501 Mon Sep 17 00:00:00 2001 From: roykho Date: Thu, 4 Feb 2021 07:26:10 -0800 Subject: [PATCH] Update deprecated jQuery functions for jquery.cookie.js --- assets/js/jquery-cookie/jquery.cookie.js | 6 +++--- assets/js/zeroclipboard/jquery.zeroclipboard.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/js/jquery-cookie/jquery.cookie.js b/assets/js/jquery-cookie/jquery.cookie.js index 5ff7fef9d6b..c0a20a07ec1 100644 --- a/assets/js/jquery-cookie/jquery.cookie.js +++ b/assets/js/jquery-cookie/jquery.cookie.js @@ -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); }; -})); \ No newline at end of file +})); diff --git a/assets/js/zeroclipboard/jquery.zeroclipboard.js b/assets/js/zeroclipboard/jquery.zeroclipboard.js index a8f1a1e7f21..dcf333e2856 100644 --- a/assets/js/zeroclipboard/jquery.zeroclipboard.js +++ b/assets/js/zeroclipboard/jquery.zeroclipboard.js @@ -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; -}()); \ No newline at end of file +}());