---
title: "Slash to Search—-更快速地搜索"
author: "khotyn"
date: "2011-02-20T23:25:07Z"
tags: ["Chrome", "Gmail", "Twitter", "正则表达式"]
categories: ["Web前端"]
slug: "slash-to-search"
draft: false
lastmod: "2011-02-20T23:25:07Z"
id: 911450
url: "https://khotyn.iteye.com/blog/911450"
---

春节期间做了一个Chrome插件，这几天晚上又捣鼓了几下，拿出来和大家分享一下：

### 一、Slash to Search是什么？

Slash to Search是一个Chrome插件，使你在添加了一定的规则以后就可以通过敲击“/”来将页面焦点定位在搜索框上（事实上支持所有的输入框）。

### 二、如何使用Slash to Search？

- 首先从[https://github.com/downloads/khotyn/Slash-to-Search/Slash-to-Search-0.2.crx](https://github.com/downloads/khotyn/Slash-to-Search/Slash-to-Search-0.2.crx)下在Slash to Search并安装到你的Chrome中
- 打开一个页面（比如[http://www.khotyn.com](http://www.khotyn.com/)），右击搜索框并点击“Add to Slash-to-Search”
- 在弹出的配置页中选择Type（regex表示在匹配URL时采用正则表达式匹配，normal表示在匹配URL时采用精确匹配）点击Add就可以将可以添加可以规则
- 回到你打开的那个页面，按下“/”，看看是不是光标已经定位到搜索框中了？

### 三、后续计划

- 修复Bug
- 支持在线规则导入（已经在最新的版本中支持）

### 四、反馈

如果你对这个插件有任何意见，欢迎发邮件告诉我：hting1(a)gmail.com，或者在Twitter(@khotyn)上给我留言。这个插件的源代码在:[https://github.com/khotyn/Slash-to-Search](https://github.com/khotyn/Slash-to-Search)

原文发表于：[http://www.khotyn.com/2011/02/18/slash\_to\_search/](http://www.khotyn.com/2011/02/18/slash_to_search/ "http://www.khotyn.com/2011/02/18/slash_to_search/")