diff --git a/closeblock.info.yml b/closeblock.info.yml
index db17594..7586802 100644
--- a/closeblock.info.yml
+++ b/closeblock.info.yml
@@ -1,8 +1,7 @@
 name: Close block
 type: module
-description: Allows to add a "close" button to any block.
+description: Allows you to add a "close" button to any block.
 configure: closeblock.settings_form
-core: 8.x
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || ^10
 dependencies:
   - block
diff --git a/closeblock.libraries.yml b/closeblock.libraries.yml
index 32bca33..c26c04e 100644
--- a/closeblock.libraries.yml
+++ b/closeblock.libraries.yml
@@ -8,6 +8,6 @@ closeblock:
   dependencies:
     - core/jquery
     - core/drupalSettings
-    - core/jquery.cookie
+    - core/js-cookie
     - core/drupal
-    - core/jquery.once
+    - core/once
diff --git a/js/closeblock.js b/js/closeblock.js
index 8ba7463..63d265a 100644
--- a/js/closeblock.js
+++ b/js/closeblock.js
@@ -1,23 +1,23 @@
-(function ($, Drupal) {
+(function ($, Drupal, once, cookies) {
   'use strict';
 
   Drupal.behaviors.closeblock = {
     attach: function (context, settings) {
       var $blockSettings = settings.closeBlockSettings,
-          $close_button = $('<span />').addClass('closeblock-button').html($blockSettings.close_block_button_text),
-          $close_container = $('<div />').addClass('closeblock').append($close_button);
+        $close_button = $('<span />').addClass('closeblock-button').html($blockSettings.close_block_button_text),
+        $close_container = $('<div />').addClass('closeblock').append($close_button);
 
-      $('.close-block').each(function () {
-        if ($.cookie('closeblock-' + this.id)) {
-          $('#' + this.id).hide();
+      $(once('close-block', '.close-block')).each(function () {
+        if (cookies.get('closeblock-' + $(this).attr('id'))) {
+          $('#' + $(this).attr('id')).hide();
         } else {
-          $('#' + this.id).show();
-          $('.close-block').once().prepend($close_container);
+          $('#' + $(this).attr('id')).show();
+          $(this).prepend($close_container);
         }
       });
 
-      $('.closeblock-button').once().click(function () {
-        switch ($blockSettings.close_block_type){
+      $(once('closeblock-button', '.closeblock-button')).click(function () {
+        switch ($blockSettings.close_block_type) {
           case 'fadeOut':
             $(this).closest('.close-block').fadeOut($blockSettings.close_block_speed);
             break;
@@ -28,16 +28,16 @@
             $(this).closest('.close-block').hide();
             break;
         }
-        $.cookie('closeblock-' + $(this).closest('.close-block').attr('id'), '1', { path: '/', expires: parseInt($blockSettings.reset_cookie_time) });
+        cookies.set('closeblock-' + $(this).closest('.close-block').attr('id'), '1', { path: '/', expires: parseInt($blockSettings.reset_cookie_time) });
       });
 
-      $('#closeblock-clear-cookie-button').once().click(function () {
-        for (var $item in $.cookie()) {
+      $(once('closeblock-clear-cookie-button', '#closeblock-clear-cookie-button')).click(function () {
+        for (var $item in cookies.get()) {
           if ($item.indexOf('closeblock-') >= 0) {
-            $.removeCookie($item, { path: '/' });
+            cookies.remove($item, { path: '/' });
           }
         }
       });
     }
   }
-}) (jQuery, Drupal);
+})(jQuery, Drupal, once, window.Cookies);
