kkHookJS=function(){this._callbacks={},this._originals={}},kkHookJS.prototype={hook:function(o,i){"function"==typeof i?o&&"string"==typeof o&&o in window&&(void 0===this._callbacks[o]&&(this._callbacks[o]=[],this._createHookableFunction(o)),this._callbacks[o].push(i)):console.log("kkHook: tried to register a non-function to hook:",o,"Callback was:",i)},_createHookableFunction:function(o){var i=this;"function"==typeof window[o]&&(this._originals[o]=window[o],window[o]=function(){var n=arguments,t=this;i._originals[o].apply(t,n),$((function(){setTimeout((function(){if(i._callbacks&&i._callbacks[o])for(var a=0;a<i._callbacks[o].length;a++)i._callbacks[o][a].apply(t,n)}),10)}))})}},void 0===window.kkHook&&(window.kkHook=new kkHookJS);