Update script.js
Fix annoying spaces in two letter prefixes
This commit is contained in:
parent
86743586c3
commit
059f3cd348
|
@ -2,7 +2,7 @@
|
||||||
* Evening Startpage
|
* Evening Startpage
|
||||||
* Inspired by https://github.com/jeroenpardon/sui
|
* Inspired by https://github.com/jeroenpardon/sui
|
||||||
* You can find it at https://github.com/TB-96/Evening-Startpage
|
* You can find it at https://github.com/TB-96/Evening-Startpage
|
||||||
* Made by TB-96 2020
|
* Made by TB-96 2021
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ document.onkeypress = (e) => {
|
||||||
|
|
||||||
if (e.key == 'Enter') {
|
if (e.key == 'Enter') {
|
||||||
if (prefix.indexOf('!') == 0)
|
if (prefix.indexOf('!') == 0)
|
||||||
(engine = engines[prefix.substr(1)][0], str = 3);
|
(engine = engines[prefix.substr(1)][0], str = prefix.length + 1);
|
||||||
|
|
||||||
window.location = engine + args.join(' ').substr(str).toString().replace(/\s+/m, '%20');
|
window.location = engine + args.join(' ').substr(str).toString().replace(/\s+/m, '%20');
|
||||||
} else if (e.keyCode == 27)
|
} else if (e.keyCode == 27)
|
||||||
|
|
Loading…
Reference in New Issue