Skip to content

Instantly share code, notes, and snippets.

View luisaugusto's full-sized avatar

Luis Augusto luisaugusto

View GitHub Profile
@luisaugusto
luisaugusto / europe.geojson
Last active May 29, 2020 18:55
European Countries
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@luisaugusto
luisaugusto / convertImages.js
Last active March 10, 2024 11:13
Convert IMG tags with SVG files into inline SVG tags
const convertImages = (query, callback) => {
const images = document.querySelectorAll(query);
images.forEach(image => {
fetch(image.src)
.then(res => res.text())
.then(data => {
const parser = new DOMParser();
const svg = parser.parseFromString(data, 'image/svg+xml').querySelector('svg');