Fandom Developers Wiki

AjaxUndo dodaje link do wycofywania zmian Ajax obok normalnej opcji wycofywania zmian na stronach historii oraz różnic pomiędzy wybranymi wersjami. Kliknięcie go natychmiast wycofa wybraną wersję bez konieczności podglądu i ręcznego zapisywania zmian.

Installation[]

Configuration[]

  • Jeśli chcesz oznaczyć zmiany dokonane za pomocą AjaxUndo jako drobne, użyj opcji window.AjaxUndoMinor = true; w swoim osobistym JSie lub w JSie społeczności.
  • Jeśli chcesz zmienić domyślny opis zmian dodawanu przez AjaxUndo, użyj window.AjaxUndoSummary = 'Insert your default summary here.'; w swoim osobistym JSie lub w JSie społeczności.
  • Jeśli wolisz być pytany o opis zmian przy każdym użyciu AjaxUndo, użyj window.AjaxUndoPrompt = true; w swoim osobistym JSie lub w JSie społeczności. Opis zmian zawarty w window.AjaxUndoSummary, jeśli ustawiony, pojawi się w okienku pytającym o opis zmian.

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'
    ]
});