mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Merge "Education popup: Put localStorage check inside try/catch"
This commit is contained in:
commit
f339754102
|
@ -18,7 +18,12 @@ ve.ui.MWEducationPopupTool = function VeUiMwEducationPopupTool( config ) {
|
|||
var popupCloseButton, $popupContent, $shield,
|
||||
usePrefs = !mw.user.isAnon(),
|
||||
prefSaysShow = usePrefs && !mw.user.options.get( 'visualeditor-hideusered' ),
|
||||
tool = this;
|
||||
tool = this,
|
||||
localStorageHidePref = null;
|
||||
|
||||
try {
|
||||
localStorageHidePref = localStorage.getItem( 've-hideusered' );
|
||||
} catch ( e ) {}
|
||||
|
||||
config = config || {};
|
||||
|
||||
|
@ -29,7 +34,7 @@ ve.ui.MWEducationPopupTool = function VeUiMwEducationPopupTool( config ) {
|
|||
!prefSaysShow &&
|
||||
!(
|
||||
!usePrefs &&
|
||||
localStorage.getItem( 've-hideusered' ) === null &&
|
||||
localStorageHidePref === null &&
|
||||
$.cookie( 've-hideusered' ) === null
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue