From 1e8ea0cadea27508098f1ab9e4bae7a39f074760 Mon Sep 17 00:00:00 2001 From: Sam Penny <33956017+sam1penny@users.noreply.github.com> Date: Fri, 1 Jul 2022 01:12:27 +0100 Subject: [PATCH] fixed hook description (browser_will_search) (#1937) * fixed hook description * added name to CONTRIBUTORS --- CONTRIBUTORS | 1 + qt/tools/genhooks_gui.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index ceb0a77d2..3d1846814 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -104,6 +104,7 @@ Luka Warren wisherhxl dobefore <1432338032@qq.com> Bart Louwers +Sam Penny ******************** diff --git a/qt/tools/genhooks_gui.py b/qt/tools/genhooks_gui.py index df9d26cf1..8566b8992 100644 --- a/qt/tools/genhooks_gui.py +++ b/qt/tools/genhooks_gui.py @@ -430,11 +430,14 @@ hooks = [ You can modify context.search to change the text that is sent to the searching backend. - If you set context.card_ids to a list of ids, the regular search will + If you set context.ids to a list of ids, the regular search will not be performed, and the provided ids will be used instead. - Your add-on should check if context.card_ids is not None, and return + Your add-on should check if context.ids is not None, and return without making changes if it has been set. + + In versions of Anki lower than 2.1.45 the field to check is + context.card_ids rather than context.ids """, ), Hook(