The Currency Converter Extension is a browser extension designed to help users convert currencies globally with real-time exchange rates. It fetches the latest rates every hour, provides instant updates, and includes features for currency reversal and display of the last updated time.
To install the Currency Converter Extension, follow these steps:
Clone the Repository:
git clone https://github.com/Charan-Repala/currency-converter.git
cd currency-converter-extension
Load the Extension in Your Browser:
currency-converter-extension
).Configure the API Key:
-Open background.js
and popup.js
.
apiKey
value with your own Currency API key.To obtain the API key needed for fetching exchange rates:
background.js
and popup.js
.const apiKey
.Replace the placeholder apiKey
value with your own API key from Currency API.
const apiKey = 'your_api_key_here';
CurrencyConverterExtension/
├── icons/
│ ├── icon16.png
│ ├── icon48.png
│ └── icon128.png
├── popup.html
├── popup.css
├── popup.js
├── background.js
├── manifest.json
└── README.md
popup.html
: The HTML for the extension’s popup interface.popup.css
: CSS for styling the popup with animations and responsive design.popup.js
: JavaScript for handling user interactions, currency conversion, and updating the UI.background.js
: Handles background tasks such as fetching exchange rates, setting alarms, and managing notifications.manifest.json
: Configuration file for the Chrome extension.CSS: Styles are written in popup.css
to create a visually appealing interface with animations and dynamic effects. The styles include:
body {
font-family: Arial, sans-serif;
padding: 10px;
margin: 0;
width: 300px;
background-color: #f0f0f0;
}
.container {
text-align: center;
background-color: #fff;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
font-size: 24px;
margin-bottom: 20px;
}
.input-group {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
}
select,
input {
width: calc(100% - 12px);
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
padding: 10px 20px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s ease, transform 0.3s ease;
}
button:hover {
background-color: #0056b3;
transform: scale(1.05);
}
.reverse-container {
margin: 10px 0;
display: flex;
justify-content: center;
align-items: center;
}
.reverse-btn {
width: 30px;
height: 30px;
border: 2px solid #007bff;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
background-color: #fff;
color: #007bff;
font-size: 18px;
cursor: pointer;
transition: transform 0.3s ease, background-color 0.3s ease;
}
.reverse-btn:hover {
background-color: #007bff;
color: #fff;
transform: rotate(360deg);
}
#result {
margin-top: 20px;
font-size: 18px;
}
We will receive the notifications about price changes.
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
Thank you for using the Currency Converter Extension!