PageSourceSearch

https://thecorporatedictionary.com/js/script.js

js thecorporatedictionary.com collected 2026-10-02 22:12:57 UTC 1,494 bytes, 37 lines download raw bytes

1// JavaScript to render the current hostname
2document.addEventListener("DOMContentLoaded", function () {
3  document.getElementById("current-hostname").textContent =
4    window.location.hostname;
5
6  // Get references to the input and button
7  const domainInput = document.getElementById("domain-search");
8  const searchButton = document.getElementById("search-button");
9
10  // Add event listener to the button
11  searchButton.addEventListener("click", function () {
12    const inputValue = domainInput.value.trim(); // Get input value and remove leading/trailing whitespace
13
14    // Check if the input is not empty before redirecting
15    if (inputValue) {
16      // Construct the redirect URL
17      const redirectUrl = `https://domains.cloudflare.com/?domain=${encodeURIComponent(
18        inputValue
19      )}&utm_source=registrar_template&utm_medium=referral&utm_campaign=pay-re-plchldr_tmplt`;
20
21      // Redirect the user
22      window.location.href = redirectUrl;
23    } else {
24      // Optionally, provide feedback if the input is empty
25      alert("Please enter a domain name to search.");
26      domainInput.focus(); // Put focus back on the input
27    }
28  });
29
30  // Optional: Allow pressing Enter key in the input field to trigger the search
31  domainInput.addEventListener("keypress", function (event) {
32    if (event.key === "Enter") {
33      event.preventDefault(); // Prevent default form submission behavior (if any)
34      searchButton.click(); // Simulate a click on the button
35    }
36  });
37});

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.