Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implementation of a real-time price widget for the Plata Token (PLT/USD). The component displays the current rate and total market capitalization (Market Cap) fetched via AJAX requests from a JSON file that is dynamically updated by a PHP script on the server.
The interface features a responsive, modern dark-mode design that aligns with the project's aesthetics. It includes support for copying the Polygon contract address to the clipboard and direct integration with the MetaMask wallet to import the PLT token.
Changes
Frontend Component (HTML/CSS/JS):
[index.html](ajax.json/index.html)containing the structured layout of the Info Box, Polygon network badges, and loading of internal CDNs.[ajax.json.script.js](ajax.json/ajax.json.script.js)containing the AJAX request functions with tab visibility tracking (Page Visibility API) to suspend updates in the background, clipboard functionality for copying the contract, and MetaMask integration (wallet_watchAsset).[ajax.json.style.css](ajax.json/ajax.json.style.css)implementing the design system based on the Montserrat font, rotation animations for data loading, and hover/active interactive states.[MetaMask-icon.svg](ajax.json/.img/MetaMask-icon.svg)and[platasmall.svg](ajax.json/.img/platasmall.svg).Price Simulation (Backend PHP/JSON):
[rep.php](ajax.json/rep.php)to simulate price changes and write data in real-time to the JSON file.[PLTUSD.json](ajax.json/PLTUSD.json)which stores the structured quotation consumed by the widget.