1
0
Fork 0
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:
unknown 2021-06-25 10:42:44 +02:00
parent aec00982ba
commit 0c3a27febd
9 changed files with 73 additions and 38 deletions

View file

@ -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;
}