PageSourceSearch

https://www.icehotel.com/themes/custom/citybreakweb/cb_icehotel_v2/js/config.js

js icehotel.com collected 2026-09-24 18:48:16 UTC 811 bytes, 30 lines download raw bytes

1// config.js - shared functions
2
3const UTILS_CONFIG = {
4  URLS: {
5    SEARCH: '/search/results'
6  }
7};
8
9export const searchUtils = {
10  handleSearchCancel: (input, cancel, hideButton) => {
11    input.value = '';
12    if (hideButton) {
13      cancel.style.display = 'none';
14    }
15  },
16
17  handleSearchInput: (input, cancel) => {
18    cancel.style.display = input.value.trim() ? 'block' : 'none';
19  },
20
21  handleSearchSubmit: (form, input) => {
22    const pathSegments = window.location.pathname.split('/');
23    const potentialLang = pathSegments[1];
24    const langPrefix = (potentialLang && potentialLang.length === 2) ? `/${potentialLang}` : '';
25
26    // Build the full search URL.
27    const finalURL = `${langPrefix}${UTILS_CONFIG.URLS.SEARCH}?q=${encodeURIComponent(input.value)}`;
28    form.action = finalURL;
29  },
30};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.