diff --git a/i18n/en.json b/i18n/en.json index 4c61b7c..3441a53 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -17,7 +17,6 @@ "mobile-frontend-editor-tutorial-confirm": "Start editing", "mobile-frontend-editor-tutorial-summary": "Try improving the $1 page.
Don't be scared of markup.", "mobile-frontend-editor-unavailable": "Mobile editing is not currently available on your browser. Please try a different browser.", - "mobile-frontend-editor-undo-unsupported": "Undo is not currently supported on mobile devices.", "mobile-frontend-editor-uploadenable": "Please upload a photo first to enable editing.", "mobile-frontend-footer-sitename": "{{SITENAME}}", "mobile-frontend-history": "View edit history of this page.", diff --git a/i18n/qqq.json b/i18n/qqq.json index 50bda07..25fe444 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -26,7 +26,6 @@ "mobile-frontend-editor-tutorial-confirm": "Text for the button a user clicks after they have read the editing tutorial and are ready to edit the page.\n\nSee also:\n* {{msg-mw|Mobile-frontend-editor-tutorial-summary}}", "mobile-frontend-editor-tutorial-summary": "Text for tutorial overlay presented to a user the first time they try to edit a page.\n\nParameters:\n* $1 - page title\nSee also:\n* {{msg-mw|Mobile-frontend-editor-tutorial-alt-summary}}", "mobile-frontend-editor-unavailable": "Message that appears when a user attempts to edit with an unsupported/incapable browser.\n\nPreceded by the header {{msg-mw|Mobile-frontend-editor-unavailable-header}}.", - "mobile-frontend-editor-undo-unsupported": "Shown when user attempts to do an undo which is currently not supported.", "mobile-frontend-editor-uploadenable": "Shown when try to edit a new file page.", "mobile-frontend-footer-sitename": "Name of site", "mobile-frontend-history": "Used as label for the link which points to the \"Edit history\" page.\n\nThis is shown on the Main Page in place of a last modified label to avoid confusion caused by transclusions.\n\nIf not the Main Page, the following message is used:\n* {{msg-mw|Mobile-frontend-last-modified-date}}", diff --git a/resources/skins.minerva.editor/init.js b/resources/skins.minerva.editor/init.js index ac1f571..477e3c8 100644 --- a/resources/skins.minerva.editor/init.js +++ b/resources/skins.minerva.editor/init.js @@ -166,12 +166,6 @@ isNewPage = page.options.id === 0, leadSection = page.getLeadSectionElement(); - if ( mw.util.getParamValue( 'undo' ) ) { - // TODO: Replace with an OOUI dialog - // eslint-disable-next-line no-alert - alert( mw.msg( 'mobile-frontend-editor-undo-unsupported' ) ); - } - page.$( '.edit-page, .edit-link' ).removeClass( disabledClass ) .on( 'click', onEditLinkClick ); overlayManager.add( /^\/editor\/(\d+|all)$/, function ( sectionId ) { @@ -410,6 +404,11 @@ return; } + if ( mw.util.getParamValue( 'undo' ) ) { + // Our fancy editor doesn't support undo, but we can rely on the fallback. + return; + } + if ( !isEditingSupported ) { // Editing is disabled (or browser is blacklisted) updateEditPageButton( false ); diff --git a/skin.json b/skin.json index e54d02b..50df763 100644 --- a/skin.json +++ b/skin.json @@ -533,7 +533,6 @@ "mobile-frontend-editor-unavailable", "mobile-frontend-editor-uploadenable", "mobile-frontend-editor-cta", - "mobile-frontend-editor-undo-unsupported", "mobile-frontend-editor-edit", "mobile-frontend-editor-redlink-create", "mobile-frontend-editor-redlink-leave",