mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 02:16:30 +00:00
Enhance/plugins (#8202)
* improve(plugins): install hooks with user options * improve(plugin): remove todos * improve(plugin): hook for a specific plugin * e2e tests * improve(ui): global search bar for the results from the custom search service
This commit is contained in:
@@ -737,6 +737,7 @@ export class LSPluginUser
|
||||
|
||||
const type = `hook:${tag}:${safeSnakeCase(e)}`
|
||||
const handler = args[0]
|
||||
const opts = args[1]
|
||||
caller[f](type, handler)
|
||||
|
||||
const unlisten = () => {
|
||||
@@ -747,7 +748,7 @@ export class LSPluginUser
|
||||
}
|
||||
|
||||
if (!isOff) {
|
||||
that.App._installPluginHook(pid, type)
|
||||
that.App._installPluginHook(pid, type, opts)
|
||||
} else {
|
||||
unlisten()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user