Skip to content

Commit 1cef0ff

Browse files
use huly://newtab for empty tabs
Signed-off-by: NikitaSkrynnik <[email protected]>
1 parent edef58f commit 1cef0ff

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ function App() {
2222
setApp(app);
2323
});
2424

25-
2625
return (
2726
<Show when={app()} fallback={<Notification message={event().message} type={event().type} />}>
2827
{(app) =>

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ if (!import.meta.env.DEV) {
99
}
1010
}
1111

12-
setConfig({ logging: false, defaultUrl: "data:text/html,<html><head><title>New Tab</title></head><body></body></html>" })
12+
setConfig({ logging: false, defaultUrl: "huly://newtab" })
1313

1414
render(() => <App />, document.getElementById("root") as HTMLElement);

src/state/state.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,9 @@ export class AppState {
236236

237237
private processSearchString(searchString: string) {
238238
let is1 = isFQDN(searchString);
239-
let is2 = isURL(searchString, { protocols: ["http", "https"] });
239+
let is2 = isURL(searchString, { protocols: ["http", "https", "huly"], require_tld: false });
240+
240241
if (is1 || is2) {
241-
console.log("It's a domain: ", is1);
242-
console.log("It's a URL: ", is2);
243242
return searchString;
244243
}
245244
return `https://www.google.com/search?q=${searchString}`;

0 commit comments

Comments
 (0)