From 84ab80520b351e38c7fc8f02bf5252aea9145e32 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Sat, 20 Aug 2016 12:17:12 +0200 Subject: [PATCH] Improve the `vimfx.addOptionOverrides` example See #791. --- documentation/api.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/documentation/api.md b/documentation/api.md index c870d19..5a0ba31 100644 --- a/documentation/api.md +++ b/documentation/api.md @@ -152,6 +152,17 @@ vimfx.addOptionOverrides( {prevent_autofocus: false} ] ) + +vimfx.addOptionOverrides( + [ ({hostname}) => hostname === 'imgur.com', + { + pattern_attrs: ['class'], + pattern_selector: 'div.next-prev .btn', + prev_patterns: [/\bnavPrev\b/], + next_patterns: [/\bnavNext\b/], + } + ] +) ``` #### `vimfx.addKeyOverrides(...rules)` -- 2.39.3