User:Aidan9382/scripts/noedit.js

$(function {	function notify(title,message,type,autohide,autohidetime) {		if (mw.notification) {			console.log("notify",title,message);			autohide = (autohide==null && true) || autohide;			autohidetime = (autohidetime==null && "short") || autohidetime;			if (!mw.notification.autoHideSeconds[autohidetime])				mw.notification.autoHideSeconds[autohidetime] = autohidetime; //Enable custom arbitrary lengths			mw.notification.notify(message,{autoHide:autohide,autoHideSeconds:autohidetime,title:title,type:type});		}	}	if (mw.config.get("wgCanonicalSpecialPageName") == "Movepage" || document.getElementById("wpTextbox1")) {		if (document.title.indexOf(".js") == -1 && document.title.indexOf(".css") == -1) {			notify("No edit enforcer","Edits are disabled via js","warn",false);			window.location = "https://en.wikipedia.org/wiki/Main_Page";		} else {			notify("No edit enforcer","Keep in mind the no edit enforcer is active (though does not apply to .js or .css pages)","warn",false); }	} });