Simplified the logic for loading language files by consolidating into a single loop. Now, the base English file and potential browser language files are loaded in sequence, ensuring a more efficient and clearer process. Removed redundant checks and code for language alias handling.
Simplify and enhance language detection and file loading mechanism:
- Parse primary language from browser settings more accurately.
- Remove redundant scanning of language files.
- Load default English language file as a base.
- Add support for region-specific language files if available.
- Remove unused language strings from various translation files.
These changes enhance the robustness and efficiency of language handling, ensuring better support for user language preferences.
Updated browser language detection to handle full locale strings and
mapped various Chinese variants to simplified or traditional Chinese.
Renamed language files for consistency with the new alias system.
This improves support for a wider array of language settings, ensuring
users receive content in their preferred language variant when possible.
Updated the default GitHub URL in the configuration to point to the new repository at git.private.coffee. Ensures users are directed to the correct project location for up-to-date resources and issue tracking.
Added logic to check for the existence of 'coingecko.json' and generate it by executing 'coingecko.php' if it doesn't exist. This ensures that the necessary data file is available on first run, preventing potential errors or missing data.
Refactored inline exchangeRates script to main.js for better practice and maintainability. Enhanced the noscript warning message's readability by replacing paragraph tags with line breaks, ensuring clearer instructions for users without JavaScript.
Added a noscript alert message for users with JavaScript disabled, informing them about the limitations and manual controls available. Improved UI spacing with an additional margin in the conversion button section. Adjusted CSS padding for better visual alignment. Expanded Webpack safelist to include alert classes for proper styling.
Introduced bidirectional conversion functionality for XMR to fiat calculations. Added form elements and event listeners to handle user inputs and conversion direction. Enhanced URL and metadata processing to be dynamic based on protocol. Updated UI with conversion buttons for a better user experience. Safelisted new CSS classes in webpack configuration.
Relocated the configuration setup to the top of index.php to improve code clarity and maintainability. This ensures configuration settings are initialized before any other operations, reducing potential for unexpected behaviors and making the code easier to follow.
No functional changes introduced.
Enhanced configuration by introducing a dynamic GitHub URL. This change ensures the GitHub link in all language files is consistently updated based on the configuration, increasing maintainability and consistency across translations.
Enhanced the configuration and display logic to allow specifying preferred currencies, which are now ordered at the top of the list. This improves user experience by prioritizing commonly used currencies.
This also eliminates duplicate entries for the currently selected currency in the drop-down.
Introduced a new 'footer_links' configuration option allowing users to specify custom links to display in the footer. Each link includes 'text' and 'url'. This enhances the flexibility of the footer content, making it adaptable to various use cases.
Updated the index.php to dynamically generate these footer links if they are set in the configuration, ensuring they are rendered appropriately along with existing links.
Refactored event listeners for XMR and fiat input fields, consolidating common logic and improving maintainability. Introduced explicit copy button IDs and enhanced their functionality by moving inline click handlers to addEventListener. These changes streamline form control interactions and ensure consistent behavior across different user inputs.
Additionally, removed redundant onchange handlers from the PHP file to simplify code and mitigate potential conflicts.
Introduced a new configuration file allowing optional attribution
content and conditional display of the "Servers Guru" attribution
link. This enhances customizability and control over displayed
attributions.
The changes include:
- Adding a config.dist.php for default configurations.
- Modifying index.php to load and utilize the new configuration
options.
- Updating multiple language files to support the new attribution
and link display.
These modifications will enable users to have a more tailored
display of attributions on the website.
- Switched to using cURL for fetching data from CoinGecko API, with added error handling for failed requests. This reduces the chances of runtime errors and ensures fallback to previous data.
- Implemented periodic updates to exchange rates every 5 seconds in `main.js` to keep the rates current.
- Added OpenGraph meta tags on `index.php` for better social media integration.
- Minor CSS adjustments for better table rendering.
- Moved `import` statements for Bootstrap CSS and JS to the top in `main.js`.
Updated the tooltip descriptions for currency links to display full currency names where available, improving user clarity and interface usability. If a full name is not available, the currency code is still shown. This enhances the experience by making the tooltips more informative.
Enhanced the currency drop-down to display localized names if available. This improves user experience by showing familiar names in their local language. Ensures the default language is used if localization isn't specified.
Eliminated the redundant stylesheet inclusion to reduce unnecessary HTTP requests and improve page load performance. No impact on visual styling as the content of custom.css was deprecated and merged into main.css.
Replaced button element with a hyperlink to improve accessibility, ensuring better navigation for screen readers and users. Also, formatted the inline script for clarity and consistency. These changes contribute to a more user-friendly interface and maintain clean, readable code.
- Moved currency data initialization to load dynamically from JSON.
- Removed static array of currencies, utilizing the JSON keys instead.
- Simplified exchange rate extraction to dynamically fetch values.
- Improved user language detection and selection process.
- Refactored HTML and PHP to dynamically generate language and currency options.
- Replaced various currency conversion logic with a dynamic implementation.
- Enhanced UI elements for better readability and maintainability.
- Consolidated inline JavaScript functions into external script for organization.
These changes reduce hardcoding, improve maintainability, and ensure that currency data is up-to-date and reflects user preferences more effectively.
Enhances code clarity by translating German comments to English and adding comments and TODOs for dynamic data loading
and generation of currencies, API data, language files, and HTML elements.
This will reduce hardcoded values and improve maintainability. Also, adds a
reminder to move scripts to separate files and add OpenGraph tags in the HTML.
No breaking changes, but dynamically loading these values will be essential
for improving the codebase in future iterations.