In this article we will explore the topic of
User:Epicgenius/ajaxMove.js, a fascinating topic that has captured the attention of many for years.
User:Epicgenius/ajaxMove.js is a complex topic that covers a wide range of aspects and can be seen from multiple perspectives. For a long time,
User:Epicgenius/ajaxMove.js has been the subject of debate and discussion, generating conflicting opinions and piquing the interest of experts and fans alike. Throughout history,
User:Epicgenius/ajaxMove.js has played a fundamental role in society, impacting people's lives in different ways. With this article, we seek to shed light on
User:Epicgenius/ajaxMove.js and provide a comprehensive and up-to-date view on this exciting topic.
/**
* Ajax Move
*
* Creates a form to ajax move pages
*
* @author Epicgenius
* @credits Ale_jrb (UI); Kangaroopower (original editor)
*
* Backlink to original: ]
*
*/
$(function () {
window.ajaxMove = {
version: '1.93.1',
active: false,
/* Create the pop-up form */
createPopUpForm: function () {
if (ajaxMove.active) return;
var popupHTML = '<div id="ajaxMoveUI"style="position: absolute; z-index: 9999999; left: 250px; top: 175px; width: 415px; height: 130px; background-color: white; padding: 3px; border-width: 1px; border-style: solid; border-color: #AAAAAA; border-image: initial; overflow: visible; text-align: left; font-size: 10px;"><div><div style="width: 411px; border-bottom: 1px solid #aaaaaa; padding: 2px; font-weight: bold;">Ajax Move Module<span style="float:right"><a id="mv-close" href="#"><img src="http://upload.wikimedia.org/wikipedia/commons/b/b6/Chrome_close_button.png"/></a></span></div><div style="font-size: 11px; margin-left: 7px; margin-top: 8px; padding: 0px;">Move To: <input id="mv-new"style="margin-left: 9px; font-size: 11px; width: 300px;"type="text"/></div><div id="mv-error" ></div><div style="margin-top: 13px; text-align:center; font-size: 11px; ">-- <a href="#"onclick="ajaxMove.movePage();">Move</a> --</div></div></div>';
$('body').append(popupHTML);
ajaxMove.active = true;
$('#mv-close').click(function() {
ajaxMove.active = false;
$( '#ajaxMoveUI' ).remove()
});
$('#ajaxMoveUI').draggable();
},
movePage: function (token) {
var newpage = $('#mv-new').val(),
summary = "(using ])";
if (newpage === "") {
$('#mv-error').html('Please enter the destination for the move.');
} else {
Flash('move').load({targ: mw.config.get('wgPageName'), to: encodeURIComponent(newpage), summary: encodeURIComponent(summary), mTalk: true, mSub: true}).wait(function (data) {
if (data.error) $('#mv-error').html('Error:' + data.error.info + '. Please see <a href="https://www.mediawiki.orghttps://wiki386.com/en/API:Move#Possible_errors">here</a> for more info');
else location.reload();
}).run();
}
}
};
$(document).ready(function () {
if (typeof Flash === "undefined") {
importScript('User:Kangaroopower/Flash.js').onload = function () {
startAJMove();
};
} else {
startAJMove();
}
function startAJMove () {
if ($.inArray( mw.config.get('wgUserGroups'), "autoconfirmed" ) && document.getElementById('ca-move') && mw.config.get('wgCanonicalNamespace') !== "Special") {
mw.util.addPortletLink('p-cactions', 'javascript:ajaxMove.createPopUpForm();', "Ajax Move", "ca-ajaxMove", "Ajax Move");
}
}
});
});