MediaWiki:Common.js: Difference between revisions

From Leo's Notes
This page was last edited on 29 March 2015, at 22:45.
Created page with "→Any JavaScript here will be loaded for all users on every page load.: var SteamrWikiApp = function() { var self = { init : function() {}, foo : function() {} };..."
 
No edit summary
Line 4: Line 4:
var SteamrWikiApp = function() {
var SteamrWikiApp = function() {
var self = {
var self = {
init : function() {},
init : function() {
self.articleSelfSignedSSL();
},
// For the self signed SSL page
articleSelfSignedSSL : function () {
if ( ! $("#selfsigned-domain").length) {
return;
}
$("#selfsigned-domain").change(function() {
alert("HEllo");
});
},
foo : function() {}
foo : function() {}
};
};

Revision as of 22:45, 29 March 2015

/* Any JavaScript here will be loaded for all users on every page load. */


var SteamrWikiApp = function() {
	var self = {
		init : function() {
			self.articleSelfSignedSSL();
		},
		
		// For the self signed SSL page
		articleSelfSignedSSL : function () {
			if ( ! $("#selfsigned-domain").length) {
				return;
			}
			
			$("#selfsigned-domain").change(function() {
				alert("HEllo");
			});
		},
		foo : function() {}
	};
	
	self.init.apply(self);
	return self;
};

$(function() {
	var app = new SteamrWikiApp();
});