Skip to content

Commit 979b6cf

Browse files
authored
Merge pull request #7 from antistatique/1-0-x/remove-jquery-dependency
remove dependency on JQuery
2 parents ec2cf50 + 10efcf8 commit 979b6cf

4 files changed

+5
-7
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88
- init module with Cookies & Browser redirection on Homepage only
9+
- remove dependency on JQuery

home_redirect_lang.libraries.yml

-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
common:
22
js:
33
js/home_redirect_lang.common.js: {}
4-
dependencies:
5-
- core/jquery
6-
- core/jquery.cookie
74

85
language_switcher:
96
js:

js/home_redirect_lang.common.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Common helper functions used by various parts of Homepage Redirect Language.
55
*/
66

7-
(function ($, Drupal, drupalSettings) {
7+
(function (Drupal) {
88

99
'use strict';
1010

@@ -22,4 +22,4 @@
2222
document.cookie = 'home_redirect_lang_preferred_langcode=' + langcode + '; expires=' + date.toUTCString() + '; path=/';
2323
};
2424

25-
}(jQuery, Drupal, drupalSettings));
25+
}(Drupal));

js/home_redirect_lang.language_switcher.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Defines the behavior of the language switcher cookie storage.
55
*/
66

7-
(function ($, Drupal, drupalSettings) {
7+
(function (Drupal) {
88

99
'use strict';
1010

@@ -27,4 +27,4 @@
2727
};
2828

2929

30-
}(jQuery, Drupal, drupalSettings));
30+
}(Drupal));

0 commit comments

Comments
 (0)