MediaWiki:Quick redirect/code.js

/******************************************************* $(function {   if ((mw.config.get('skin') !== 'oasis' ) || (window.Quickredirect)) {        return;     }    var RedirectToBtn = 'REDIRECT TO';    var RedirectFromBtn = 'REDIRECT FROM';    $('ul.wds-list').append(''+RedirectToBtn+''+''+RedirectFromBtn+'');    // REDIRECT FROM    $('a.redirect-from').click(function { var redirectfrom = prompt('Which page do you want to redirect to'+wgPageName+'?'); new mw.Api.post({           action: 'edit',            title: redirectfrom,            summary: "\/\/Quick redirect",            text:'#REDIRECT '+wgPageName+'',            token: mw.user.tokens.get('editToken')        }); });   // REDIRECT TO    $('a.redirect-to').click(function { var redirectto = prompt('Which page do you want to redirect '+wgPageName+' to?'); new mw.Api.post({           action: 'edit',            title: wgPageName,            summary: "\/\/Quick redirect",            text:'#REDIRECT '+redirectto+'',            token: mw.user.tokens.get('editToken')        }); });   window.Quickredirect = true; });
 * Quick redirect
 * !TESTING 05:27, May 9, 2018 (UTC)
 * ©Copyright：机智的小鱼君
 * Logs
 * https://vignette.wikia.nocookie.net/central/images/4/4d/DF2.jpeg/revision/latest/scale-to-width-down/18?cb=20180410041323机智的小鱼君 ⚡️(给我留言 ☎️) 05:27, May 9, 2018 (UTC)：发布测试