Skip to content

Instantly share code, notes, and snippets.

View pH-7's full-sized avatar
:octocat:
πŸ’‘Creative Engineer πŸš€ Enjoying Learning New Exciting Things! πŸ˜‹ =>My Way of Life 🏝

β™š PH⑦ β€” Pierre-Henryβ„’β™› pH-7

:octocat:
πŸ’‘Creative Engineer πŸš€ Enjoying Learning New Exciting Things! πŸ˜‹ =>My Way of Life 🏝
View GitHub Profile
@pH-7
pH-7 / textexpander-live-exchange-rate-currency-aud-eur.js
Last active October 20, 2025 22:07
TextExpander compatible snippet that instantly gives the current live exchange rate displayed on your screen. AUD to EUR currency conversion. You can easily change to any other currency by changing "AUD" and "EUR" or using TextExpander fill-in fields. https://PierreHenry.dev
try {
var xhr = new XMLHttpRequest();
xhr.open('GET', 'https://api.exchangerate-api.com/v4/latest/AUD', false);
xhr.send();
var data = JSON.parse(xhr.responseText);
var eurRate = data.rates.EUR;
var amount = 1;
var converted = (amount * eurRate).toFixed(2);
amount + " AUD = " + converted + " EUR (Rate " + eurRate.toFixed(4) + ")";
} catch (error) {