User:Robuxboy2005/common.js

var hooks = {}; mw.hook = function(hook) { return { add: function(callback) { if (!(hooks[hook])) { hooks[hook] = []; }			hooks[hook].push(callback); },		fire: function(data) { console.log(hook, data); if (hooks[hook]) { hooks[hook].forEach(function(callback) {					callback(data);				}); }		},		remove: function(callback) {} }; };