Feed The Beast Wiki

Follow the Feed The Beast Wiki on Discord or Mastodon!

READ MORE

Feed The Beast Wiki
Advertisement

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/**
 * 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;
}
Advertisement