From mediawiki.org
MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
Release status: unmaintained
Implementation Page action
Description Hides the edit-link (tab) in preview mode
Author(s) Hendrik Brummermanntalk
Latest version 1.1
MediaWiki 1.17
License CC BY, GPL
Download see below

This extension hides the edit-link on the edit page. Some user tend to click it to return from the preview page to the edit window instead of scrolling down. Unfortunatally this causes their edits to be lost. So this extensions hides that link.


  • Copy HideEditOnPreview.php and place the file(s) in a directory called HideEditOnPreview in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php :
    require_once "$IP/extensions/HideEditOnPreview/HideEditOnPreview.php";
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Source code[edit]

 * Hides the edit-link (tab) in preview mode because user click on it to return
 * to the edit box. It will, however, reload the edit box destroying all unsaved
 * changes.
 * Installation: Copy HideEditOnPreview.php to your extension folder and add
 * require_once($IP."/extensions/HideEditOnPreview.php");
 * to your LocalSettings.php
 * @author Hendrik Brummermann
 * @version 1.1

$wgHooks['SkinTemplateContentActions'][] = 'hideEditOnPreview';

function hideEditOnPreview($actions) {

        global $wgRequest;

        if ( $wgRequest->getVal('action') == 'submit' ) {
        return true;

$wgExtensionCredits['other'][] = array(
        'name' => 'HideEditOnPreview',
        'version' => '1.1',
        'author' => 'Hendrik Brummermann',
        'url' => 'http://mediawiki.org/wiki/Extension:HideEditOnPreview',
        'description' => 'Hides the edit-link (tab) in preview mode'