Skip to content

Instantly share code, notes, and snippets.

View jthoward64's full-sized avatar

Tag Howard jthoward64

View GitHub Profile
@jthoward64
jthoward64 / example-of-xhr-form.html
Last active April 2, 2023 22:59
A web component replacement for "form" that uses fetch to avoid redirecting the browser upon form submission.
<form action="/url" method="post" id="xhr-form" is="xhr-form">
<h2>XHR POST Example</h2>
<input type="text" name="name" placeholder="Name">
<input type="number" name="age" placeholder="Age">
<input type="submit" value="Submit">
</form>
<script>
const xhrForm = document.getElementById('xhr-form');
@jthoward64
jthoward64 / slack-emoji.js
Created June 23, 2023 16:38
A "simple" mapping from slack emoji names to Unicode codepoints, plus a couple of related functions
/**
The MIT License (MIT)
Copyright (c) 2023 Tag Howard
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is