refactor: remove unusned hook

This commit is contained in:
linonetwo 2023-09-23 00:05:36 +08:00
parent 48d2eff33c
commit 13f6bd84e9
3 changed files with 0 additions and 26 deletions

View File

@ -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
*/

View File

@ -155,7 +155,6 @@ NavigatorWidget.prototype.handleNavigateEvent = function(event) {
this.addToHistory(event.navigateTo,event.navigateFromClientRect,event.toAnchor);
}
}
$tw.hooks.invokeHook("th-navigated",event);
return false;
};

View File

@ -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