Fandom Developers Wiki
Register
Advertisement

AjaxUndo додає посилання AJAX-скасування поруч із звичайним посиланням скасування в історії сторінок і відмінностях. Це скасовує вибрану версію без необхідності перегляду і ручного збереження редагування.

Встановлення[]

Налаштування[]

  • If you wish to mark edits made through AjaxUndo as minor, use window.AjaxUndoMinor = true; in your personal or sitewide JavaScript page.
  • If you wish to change the default summary left by AjaxUndo, use window.AjaxUndoSummary = 'Insert your default summary here.'; in your personal or sitewide JavaScript page.
  • If you would rather be asked on every use of AjaxUndo for an edit summary, use window.AjaxUndoPrompt = true; in your personal or sitewide JavaScript page. The summary in window.AjaxUndoSummary, if set, will be shown in the prompt by default.

Using configuration options with Fandom Developers Wiki scripts

The instructions on this page describe how to use configuration options with a script. Here on the Fandom Developers Wiki, many scripts provide optional configuration settings as a mean to alter or enhance the default behavior of the script. When installing configuration options in your JavaScript file, please note that they need to go above the import statement in order to work — unless the directions say otherwise. In case MediaWiki:ImportJS is used to load the scripts, it will be executed last.

Configuration options load too late, don't work
// 1. AjaxRC import statement
importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:AjaxRC.js'
    ]
});

// 2. AjaxRC configuration option
window.ajaxRefresh = 30000;
Proper placement of configuration options
// 1. AjaxRC configuration option
window.ajaxRefresh = 30000;

// 2. AjaxRC import statement
importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:AjaxRC.js'
    ]
});
Advertisement