From 8d73e9351314a6449439e70cc363dfed949a89e2 Mon Sep 17 00:00:00 2001 From: nobody Date: Sun, 31 Jan 2021 06:34:40 +0100 Subject: [PATCH] Added: jquery.cookie v1.4.1 (#258) --- core/mappings.js | 1 + core/resources.js | 5 +++++ modules/internal/targets.js | 3 +++ pages/updates/updates.html | 1 + resources/jquery-cookie/1.4.1/jquery.cookie.min.jsm | 2 ++ 5 files changed, 12 insertions(+) create mode 100644 resources/jquery-cookie/1.4.1/jquery.cookie.min.jsm diff --git a/core/mappings.js b/core/mappings.js index 3485f690..188f480b 100644 --- a/core/mappings.js +++ b/core/mappings.js @@ -303,6 +303,7 @@ mappings.cdn = { 'jquery-modal/{version}/jquery.modal.css': resources.jQueryModalCSS, 'jquery-modal/{version}/jquery.modal.min.css': resources.jQueryModalCSS, 'jquery-mousewheel/{version}/jquery.mousewheel.min.js': resources.jqueryMousewheelJS, + 'jquery-cookie/{version}/jquery.cookie.': resources.jqueryCookie, 'jquery.scrollbar/{version}/jquery.scrollbar.min.js': resources.jQueryScrollbar, 'jquery.scrollbar/{version}/jquery.scrollbar.js': resources.jQueryScrollbar, 'jquery-validation-unobtrusive/{version}/jquery.validate.unobtrusive.': resources.jQueryValidationUnobtrusive, diff --git a/core/resources.js b/core/resources.js index 546617b9..469321bf 100644 --- a/core/resources.js +++ b/core/resources.js @@ -500,6 +500,11 @@ var resources = { 'path': 'resources/jquery.blockUI/{version}/jquery.blockUI.min.jsm', 'type': 'application/javascript' }, + // jquery.cookie [Deprecated] + 'jqueryCookie': { + 'path': 'resources/jquery-cookie/{version}/jquery.cookie.min.jsm', + 'type': 'application/javascript' + }, // jQuery-csv 'jQueryCSV': { 'path': 'resources/jquery-csv/{version}/jquery.csv.min.jsm', diff --git a/modules/internal/targets.js b/modules/internal/targets.js index 3d342993..ad42918c 100644 --- a/modules/internal/targets.js +++ b/modules/internal/targets.js @@ -259,6 +259,8 @@ targets.setLastVersion = function (type, version) { else return '1.12.1'; // >= 1.8.19 } else if (type.startsWith('/jquery.blockUI/2.')) { return '2.70'; + } else if (type.startsWith('/jquery-cookie/1.')) { + return '1.4.1'; } else if (type.startsWith('/jquery-csv/1.')) { return '1.0.11'; } else if (type.startsWith('/jquery-easing/1.')) { @@ -490,6 +492,7 @@ targets.determineResourceName = function (filename) { }; const ListOfFiles = { + 'jquery.cookie.min.jsm': 'jquery-cookie', 'jquery.scrollbar.min.jsm': 'jQuery Scrollbar', 'dayjs.min.jsm': 'Day.js', 'jquery.validate.unobtrusive.min.jsm': 'jQuery Validate Unobtrusive', diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 59ee78be..bd22507a 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -36,6 +36,7 @@
  • Added: jquery-validation-unobtrusive v3.2.11 (#258)
  • Added: Day.js v1.10.4 (#258)
  • Added: jQuery Scrollbar v0.2.11 (#258)
  • +
  • Added: jquery.cookie v1.4.1 (#258)
  • diff --git a/resources/jquery-cookie/1.4.1/jquery.cookie.min.jsm b/resources/jquery-cookie/1.4.1/jquery.cookie.min.jsm new file mode 100644 index 00000000..36d6b65e --- /dev/null +++ b/resources/jquery-cookie/1.4.1/jquery.cookie.min.jsm @@ -0,0 +1,2 @@ +/*! jquery.cookie v1.4.1 | MIT */ +!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});