Skip to content

Instantly share code, notes, and snippets.

View fortunefox's full-sized avatar

fortunefox fortunefox

  • 16:14 (UTC +01:00)
View GitHub Profile
fortunefox / resize_and_crop.js
Created January 16, 2023 00:48
Code to automatically resize and crop a picture in your browser using canvas and javascript.
const input = document.querySelector('input[type="file"]');
input.addEventListener('change', handleImage);
function handleImage(event) {
const file =[0];
const img = new Image();
# — Spotify Ad Block
# —
"101":"Switching Protocols",
"203":"Non-Authoritative Information",