Add 'iitcLoaded' hook to notify that IITC and all plugins loaded.
This commit is contained in:
parent
13d1ff9aaa
commit
6cd3328389
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user