Merge "jquery.cookie is deprecated"

This commit is contained in:
jenkins-bot 2023-05-17 19:55:27 +00:00 committed by Gerrit Code Review
commit 7ffe50b5ce
2 changed files with 4 additions and 4 deletions

View file

@ -13,14 +13,14 @@ module.exports = function ( amcOutreach, currentPage ) {
*/
function cookiesEnabled() {
// If session cookie already set, return true
if ( $.cookie( 'mf_testcookie' ) === 'test_value' ) {
if ( mw.cookie.get( 'mf_testcookie' ) === 'test_value' ) {
return true;
// Otherwise try to set mf_testcookie and return true if it was set
} else {
$.cookie( 'mf_testcookie', 'test_value', {
mw.cookie.set( 'mf_testcookie', 'test_value', {
path: '/'
} );
return $.cookie( 'mf_testcookie' ) === 'test_value';
return mw.cookie.get( 'mf_testcookie' ) === 'test_value';
}
}

View file

@ -484,7 +484,7 @@
"mediawiki.ui.anchor",
"skins.minerva.mainMenu.icons",
"skins.minerva.mainMenu.styles",
"jquery.cookie",
"mediawiki.cookie",
"skins.minerva.icons.images.scripts.misc",
"skins.minerva.icons.page.issues.uncolored",
"skins.minerva.icons.page.issues.default.color",