diff options
author | Ruben Rodriguez <ruben@gnu.org> | 2018-09-13 20:39:48 -0400 |
---|---|---|
committer | Ruben Rodriguez <ruben@gnu.org> | 2018-09-13 21:02:13 -0400 |
commit | d26b319fd6f98517cc3421f10bf18698b953e4d2 (patch) | |
tree | bc70c4e472a2eaf514d411dba5067d530e5bbea9 /data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/docs/awesomebar.md | |
parent | c3b304c51a3386ea09527a479a883253ea35243a (diff) |
Updated extensions list for v60
Diffstat (limited to 'data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/docs/awesomebar.md')
-rw-r--r-- | data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/docs/awesomebar.md | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/docs/awesomebar.md b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/docs/awesomebar.md deleted file mode 100644 index dcfbb1f..0000000 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/docs/awesomebar.md +++ /dev/null @@ -1,61 +0,0 @@ -<!-- contributed by Erik Vold [erikvvold@gmail.com] --> - - -The `awesomebar` API provides a simple way to create AwesomeBar suggestions. - -## Example ## - - // add github search - AwesomeBarSuggestion({ - icon: self.data.url("github_16.png"), - matches: /^(?:@[\w\d_-]+|github\s)/i, - onSearch: function(query, suggest) { - query = query.trim(); - if (/^github\s/i.test(query)) { - query = query.replace(/^github\s/i, ""); - suggest({ - title: 'Search Github for: ' + query, - favicon: self.data.url("github_16.png"), - url: 'https://github.com/search?q=' + encodeURIComponent(query) - }, true); - } else { - var username = query.match(/^@([\w\d_-]+)/)[1]; - suggest({ - title: 'Github user: ' + username, - label: "View user profile for @" + username, - favicon: self.data.url("github_16.png"), - url: 'https://github.com/' + username - }, true); - } - } - }); - -<api name="AwesomeBarSuggestion"> -@class - A `AwesomeBarSuggestion` constructor is exported, which allows one to create a - AwesomeBar suggestions. - -<api name="AwesomeBarSuggestion"> -@constructor - Creates a AwesomeBar suggestion handler. - -@param options {object} - Options for the AwesomeBar suggester, with the following parameters: - -@prop matches {string} - A regular expression which is tested againsted the location bar input string. - -@prop [icon] {string} - A URL for a 16x16 icon image. - -@prop onSearch {function} - Function that is invoked when the match pattern matches the location bar input - string. If will receive too arguments, `query` which is the input string, and - `suggest` which is a function that can be made to return suggestions. -</api> - -<api name="destroy"> -@method - Removes the AwesomeBar suggester. -</api> -</api> |