diff --git a/code/boot.js b/code/boot.js index fcc04011..eeb3f52c 100644 --- a/code/boot.js +++ b/code/boot.js @@ -431,6 +431,7 @@ function boot() { setTimeout('window.map.invalidateSize(false);', 500); window.iitcLoaded = true; + window.runHooks('iitcLoaded'); } // this is the minified load.js script that allows us to easily load diff --git a/code/hooks.js b/code/hooks.js index 5b4eb167..35fef550 100644 --- a/code/hooks.js +++ b/code/hooks.js @@ -53,14 +53,14 @@ // set reached to true. // requestFinished: called after each request finished. Argument is // {success: boolean} indicated the request success or fail. - +// iitcLoaded: called after IITC and all plugins loaded window._hooks = {} window.VALID_HOOKS = ['portalAdded', 'portalDetailsUpdated', 'publicChatDataAvailable', 'factionChatDataAvailable', 'portalDataLoaded', 'beforePortalReRender', 'checkRenderLimit', 'requestFinished', 'nicknameClicked', - 'geoSearch']; + 'geoSearch', 'iitcLoaded']; window.runHooks = function(event, data) { if(VALID_HOOKS.indexOf(event) === -1) throw('Unknown event type: ' + event);