User:Psl85/common.js

/** * Creates a default summary of "new page" when without a provided summary for new pages. * * @author User:TheSatanicSanta * @author User:Xbony2 * @author User:Chocohead (for new page fix) * Based off of: * * wikipedia:Wikipedia:WikiProject_User_scripts/Scripts/Force_edit_summary * * http://habbo.gamepedia.com/User:Cblair91/common.js * */ $('#wpSave').click(function{	if (wgArticleId === 0 && !document.forms.editform.wpSummary.value.replace(/^(?:\/\\*.*\\*\/)? *(.*) *$/, '$1')) {		if (!document.forms.editform.wpTextbox1.value.startsWith("#REDIRECT")) {			document.forms.editform.wpSummary.value = 'new page';		}	} });

/** * Automatically uncheck the "Leave a redirect behind" button on the move page */ var inputObject = $('#wpLeaveRedirect > .oo-ui-inputWidget-input'); if (inputObject.length > 0) { inputObject[0]['checked'] = false; }

mw.loader.localLoad = function(url){ return mw.loader.load('https://ftb.gamepedia.com/index.php?title=' + url + '&action=raw&ctype=text/javascript'); };

mw.loader.localLoad('User:Xbony2/common/autosummary.js'); //mw.loader.localLoad('User:Xbony2/common/dirtydefault.js'); //mw.loader.localLoad('User:Xbony2/common/everyonelovesbony.js'); //mw.loader.localLoad('User:Xbony2/common/nei.js'); //mw.loader.localLoad('User:Xbony2/common/translatation admins toolbar.js');

/*if(ftb !== undefined && ftb.loaded.length === 0){ mw.loader.localLoad('MediaWiki:Common.js'); }*/