diff --git a/composer.json b/composer.json index 0b1bb0fa11..3ecfa54502 100644 --- a/composer.json +++ b/composer.json @@ -49,7 +49,6 @@ "ampache/ampacheapi-php": "^1.0", "aterrien/jquery-knob": "1.2.*", "blueimp/jquery-file-upload": "v10.2.0", - "carhartl/jquery-cookie": "1.*", "cboden/ratchet": "0.4.*", "clue/multicast-react": "^1.1.0", "components/bootstrap": "3.*", @@ -61,6 +60,7 @@ "happyworm/jplayer": "2.*", "james-heinrich/getid3": "dev-master", "jeromeetienne/jquery-qrcode": "dev-master", + "js-cookie/js-cookie": "2.*", "jwilsson/spotify-web-api-php": "^3.5", "krixon/xbmc-php-rpc": "dev-master", "kumailht/responsive-elements": "dev-master", @@ -155,18 +155,18 @@ { "type": "package", "package": { - "name": "carhartl/jquery-cookie", + "name": "js-cookie/js-cookie", "type": "component", - "version": "1.4.1", + "version": "2.2.1", "source": { - "url": "https://github.com/carhartl/jquery-cookie.git", + "url": "https://github.com/js-cookie/js-cookie.git", "type": "git", - "reference": "v1.4.1" + "reference": "v2.2.1" }, "extra": { "component": { "scripts": [ - "jquery.cookie.js" + "src/js.cookie.js" ] } } diff --git a/composer.lock b/composer.lock index 8ac06204d7..fb89827c69 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "139393a7db4387078740ca786f14b083", + "content-hash": "ed25f46620b1d5f84aa163dad41be28b", "packages": [ { "name": "adhocore/cli", @@ -174,23 +174,6 @@ } } }, - { - "name": "carhartl/jquery-cookie", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/carhartl/jquery-cookie.git", - "reference": "v1.4.1" - }, - "type": "component", - "extra": { - "component": { - "scripts": [ - "jquery.cookie.js" - ] - } - } - }, { "name": "cboden/ratchet", "version": "v0.4.3", @@ -1325,6 +1308,23 @@ } } }, + { + "name": "js-cookie/js-cookie", + "version": "2.2.1", + "source": { + "type": "git", + "url": "https://github.com/js-cookie/js-cookie.git", + "reference": "v2.2.1" + }, + "type": "component", + "extra": { + "component": { + "scripts": [ + "src/js.cookie.js" + ] + } + } + }, { "name": "jwilsson/spotify-web-api-php", "version": "3.6.2", diff --git a/public/templates/header.inc.php b/public/templates/header.inc.php index 16b9c0f4ea..1fd246565e 100644 --- a/public/templates/header.inc.php +++ b/public/templates/header.inc.php @@ -85,7 +85,7 @@ - + @@ -485,7 +485,7 @@ function libitem_action(item, action) $('#sidebar').show(500); }); - $.cookie('sidebar_state', newstate, { expires: 30, path: '/; samesite=strict'}); + Cookies.set('sidebar_state', newstate, { expires: 30, path: '/; samesite=strict'}); });
diff --git a/public/templates/show_html5_player.inc.php b/public/templates/show_html5_player.inc.php index 58a1f01adb..f45aa7fea1 100644 --- a/public/templates/show_html5_player.inc.php +++ b/public/templates/show_html5_player.inc.php @@ -45,13 +45,13 @@ $(document).ready(function(){ - if (!isNaN($.cookie('jp_volume'))) { - var jp_volume = $.cookie('jp_volume'); + if (!isNaN(Cookies.get('jp_volume'))) { + var jp_volume = Cookies.get('jp_volume'); } else { var jp_volume = 0.80; } - var replaygainPersist = $.cookie('replaygain'); + var replaygainPersist = Cookies.get('replaygain'); jplaylist = new jPlayerPlaylist({ jPlayer: "#jquery_jplayer_1", @@ -258,7 +258,7 @@ }); $("#jquery_jplayer_1").bind($.jPlayer.event.volumechange, function(event) { - $.cookie('jp_volume', event.jPlayer.options.volume, { expires: 7, path: '/; samesite=strict'}); + Cookies.set('jp_volume', event.jPlayer.options.volume, { expires: 7, path: '/; samesite=strict'}); }); $("#jquery_jplayer_1").bind($.jPlayer.event.resize, function (event) { diff --git a/public/templates/show_html5_player_headers.inc.php b/public/templates/show_html5_player_headers.inc.php index e008f4b0bd..4c03aa9795 100644 --- a/public/templates/show_html5_player_headers.inc.php +++ b/public/templates/show_html5_player_headers.inc.php @@ -23,7 +23,7 @@ - + diff --git a/public/templates/sidebar.inc.php b/public/templates/sidebar.inc.php index 9dd1795800..a010c4f97f 100644 --- a/public/templates/sidebar.inc.php +++ b/public/templates/sidebar.inc.php @@ -94,7 +94,7 @@ if ($header.children(".header-img").hasClass("collapsed")) { sbstate = "collapsed"; } - $.cookie('sb_' + $header.children(".header-img").attr('id'), sbstate, { expires: 30, path: '/; samesite=strict'}); + Cookies.set('sb_' + $header.children(".header-img").attr('id'), sbstate, { expires: 30, path: '/; samesite=strict'}); }); });