Skip to content

Commit

Permalink
update with doc url and example with more variation
Browse files Browse the repository at this point in the history
  • Loading branch information
hns258 committed Sep 22, 2022
1 parent 973ec1f commit 2653854
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
7 changes: 3 additions & 4 deletions fixtures/fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ contextMenu({
}
],
append: () => {},
addSearchWithOther:
{
title: 'DuckDuckGo',
url: 'https://duckduckgo.com/?q=%s'
addSearchWithOther: {
title: 'Wolfram Alpha',
url: 'https://www.wolframalpha.com/input?i=%s'
},
showCopyImageAddress: true,
showSaveImageAs: true,
Expand Down
14 changes: 7 additions & 7 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,24 +197,24 @@ declare namespace contextMenu {
This allows the use of a search engine besides Google (e.g., Bing and DuckDuckGo). The `title` and `url` of the desired search engine need to be provided. The `{searchEngine}` placeholder will be replaced by `title`.
@property {string} title - The title/name of the search engine.
@property {string} url - The URL of the search engine (with query syntax used in Chrome).
@property {string} url - The URL of the search engine (with query syntax used in Chrome https://support.google.com/chrome/answer/95426#ts&zippy=%2Curl-with-s-in-place-of-query-field).
@example
```
{
addSearchWithOther: {
title: 'Bing',
url: 'https://www.bing.com/search'
title: 'DuckDuckGo',
url: 'https://duckduckgo.com?q=%s'
}
};
}
```
@example
```
{
addSearchWithOther: {
title: 'DuckDuckGo',
url: 'https://duckduckgo.com'
title: 'Wolfram Alpha',
url: 'https://www.wolframalpha.com/input?i=%s'
}
};
}
```
*/
readonly addSearchWithOther?: {title: string; url: string};
Expand Down
14 changes: 7 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,24 +156,24 @@ Properties:

`title` - string - The title/name of the search engine.

`url` - string - The URL of the search engine (with query syntax used in Chrome).
`url` - string - The URL of the search engine (with query syntax used in Chrome https://support.google.com/chrome/answer/95426#ts&zippy=%2Curl-with-s-in-place-of-query-field).

Examples:
```js
{
addSearchWithOther: {
title: 'Bing',
url: 'https://www.bing.com/search'
title: 'DuckDuckGo',
url: 'https://duckduckgo.com?q=%s'
}
};
}
```
```js
{
addSearchWithOther: {
title: 'DuckDuckGo',
url: 'https://duckduckgo.com'
title: 'Wolfram Alpha',
url: 'https://www.wolframalpha.com/input?i=%s'
}
};
}
```

#### showSelectAll
Expand Down

0 comments on commit 2653854

Please sign in to comment.