mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-07 06:14:44 +00:00
refactor: remove unusned hook
This commit is contained in:
parent
48d2eff33c
commit
13f6bd84e9
14
boot/boot.js
14
boot/boot.js
@ -2674,20 +2674,6 @@ $tw.hooks.addHook = function(hookName,definition) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
Delete hooks from the hashmap
|
|
||||||
*/
|
|
||||||
$tw.hooks.removeHook = function(hookName,definition) {
|
|
||||||
if($tw.utils.hop($tw.hooks.names,hookName)) {
|
|
||||||
var index = $tw.hooks.names[hookName].findIndex(function(hook) {
|
|
||||||
return hook === definition;
|
|
||||||
});
|
|
||||||
if(index !== -1) {
|
|
||||||
$tw.hooks.names[hookName].splice(index, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Invoke the hook by key
|
Invoke the hook by key
|
||||||
*/
|
*/
|
||||||
|
@ -155,7 +155,6 @@ NavigatorWidget.prototype.handleNavigateEvent = function(event) {
|
|||||||
this.addToHistory(event.navigateTo,event.navigateFromClientRect,event.toAnchor);
|
this.addToHistory(event.navigateTo,event.navigateFromClientRect,event.toAnchor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$tw.hooks.invokeHook("th-navigated",event);
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
tags: HookMechanism
|
|
||||||
title: Hook: th-navigated
|
|
||||||
type: text/vnd.tiddlywiki
|
|
||||||
|
|
||||||
This hook allows plugins to do things after navigation takes effect.
|
|
||||||
|
|
||||||
Hook function parameters are same as [[Hook: th-navigating]]:
|
|
||||||
|
|
||||||
Return value:
|
|
||||||
|
|
||||||
* possibly modified event object
|
|
Loading…
x
Reference in New Issue
Block a user