mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-20 20:19:35 +02:00
Added warning about unsupported prefix. Added support for Spotify search. Edited README file
This commit is contained in:
parent
aec00982ba
commit
0c3a27febd
9 changed files with 73 additions and 38 deletions
|
@ -3,7 +3,7 @@ import { Query } from '../interfaces';
|
|||
|
||||
import { searchConfig } from '.';
|
||||
|
||||
export const searchParser = (searchQuery: string): void => {
|
||||
export const searchParser = (searchQuery: string): boolean => {
|
||||
const space = searchQuery.indexOf(' ');
|
||||
const prefix = searchQuery.slice(1, space);
|
||||
const search = encodeURIComponent(searchQuery.slice(space + 1));
|
||||
|
@ -18,5 +18,9 @@ export const searchParser = (searchQuery: string): void => {
|
|||
} else {
|
||||
window.open(`${query.template}${search}`);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue