AjaxRedirect
Description
Adds a button to the page edit drop-down menu to quickly redirect the current page.
Updated
December 29, 2022
English (en) العربية (ar) беларуская (be) български (bg) bosanski (bs) català (ca) Deutsch (de) Ελληνικά (el) español (es) suomi (fi) français (fr) Frysk (fy) galego (gl) हिन्दी (hi) hrvatski (hr) Bahasa Indonesia (id) italiano (it) 日本語 (ja) ქართული (ka) 한국어 (ko) latviešu (lv) македонски (mk) молдовеняскэ (mo) Nederlands (nl) occitan (oc) polski (pl) português (pt) português do Brasil (pt-br) română (ro) русский (ru) српски (ћирилица) (sr-ec) srpski (latinica) (sr-el) ไทย (th) Türkçe (tr) українська (uk) val 中文(简体) (zh-hans) 中文(繁體) (zh-hant) Translate! [
View ]
AjaxRedirect adds a "Redirect" button to the page edit drop-down menu. When the button is clicked, a popup will appear asking what the page should redirect to. After confirming, it will instantly redirect the current page to the specified one.
Note: If this script is installed wiki-wide, it is strongly recommended to enclose the import statement in an if statement which will only let certain usergroups load the script. An example for the administrator usergroup is shown below:
if ( mw . config . get ( "wgUserGroups" ). indexOf ( 'sysop' ) > - 1 )
importScriptPage ( 'MediaWiki:AjaxRedirect/code.js' , 'dev' );
Installation
Add this to MediaWiki:ImportJS :
dev:AjaxRedirect/code.js
importArticles
:
Add this JavaScript on your wiki (or add the highlighted text to your existing import statement):
importArticles ({ type : 'script' , articles : [ 'u:dev:MediaWiki:AjaxRedirect/code.js' , ] });
Local:
Special:MyPage/common.js
Importing multiple scripts? This quick guide shows how to combine the imports. For personal use, note that personal JS must be enabled for your account. If the script requires configuration through MediaWiki:Common.js for sitewide use, don't forget to contact Fandom Staff to get it enabled on your wiki, if it isn't already enabled.
Text above can be found
here (edit )