
Context Search 作者: Olivier de Broqueville
Search selected text using your preferred search engines. Right-click or Alt-click on selected text to respectively launch the context menu or the icons grid. You can also perform searches using keywords in the url address bar. Requires Firefox 79+.
您需要 Firefox 来使用此扩展
扩展元数据
屏幕截图





关于此扩展
Context Search
Firefox add-on to search selected text in a web page using your favorite search engines.
Permissions
Notifications, Downloads, History and Bookmarks are now optional permissions. They are disabled by default. If you'd like to show notifications and/or save your list of search engines to your local disk, or search your history or bookmarks from the Omnibox, then open the extensions manager, select Context Search and under the Permissions tab enable the appropriate permissions.
To open search results in a new private window, in the extensions manager, allow Context Search to "Run in Private Windows".
How does it work
The search results will appear as defined in the extension's preferences page.
Managing search engines
To manage your favorite search engines, you can go to the preferences page of Context Search. You can reach this page by opening the extensions page (Addon Manager) where all your add-ons are listed and then clicking on the "Preferences" button.
Please refer to the 4th screenshot above.
The 'Reset' button will re-load the default list of search engines and their associated favicons.
You can also import a JSON file containing your own list of search engines. It is strongly recommended to export your customized list of search engines as a backup in case anything goes wrong.
How to add a search engine to your custom list
* visit mycroftproject.com and click on the Context Search icon that appears before the textual link of a listed search engine
* use the page action (i.e. Context Search icon in the url address bar) to add a search engine if the website supports open search
* add a search engine manually via the Options page (you can test the query string before adding the search engine)
How to perform a search in the omnibox
In the omnibox (or url address bar), type 'cs ' (without the quotes, and where cs stands for Context Search) followed by the keyword you have chosen for your seaarch engine in the extension's preferences, e.g. 'w ' (again without quotes) for Wikipedia, followed by your search term(s). The dot ('.'), the exclamation mark ('!'), '!h' or 'history' and '!b' or 'bookmarks' are reserved keywords.
Here are some examples:
cs w atom
will search for the word 'atom' in Wikipedia.
cs .
will open the Options page
cs ! cold fusion
will perform a multi-search for the search terms 'cold fusion'
cs !h or cs history
will display all your history
cs !b Mozilla or cs bookmarks Mozilla
will display all bookmarks that include the term Mozilla
cs !b recent or cs bookmarks recent
will display your 10 most recent bookmarks
Advanced features
You can add a regular expression to each search engine. If the selected text matches the regex, then the search engine will appear in the context menu. As an example, imagine you had a search engine for booking.com and another for tripadvisor.com and you would like these search engines to appear in the context menu when a selection contains the word 'hotel'. Then, for those search engines, you'd enter the regex /hotel/. If you then make any other selection that doesn't contain the word "hotel" in it, those search engines won't appear in the context menu. There's a very useful website for building a regex: https://regex101.com. Another example is, if you select an IP address, then you might want the search engine corresponding to whatismyipaddress.com to appear. The regex here is a little more complicated to establish, but Google can help: search Google for "regex for ip address".
The main structure of a JSON file containing the search engines
```javascript
{
"id": {
"index": 0,
"name": "search engine's name",
"keyword": "keyword to be used in an omnibox search",
"multitab": "takes the value true or false depending on whether this search engine should be included in a multi-search or not",
"url": "search engine query string (without the search terms)",
"show": "takes the value true if the search engine is to be shown in the context menu or false if not",
"base64": "a base 64 string representation of the search engine's favicon"
}
}
```
Here is an example of a JSON file containing 3 search engines:
```javascript
{
"bing": {
"index": 0,
"name": "Bing",
"keyword": "b",
"multitab": false,
"url": "https://www.bing.com/search?q=",
"show": true,
"base64": ""
},
"google": {
"index": 1,
"name": "Google",
"keyword": "g",
"multitab": false,
"url": "https://www.google.com/search?q=",
"show": true,
"base64": ""
},
"yahoo": {
"index": 2,
"name": "Yahoo!",
"keyword": "y",
"multitab": false,
"url": "https://search.yahoo.com/search?p=",
"show": true,
"base64": ""
}
}
```
It is not required to provide the base 64 string representation of any search engine's favicon. This string will automatically be loaded for you.
Special thanks to the following contributors
Code made by others used in this extension
Firefox add-on to search selected text in a web page using your favorite search engines.
Permissions
Notifications, Downloads, History and Bookmarks are now optional permissions. They are disabled by default. If you'd like to show notifications and/or save your list of search engines to your local disk, or search your history or bookmarks from the Omnibox, then open the extensions manager, select Context Search and under the Permissions tab enable the appropriate permissions.
To open search results in a new private window, in the extensions manager, allow Context Search to "Run in Private Windows".
How does it work
- Select some text on a webpage
- Right click (or Alt-click) on a selection
- A context menu (or a grid of icons) appears, displaying the list of search engines chosen in the extension's preferences
- Click on the search engine with which you’d like to search for the selected text
The search results will appear as defined in the extension's preferences page.
Managing search engines
To manage your favorite search engines, you can go to the preferences page of Context Search. You can reach this page by opening the extensions page (Addon Manager) where all your add-ons are listed and then clicking on the "Preferences" button.
Please refer to the 4th screenshot above.
- The checkbox at the start of a line determines whether the search engine should appear in the context menu.
- The next item on the line contains the name of the search engine and is followed by a keyword.
- This keyword is used in the url address bar (or omnibox) after the word “cs “ and before the search terms (e.g. to search for linux using the search engine Wikipedia, you would type: ‘cs w linux’, where w is the keyword assigned to Wikipedia).
- Next, you can assign a keyboard shortcut to a search engine to perform a quick search. Please note that not all key combinations will work as some may be reserved by the browser or your system.
- The second checkbox specifies whether you’d like to use the search engine in a “multi-search”. A “multi-search” is a search performed using multiple search engines and can be selected in the context menu of in the grid of icons.
- The checkbox is followed by the search query string. This is the generic url you would use to perform a search. Search query strings may contain the parameters %s or {searchTerms} where you'd like your search terms, i.e. the selected text, to appear.
- Click on and drag the move icon to the left of the trash icon to move each search engine up or down in the list.
- Click on the trash icon to remove a search engine from the list.
The 'Reset' button will re-load the default list of search engines and their associated favicons.
You can also import a JSON file containing your own list of search engines. It is strongly recommended to export your customized list of search engines as a backup in case anything goes wrong.
How to add a search engine to your custom list
* visit mycroftproject.com and click on the Context Search icon that appears before the textual link of a listed search engine
* use the page action (i.e. Context Search icon in the url address bar) to add a search engine if the website supports open search
* add a search engine manually via the Options page (you can test the query string before adding the search engine)
How to perform a search in the omnibox
In the omnibox (or url address bar), type 'cs ' (without the quotes, and where cs stands for Context Search) followed by the keyword you have chosen for your seaarch engine in the extension's preferences, e.g. 'w ' (again without quotes) for Wikipedia, followed by your search term(s). The dot ('.'), the exclamation mark ('!'), '!h' or 'history' and '!b' or 'bookmarks' are reserved keywords.
Here are some examples:
cs w atom
will search for the word 'atom' in Wikipedia.
cs .
will open the Options page
cs ! cold fusion
will perform a multi-search for the search terms 'cold fusion'
cs !h or cs history
will display all your history
cs !b Mozilla or cs bookmarks Mozilla
will display all bookmarks that include the term Mozilla
cs !b recent or cs bookmarks recent
will display your 10 most recent bookmarks
Advanced features
You can add a regular expression to each search engine. If the selected text matches the regex, then the search engine will appear in the context menu. As an example, imagine you had a search engine for booking.com and another for tripadvisor.com and you would like these search engines to appear in the context menu when a selection contains the word 'hotel'. Then, for those search engines, you'd enter the regex /hotel/. If you then make any other selection that doesn't contain the word "hotel" in it, those search engines won't appear in the context menu. There's a very useful website for building a regex: https://regex101.com. Another example is, if you select an IP address, then you might want the search engine corresponding to whatismyipaddress.com to appear. The regex here is a little more complicated to establish, but Google can help: search Google for "regex for ip address".
The main structure of a JSON file containing the search engines
```javascript
{
"id": {
"index": 0,
"name": "search engine's name",
"keyword": "keyword to be used in an omnibox search",
"multitab": "takes the value true or false depending on whether this search engine should be included in a multi-search or not",
"url": "search engine query string (without the search terms)",
"show": "takes the value true if the search engine is to be shown in the context menu or false if not",
"base64": "a base 64 string representation of the search engine's favicon"
}
}
```
Here is an example of a JSON file containing 3 search engines:
```javascript
{
"bing": {
"index": 0,
"name": "Bing",
"keyword": "b",
"multitab": false,
"url": "https://www.bing.com/search?q=",
"show": true,
"base64": ""
},
"google": {
"index": 1,
"name": "Google",
"keyword": "g",
"multitab": false,
"url": "https://www.google.com/search?q=",
"show": true,
"base64": ""
},
"yahoo": {
"index": 2,
"name": "Yahoo!",
"keyword": "y",
"multitab": false,
"url": "https://search.yahoo.com/search?p=",
"show": true,
"base64": ""
}
}
```
It is not required to provide the base 64 string representation of any search engine's favicon. This string will automatically be loaded for you.
Special thanks to the following contributors
- Carl Scheller for implementing the drag & drop feature to move search engines in the Options page
- Geoffrey De Belie for the Dutch translation
- Krzysztof Galazka for the Polish translation
- Sergio Tombesi for the Italian and Spanish translations
- Fushan Wen for the Chinese translation
- Sveinn í Felli for the Icelandic translation
Code made by others used in this extension
- SortableJS v1.14.0 minified with many contributors, which can be found on GitHub here: https://github.com/SortableJS/Sortable/blob/1.14.0/Sortable.min.js
开发者留言
The add-on has been created using the Web extensions API, with Firefox 57+ in mind. It is intended to serve as a replacement for Ben Basson's popular Context Search Add-on. It's only been tested on Mac so please email me if you experience issues.
为您的体验打分
举报此附加组件的滥用行为
如果您认为此附加组件违背了 Mozilla 附加组件政策 或存在安全或隐私问题,请使用此表单向 Mozilla 报告问题。
请勿使用此表单报告附加组件的缺陷或请求功能。此表单将发给 Mozilla 官方,而非附加组件的开发者。
支持这位开发者
此扩展的开发者寻求您的小小捐助以支持其持续发展。
权限详细了解
此附加组件需要:
- 存取您在所有网站的数据
此附加组件可能也会要求:
- 读取和修改书签
- 下载文件和读取与修改浏览器的下载历史
- 存取浏览历史
- 为您显示通知
更多信息
- 附加组件链接
- 版本
- 4.4.5
- 大小
- 960.77 KB
- 上次更新
- 13 天前 (2023年5月20日)
- 相关分类
- 许可证
- 保留所有权利
- 隐私政策
- 阅读此附加组件的隐私政策
- 最终用户许可协议
- 阅读此附加组件的许可协议
- 版本历史
- 标签
添加到收藏集
Olivier de Broqueville 制作的更多扩展
- 目前尚无评分
- 目前尚无评分
- 目前尚无评分
- 目前尚无评分
- 目前尚无评分
- 目前尚无评分