Jump to content

User:Floquenbeam/common.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
$(document).ready( function() {
	var desktopLink = document.getElementById("mw-mf-display-toggle");
	if (desktopLink === null) {
		return;
	}
	var href = desktopLink.getAttribute('href');
	if (href.indexOf('.m.') > -1) {
		return;
	}
	// You can use .assign() instead, if you want to
	// keep the URL of the mobile site in your history.
	window.location.replace(href);
} );
importScript('User:Amalthea/userhighlighter.js');
importScript('User:NuclearWarfare/Mark-blocked script.js');
bannedPageArray = ["User:Writ_Keeper/sandbox"];
mw.loader.load("/w/index.php?title=User:Writ Keeper/Scripts/topicBanEnforcer.js‎&action=raw&ctype=text/javascript");

// Prevent accidental submits
$(document).ready(function(){
    $('input#wpSummary').keypress(function(e){
        if(e.which==13) {
        	if(confirm("Publish changes? (p.s. and did you preview?  if you hit [Enter], I bet you didn't preview)")) {return;}
			else {e.preventDefault();}
        }
    });
});
mw.loader.load("/w/index.php?title=User:Writ_Keeper/Scripts/syntaxChecker.js&action=raw&ctype=text/javascript");