jquery.cookie is deprecated

Bug: T271995
Change-Id: I5750707cdd630de4c79784125ed7e6dc17079898
This commit is contained in:
Jon Robson 2023-05-15 14:07:28 -07:00
parent 9a529c3652
commit b0b30f3f87
2 changed files with 4 additions and 4 deletions

View file

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

View file

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