15 lines
510 B
JavaScript
15 lines
510 B
JavaScript
/** Default search for the Jarvis Chromium window and the agent. */
|
|
|
|
const SEARCH_HOME = 'https://duckduckgo.com/';
|
|
|
|
function duckduckgoSearchUrl(query) {
|
|
return 'https://duckduckgo.com/?q=' + encodeURIComponent(String(query || '').trim());
|
|
}
|
|
|
|
function isBlankStart(url) {
|
|
const value = String(url || '');
|
|
return !value || value === 'about:blank' || value.startsWith('chrome://newtab') || value.startsWith('chrome://new-tab-page');
|
|
}
|
|
|
|
module.exports = { SEARCH_HOME, duckduckgoSearchUrl, isBlankStart };
|