### Navigate to Word Definition Source: https://www.bolsozluk.com/ahiyan-4.html Gets the value from an input field with ID 'q', converts it to lowercase, and redirects the browser to a 'sozluk.php' page to display the word's definition. ```javascript function mobgetir() { var kelime = document.getElementById('q').value.toLowerCase(); self.location.href = 'sozluk.php?process=word&q=' + kelime; } ``` -------------------------------- ### Navigate to Word Entry Source: https://www.bolsozluk.com/rota-1.html Gets a word from an input field, converts it to lowercase, and redirects the browser to a specific word entry page on 'sozluk.php'. ```javascript function mobgetir() { var kelime = document.getElementById('q').value.toLowerCase(); self.location.href = 'sozluk.php?process=word&q=' + kelime; } ``` -------------------------------- ### Search Word with Prefix Source: https://www.bolsozluk.com/ahiyan-4.html Gets the value from an input field with ID 'x', converts it to lowercase, sets a fixed prefix 'ahiyan', and redirects to 'sozluk.php' for a specific search process. ```javascript function basara() { var kelime = document.getElementById('x').value.toLowerCase(); var basbas = "ahiyan"; self.location.href = 'sozluk.php?process=word&q=' + basbas + '&mod=arabul&aranacak=' + kelime; } ``` -------------------------------- ### Get Page Link and Prompt Source: https://www.bolsozluk.com/rota-1.html Retrieves text content from a DOM element with ID 'dom-target' and displays it in a browser prompt for the user to copy. ```javascript function linkb() { var div = document.getElementById("dom-target"); var myData = div.textContent; window.prompt("sayfa linki:", myData); } ``` -------------------------------- ### Get Page Link and Prompt Source: https://www.bolsozluk.com/ahiyan-4.html Retrieves text content from a DOM element with ID 'dom-target' and displays it in a browser prompt, allowing the user to copy the page link. ```javascript function linkb() { var div = document.getElementById("dom-target"); var myData = div.textContent; window.prompt("sayfa linki:", myData); } ``` -------------------------------- ### Get Page Link and Prompt Source: https://www.bolsozluk.com/pislick-1.html Retrieves text content from a DOM element with ID 'dom-target' and displays it in a browser prompt for the user to copy the page link. ```javascript function linkb() { var div = document.getElementById("dom-target"); var myData = div.textContent; window.prompt("sayfa linki:", myData); } ``` -------------------------------- ### Get Page Link and Prompt Source: https://www.bolsozluk.com/gazapizm-1.html This JavaScript function retrieves text content from a DOM element with the ID 'dom-target' and displays it in a browser prompt, allowing the user to copy the page link. It's a utility for sharing or referencing content. ```javascript function linkb() { var div = document.getElementById("dom-target"); var myData = div.textContent; window.prompt("sayfa linki:", myData); } ``` -------------------------------- ### Get Page Link and Prompt Source: https://www.bolsozluk.com/heja-1.html Retrieves text content from a DOM element with ID 'dom-target' and displays it in a browser prompt for the user to copy. This function is useful for sharing page links or specific content. ```javascript function linkb() { var div = document.getElementById("dom-target"); var myData = div.textContent; window.prompt("sayfa linki:", myData); } ``` -------------------------------- ### Get Page Link and Prompt Source: https://www.bolsozluk.com/motive-1.html This function retrieves the text content from a DOM element with the ID 'dom-target'. It then uses the browser's built-in prompt function to display this content to the user, allowing them to easily copy or view page-specific data. ```javascript function linkb() { var div = document.getElementById("dom-target"); var myData = div.textContent; window.prompt("sayfa linki:", myData); } ``` -------------------------------- ### Navigate to Word Definition Source: https://www.bolsozluk.com/pislick-1.html Takes a value from an input field with ID 'q', converts it to lowercase, and redirects the browser to a 'sozluk.php' page to display the word's definition. ```javascript function mobgetir() { var kelime = document.getElementById('q').value.toLowerCase(); self.location.href = 'sozluk.php?process=word&q=' + kelime; } ``` -------------------------------- ### Google AdSense Initialization Source: https://www.bolsozluk.com/rota-1.html Initializes and pushes an ad unit to the Google AdSense service. This is a standard snippet for displaying ads. ```javascript (adsbygoogle = window.adsbygoogle || []).push({}); ``` -------------------------------- ### Google AdSense Initialization Source: https://www.bolsozluk.com/ahiyan-4.html Standard Google AdSense code snippet to push an ad request to the ad network. This is typically used for displaying advertisements on web pages. ```javascript (adsbygoogle = window.adsbygoogle || []).push({}); ``` -------------------------------- ### Google Analytics Integration Source: https://www.bolsozluk.com/motive-1.html Initializes Google Analytics tracking by setting up the data layer and configuring the analytics tracker with a specific ID. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){ dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'G-3Q34PEYTM8'); ``` -------------------------------- ### Navigate to Word Definition Source: https://www.bolsozluk.com/gazapizm-1.html This function reads a search query from an input field with the ID 'q', converts it to lowercase, and then redirects the browser to a 'sozluk.php' page to display the definition of the entered word. It's used for mobile word lookups. ```javascript function mobgetir() { var kelime = document.getElementById('q').value.toLowerCase(); self.location.href = 'sozluk.php?process=word&q=' + kelime; } ``` -------------------------------- ### Bol Sözlük Navigation and Search Functions Source: https://www.bolsozluk.com/selo-3.html JavaScript functions for navigating the Bol Sözlük website, including fetching word definitions, performing searches, and redirecting the user based on input. These functions interact with the page's DOM and URL structure. ```javascript function linkb() { var div = document.getElementById("dom-target"); var myData = div.textContent; window.prompt("sayfa linki:", myData); } ``` ```javascript function mobgetir() { var kelime = document.getElementById('q').value.toLowerCase(); self.location.href = 'sozluk.php?process=word&q=' + kelime; } ``` ```javascript function mobara() { var kelime = document.getElementById('q').value; self.location.href = 'sozluk.php?process=search&q=' + kelime; } ``` ```javascript function basara() { var kelime = document.getElementById('x').value.toLowerCase(); var basbas = "selo"; self.location.href = 'sozluk.php?process=word&q=' + basbas + '&mod=arabul&aranacak=' + kelime; } ``` -------------------------------- ### Redirect to Word Definition Source: https://www.bolsozluk.com/heja-1.html Reads a search query from an input field with ID 'q', converts it to lowercase, and redirects the browser to a 'sozluk.php' page to display the word's definition. It's designed for mobile or specific search contexts. ```javascript function mobgetir() { var kelime = document.getElementById('q').value.toLowerCase(); self.location.href='sozluk.php?process=word&q='+kelime; } ``` -------------------------------- ### Google Analytics Configuration Source: https://www.bolsozluk.com/selo-3.html This snippet configures Google Analytics tracking for the website. It initializes the dataLayer and sets up the gtag function to send page view data and track events. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){ dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'G-3Q34PEYTM8'); ``` -------------------------------- ### JavaScript for Google Analytics Source: https://www.bolsozluk.com/ahiyan-4.html This JavaScript snippet initializes Google Analytics tracking for the website. It ensures that analytics data is collected by pushing events to the `dataLayer` and configuring the tracking ID. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){ dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'G-3Q34PEYTM8'); ``` -------------------------------- ### Search for Word Source: https://www.bolsozluk.com/pislick-1.html Retrieves a value from an input field with ID 'q' and redirects the browser to a 'sozluk.php' page to perform a search for the entered term. ```javascript function mobara() { var kelime = document.getElementById('q').value; self.location.href = 'sozluk.php?process=search&q=' + kelime; } ``` -------------------------------- ### Entry Search Function Source: https://www.bolsozluk.com/aspova-1.html This JavaScript function retrieves a value from an input field ('x'), sets a predefined base word ('aspova'), and redirects to 'sozluk.php' to search for the entered word in a specific mode. ```javascript function basara() { var kelime = document.getElementById('x').value.toLowerCase(); var basbas = "aspova"; self.location.href='sozluk.php?process=word&q='+basbas+'&mod=arabul&aranacak='+kelime; } ``` -------------------------------- ### Search Word Source: https://www.bolsozluk.com/ahiyan-4.html Retrieves the value from an input field with ID 'q' and redirects the browser to a 'sozluk.php' page to perform a search with the entered query. ```javascript function mobara() { var kelime = document.getElementById('q').value; self.location.href = 'sozluk.php?process=search&q=' + kelime; } ``` -------------------------------- ### JavaScript for Dictionary Word Fetching and Search Source: https://www.bolsozluk.com/ahiyan-4.html These JavaScript functions handle user interactions related to fetching dictionary words and performing searches. `kanaat` appears to handle user feedback (e.g., likes/dislikes) via AJAX, while `mobgetir` and `mobara` are likely for mobile search input processing and redirection. ```javascript function kanaat(id,kanaat){ ajaxReq('/icerik/kanaat.php?id='+id+'&knt='+kanaat,'oySonuc'+id); } function mobgetir(){ var kelime = document.getElementById('q').value.toLowerCase(); self.location.href='sozluk.php?process=word&q='+kelime; } function mobara() { var kelime = document.getElementById('q').value; self.location.href='sozluk.php?process=search&q='+kelime; } ``` -------------------------------- ### Mobile Search and Navigation Source: https://www.bolsozluk.com/uzi-1.html These functions are designed for mobile interfaces, retrieving a search query from an input field and redirecting the user to a specific page ('sozluk.php') based on the query. 'mobgetir' fetches a word, while 'mobara' performs a general search. ```javascript function mobgetir() { var kelime = document.getElementById('q').value.toLowerCase(); self.location.href = 'sozluk.php?process=word&q=' + kelime; } function mobara() { var kelime = document.getElementById('q').value; self.location.href = 'sozluk.php?process=search&q=' + kelime; } ``` -------------------------------- ### Mobile Search and Navigation Functions Source: https://www.bolsozluk.com/aspova-1.html These JavaScript functions handle user input from a search field ('q') to navigate to specific word entries or perform searches within the 'sozluk.php' script. ```javascript function mobgetir() { var kelime = document.getElementById('q').value.toLowerCase(); self.location.href='sozluk.php?process=word&q='+kelime; } function mobara() { var kelime = document.getElementById('q').value; self.location.href='sozluk.php?process=search&q='+kelime; } ``` -------------------------------- ### Google AdSense Push Source: https://www.bolsozluk.com/motive-1.html A standard JavaScript snippet used to push ad configurations or requests to Google AdSense. ```javascript (adsbygoogle = window.adsbygoogle || []).push({}); ``` -------------------------------- ### Mobile Search and Word Retrieval Functions Source: https://www.bolsozluk.com/selo-3.html These JavaScript functions, 'mobgetir' and 'mobara', are intended for mobile interfaces. 'mobgetir' retrieves a word based on input and navigates to a specific URL, while 'mobara' performs a search operation with the input value. ```javascript function mobgetir() { var kelime = document.getElementById('q').value.toLowerCase(); self.location.href = 'sozluk.php?process=word&q=' + kelime; } function mobara() { var kelime = document.getElementById('q').value; self.location.href = 'sozluk.php?process=search&q=' + kelime; } ``` -------------------------------- ### Redirect to Word Definition Source: https://www.bolsozluk.com/motive-1.html This function captures the value from an input field with the ID 'q', converts it to lowercase, and then redirects the browser to 'sozluk.php'. The redirection is configured to process the entered word, facilitating direct lookups on the dictionary site. ```javascript function mobgetir() { var kelime = document.getElementById('q').value.toLowerCase(); self.location.href = 'sozluk.php?process=word&q=' + kelime; } ``` -------------------------------- ### Search for Word Source: https://www.bolsozluk.com/rota-1.html Retrieves a search query from an input field and redirects the browser to a search results page on 'sozluk.php'. ```javascript function mobara() { var kelime = document.getElementById('q').value; self.location.href = 'sozluk.php?process=search&q=' + kelime; } ``` -------------------------------- ### General CSS Styling for Dictionary Website Source: https://www.bolsozluk.com/ahiyan-4.html This CSS block defines styles for various HTML elements and custom classes used throughout the website. It covers layout, typography, button appearances, and responsive behavior, aiming to create a consistent and user-friendly interface for the dictionary application. ```css html { overflow: -moz-scrollbars-vertical; overflow: -moz-scrollbars-horizontal; overflow: scroll; } .dropdown { position: relative; display: inline-block; } .dropdown-content { display: none; position: absolute; background-color: #f9f9f9; min-width: 100%; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); z-index: 1; padding: 0; margin: 0; text-align: left; } .dropdown:hover .dropdown-content { display: block; } .dropdown-content a { display: block; padding: 8px; margin: 0; text-align: left; } .dropdown-content a:hover { background-color: #ddd; } .dropdown-content::after { content: ""; display: table; clear: both; } input[type=radio] { -webkit-appearance:checkbox; } @media print { html, body { display: none; /* hide whole page */ } } .yesil { background-color: #006400; border: yes; color: white; padding: 5px 2px; text-align: center; text-decoration: none; display: inline-block; font-size: 11px; vertical-align: top; cursor: pointer; } .kirmizi { background-color: #8B0000; border: yes; color: white; padding: 5px 2px; text-align: center; text-decoration: none; display: inline-block; font-size: 11px; vertical-align: top; cursor: pointer; } .butx { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #242b3a; text-align: center; } .butsuk { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #242b3a; text-align: center; margin:2px; } .butkir { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #900D09; text-align: center; margin:2px; } .butyes { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #0B6623; text-align: center; margin:2px; } .buttur { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #ED7014; text-align: center; margin:2px; } .butsar { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #E67451; text-align: center; margin:2px; } .butbv { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #2C041C; text-align: center; margin:2px; } .butgpt{ border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #00A67E; text-align: center; margin:2px; } .divider{ width:2px; height:auto; display:inline-block; } li { font-size: 14px; line-height: 13pt; } .butx { border-right: #a6b4d4 1px outset; border-TOP: #a6b4d4 1px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 1px outset; CURSOR: default; color: white; display: inline-block; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #242b3a; text-align: center } input { -webkit-appearance: none; -moz-appearance: none; appearance: none; padding: 4px; display: inline-block; } ``` -------------------------------- ### Google AdSense Integration Source: https://www.bolsozluk.com/pislick-1.html This is a standard JavaScript snippet used for integrating Google AdSense into a webpage, enabling the display of advertisements. ```JavaScript (adsbygoogle = window.adsbygoogle || []).push({}); ``` -------------------------------- ### Form Submission with Ctrl+Enter or Cmd+Enter Source: https://www.bolsozluk.com/selo-3.html This script adds a keydown event listener to a textarea element with the ID 'entry'. It listens for the Ctrl+Enter (or Cmd+Enter on Mac) key combination to prevent the default behavior and submit the associated form. ```javascript document.addEventListener('DOMContentLoaded', function() { var textarea = document.getElementById('entry'); var form = textarea.closest('form'); textarea.addEventListener('keydown', function(e) { // Check for Ctrl+Enter or Cmd+Enter key combination if ((e.ctrlKey || e.metaKey) && e.keyCode === 13) { e.preventDefault(); // Prevent default behavior form.submit(); // Submit the form } }); }); ``` -------------------------------- ### Custom Button Styles Source: https://www.bolsozluk.com/selo-3.html Provides a set of CSS classes for styling various buttons with different colors and appearances. These classes are used for interactive elements like 'yesil' (green), 'kirmizi' (red), and other custom-styled buttons. ```css .yesil { background-color: #006400; border: yes; color: white; padding: 5px 2px; text-align: center; text-decoration: none; display: inline-block; font-size: 11px; vertical-align: top; cursor: pointer; } .kirmizi { background-color: #8B0000; border: yes; color: white; padding: 5px 2px; text-align: center; text-decoration: none; display: inline-block; font-size: 11px; vertical-align: top; cursor: pointer; } .butx { border-right: #a6b4d4 1px outset; border-TOP: #a6b4d4 1px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 1px outset; CURSOR: default; color: white; display: inline-block; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #242b3a; text-align: center } .butsuk { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #242b3a; text-align: center; margin:2px; } .butkir { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #900D09; text-align: center; margin:2px; } .butyes { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #0B6623; text-align: center; margin:2px; } .buttur { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #ED7014; text-align: center; margin:2px; } .butsar { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #E67451; text-align: center; margin:2px; } .butbv { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #2C041C; text-align: center; margin:2px; } .butgpt{ border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #00A67E; text-align: center; margin:2px; } ``` -------------------------------- ### Bolsozluk JavaScript Utilities Source: https://www.bolsozluk.com/rota-1.html Contains JavaScript functions for analytics tracking (gtag), user interaction handling (kanaat), and search/navigation (mobgetir, mobara). These functions manage dynamic content and user actions on the website. ```javascript function kanaat(id,kanaat){ ajaxReq('/icerik/kanaat.php?id='+id+'&knt='+kanaat,'oySonuc'+id); } function mobgetir(){ var kelime = document.getElementById('q').value.toLowerCase(); self.location.href='sozluk.php?process=word&q='+kelime; } function mobara() { var kelime = document.getElementById('q').value; self.location.href='sozluk.php?process=search&q='+kelime; } function mobgetir(){ var kelime = document.getElementById('q').value.toLowerCase(); self.location.href='sozluk.php?process=word&q='+kelime; } function mobara() { var kelime = document.getElementById('q').value; self.location.href='sozluk.php?process=search&q='+kelime; } ``` -------------------------------- ### Search with Specific Prefix Source: https://www.bolsozluk.com/pislick-1.html Retrieves a value from an input field with ID 'x', converts it to lowercase, and navigates to 'sozluk.php' to search for a word prefixed with 'pislick' and the user's input. ```javascript function basara() { var kelime = document.getElementById('x').value.toLowerCase(); var basbas = "pislick"; self.location.href = 'sozluk.php?process=word&q=' + basbas + '&mod=arabul&aranacak=' + kelime; } ``` -------------------------------- ### Custom Button Styles (General) Source: https://www.bolsozluk.com/heja-1.html Defines a base style for custom buttons (`.butx`), including borders, font properties, cursor, and background color. This serves as a foundation for more specific button styles. ```css .butx { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #242b3a; text-align: center; } ``` -------------------------------- ### Redirect to Search Results Source: https://www.bolsozluk.com/motive-1.html This function retrieves the value from an input field with the ID 'q' and redirects the browser to 'sozluk.php'. The redirection is set up to perform a search operation using the entered query, displaying relevant results from the dictionary. ```javascript function mobara() { var kelime = document.getElementById('q').value; self.location.href = 'sozluk.php?process=search&q=' + kelime; } ``` -------------------------------- ### Mobile Search and Word Retrieval Functions Source: https://www.bolsozluk.com/heja-1.html JavaScript functions `mobgetir` and `mobara` designed for mobile interfaces. `mobgetir` retrieves a word from an input field and navigates to a specific word page. `mobara` performs a search based on input field content and navigates to a search results page. ```javascript function mobgetir() { var kelime = document.getElementById('q').value.toLowerCase(); self.location.href = 'sozluk.php?process=word&q=' + kelime; } function mobara() { var kelime = document.getElementById('q').value; self.location.href = 'sozluk.php?process=search&q=' + kelime; } ``` -------------------------------- ### Dropdown Menu Styling and Behavior Source: https://www.bolsozluk.com/selo-3.html Defines CSS rules for a dropdown menu component. It handles the positioning, display, and hover effects for the dropdown container and its content, ensuring a responsive user experience. ```css .dropdown { position: relative; display: inline-block; } .dropdown-content { display: none; position: absolute; background-color: #f9f9f9; min-width: 100%; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); z-index: 1; padding: 0; margin: 0; text-align: left; } .dropdown:hover .dropdown-content { display: block; } .dropdown-content a { display: block; padding: 8px; margin: 0; text-align: left; } .dropdown-content a:hover { background-color: #ddd; } .dropdown-content::after { content: ""; display: table; clear: both; } ``` -------------------------------- ### Input Element Styling Source: https://www.bolsozluk.com/selo-3.html Applies default styling to input elements, overriding browser defaults for a consistent appearance. This includes setting padding and display properties. ```css input { -webkit-appearance: none; -moz-appearance: none; appearance: none; padding: 4px; display: inline-block; } ``` -------------------------------- ### Double-Click Text Selection for .eidButton Elements Source: https://www.bolsozluk.com/selo-3.html This script attaches a double-click event listener to all elements with the class 'eidButton'. When an element is double-clicked, it selects the text content within that element and makes it available for copying. ```javascript document.addEventListener('DOMContentLoaded', function() { // Select all elements with the class 'eidButton' var buttons = document.querySelectorAll('.eidButton'); // Iterate through the buttons and attach the double-click event listener if (buttons.length > 0) { buttons.forEach(function(button) { button.ondblclick = function() { // Select the text content within the clicked button var range = document.createRange(); range.selectNode(this); window.getSelection().removeAllRanges(); window.getSelection().addRange(range); }; }); } }); ``` -------------------------------- ### Redirect to Search Results Source: https://www.bolsozluk.com/heja-1.html Retrieves a search query from an input field with ID 'q' and redirects the browser to a 'sozluk.php' page to display search results. This function is intended for general search functionality. ```javascript function mobara() { var kelime = document.getElementById('q').value; self.location.href='sozluk.php?process=search&q='+kelime; } ``` -------------------------------- ### Search for Word Source: https://www.bolsozluk.com/gazapizm-1.html This JavaScript function captures a search term from an input field with the ID 'q' and redirects the browser to a 'sozluk.php' page to perform a search for that term. It's designed for mobile search functionality. ```javascript function mobara() { var kelime = document.getElementById('q').value; self.location.href = 'sozluk.php?process=search&q=' + kelime; } ``` -------------------------------- ### Submit Form with Ctrl+Enter Source: https://www.bolsozluk.com/selo-3.html Attaches a keydown event listener to a textarea. It detects Ctrl+Enter (or Cmd+Enter on Mac) key combinations, prevents the default browser action, and submits the associated form. ```javascript document.addEventListener('DOMContentLoaded', function() { var textarea = document.getElementById('entry'); var form = textarea.closest('form'); textarea.addEventListener('keydown', function(e) { // Check for Ctrl+Enter or Cmd+Enter (for Mac) if ((e.ctrlKey || e.metaKey) && e.keyCode === 13) { e.preventDefault(); // Prevent default behavior form.submit(); // Submit the form } }); }); ``` -------------------------------- ### Search with Specific Base Word Source: https://www.bolsozluk.com/heja-1.html Takes a value from an input field with ID 'x', converts it to lowercase, and then redirects to 'sozluk.php' using a predefined base word 'heja' and the input value as a search parameter. This is for a specialized search within the 'heja' context. ```javascript function basara() { var kelime = document.getElementById('x').value.toLowerCase(); var basbas = "heja"; self.location.href='sozluk.php?process=word&q='+basbas+'&mod=arabul&aranacak='+kelime; } ``` -------------------------------- ### Submit Form with Ctrl+Enter or Cmd+Enter Source: https://www.bolsozluk.com/selo-3.html Adds a keydown event listener to a textarea element with the ID 'entry'. It listens for the Ctrl+Enter (or Cmd+Enter on Mac) key combination. If detected, it prevents the default browser behavior and submits the closest form associated with the textarea. ```javascript document.addEventListener('DOMContentLoaded', function() { var textarea = document.getElementById('entry'); var form = textarea.closest('form'); textarea.addEventListener('keydown', function(e) { // Check for Ctrl+Enter or Cmd+Enter key combination if ((e.ctrlKey || e.metaKey) && e.keyCode === 13) { e.preventDefault(); // Prevent default browser action (e.g., new line) form.submit(); // Submit the form } }); }); ``` -------------------------------- ### Custom Button Styles Source: https://www.bolsozluk.com/motive-1.html Provides a set of CSS classes for styling various buttons with different background colors and properties, intended for interactive elements. ```css .yesil { background-color: #006400; border: yes; color: white; padding: 5px 2px; text-align: center; text-decoration: none; display: inline-block; font-size: 11px; vertical-align: top; cursor: pointer; } .kirmizi { background-color: #8B0000; border: yes; color: white; padding: 5px 2px; text-align: center; text-decoration: none; display: inline-block; font-size: 11px; vertical-align: top; cursor: pointer; } .butx { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #242b3a; text-align: center; } .butsuk { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #242b3a; text-align: center; margin:2px; } .butkir { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #900D09; text-align: center; margin:2px; } .butyes { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #0B6623; text-align: center; margin:2px; } .buttur { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #ED7014; text-align: center; margin:2px; } .butsar { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #E67451; text-align: center; margin:2px; } .butbv { border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #2C041C; text-align: center; margin:2px; } .butgpt{ border-right: #a6b4d4 2px outset; border-TOP: #a6b4d4 2px outset; font: 10pt Arial,sans-serif; border-left: #a6b4d4 2px outset; CURSOR: default; color: white; border-BOTTOM: #a6b4d4 2px outset; WHITE-SPACE: nowrap; background-color: #00A67E; text-align: center; margin:2px; } .divider{ width:2px; height:auto; display:inline-block; } ``` -------------------------------- ### Submit Form with Ctrl+Enter Shortcut Source: https://www.bolsozluk.com/rota-1.html Adds a keydown event listener to a textarea with the ID 'entry'. It detects the Ctrl+Enter (or Cmd+Enter on Mac) key combination. Upon detection, it prevents the default behavior and submits the closest form associated with the textarea. ```javascript document.addEventListener('DOMContentLoaded', function() { var textarea = document.getElementById('entry'); var form = textarea.closest('form'); textarea.addEventListener('keydown', function(e) { // Check for Ctrl+Enter or Cmd+Enter (for Mac) key combination if ((e.ctrlKey || e.metaKey) && e.keyCode === 13) { e.preventDefault(); // Prevent default behavior form.submit(); // Submit the form } }); }); ``` -------------------------------- ### Form Submission with Ctrl+Enter Shortcut Source: https://www.bolsozluk.com/selo-3.html A JavaScript event listener attached to a textarea element. It intercepts keyboard events to trigger form submission when the user presses Ctrl+Enter (or Cmd+Enter on Mac), providing a keyboard shortcut for submitting entries. ```javascript document.addEventListener('DOMContentLoaded', function() { var textarea = document.getElementById('entry'); var form = textarea.closest('form'); textarea.addEventListener('keydown', function(e) { if ((e.ctrlKey || e.metaKey) && e.keyCode === 13) { e.preventDefault(); form.submit(); } }); }); ``` -------------------------------- ### Form Submission with Ctrl+Enter Source: https://www.bolsozluk.com/rota-1.html Adds a keydown event listener to a textarea with ID 'entry'. If Ctrl+Enter (or Cmd+Enter on Mac) is pressed, it prevents the default action and submits the associated form. ```javascript document.addEventListener('DOMContentLoaded', function() { var textarea = document.getElementById('entry'); var form = textarea.closest('form'); textarea.addEventListener('keydown', function(e) { if ((e.ctrlKey || e.metaKey) && e.keyCode === 13) { e.preventDefault(); form.submit(); } }); }); ``` -------------------------------- ### User Feedback/Rating Function Source: https://www.bolsozluk.com/motive-1.html Handles user feedback (kanaat) by sending an AJAX request to a server-side script with the item ID and feedback type. ```javascript function kanaat(id,kanaat){ ajaxReq('/icerik/kanaat.php?id='+id+'&knt='+kanaat,'oySonuc'+id); } ``` -------------------------------- ### Google Analytics Tracking Source: https://www.bolsozluk.com/heja-1.html Implements Google Analytics tracking for the website. It initializes the dataLayer and configures the gtag.js snippet with a specific measurement ID. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){ dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'G-3Q34PEYTM8'); ``` -------------------------------- ### List Item Styling Source: https://www.bolsozluk.com/selo-3.html Sets the font size and line height for list items (li elements), ensuring consistent typography for lists within the application. ```css li { font-size: 14px; line-height: 13pt; } ```