Skip to content

Instantly share code, notes, and snippets.

View ulrischa's full-sized avatar

Uli Schäffler ulrischa

View GitHub Profile
@ulrischa
ulrischa / ButtonInstall.js
Created November 29, 2025 19:17 — forked from adactio/ButtonInstall.js
Web Install HTML web component
class ButtonInstall extends HTMLElement {
connectedCallback () {
this.button = this.querySelector('button');
if (window.matchMedia('(display-mode: standalone)').matches) {
this.button.remove();
return;
}
if (!navigator.install) {
this.button.remove();
return;
accordion-group {
background-color: #f7f7f7;
border-radius: 0.25em;
display: block;
margin-block-end: 1.5em;
padding: 0.5em 1em;
width: 100%;
}
accordion-group [accordion-trigger] {
/**
* Don't show button until JavaScript is instantiated
*/
share-me:not(:defined) {
display: none;
}
/**
* Visually hide an element, but leave it available for screen readers
* @link https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/main.css
@ulrischa
ulrischa / htaccess
Created May 13, 2025 15:24 — forked from cferdinandi/htaccess
Gzip setup for .htaccess, taken from the old HTML5 Boilerplate template
# ----------------------------------------------------------------------
# | Compression |
# ----------------------------------------------------------------------
<IfModule mod_deflate.c>
# Force compression for mangled `Accept-Encoding` request headers
# https://developer.yahoo.com/blogs/ydn/pushing-beyond-gzipping-25601.html
<IfModule mod_setenvif.c>
@ulrischa
ulrischa / sharer-urls.md
Created April 9, 2024 17:57 — forked from tZilTM/sharer-urls.md
Sharer (share) URLs (links) for sharing on LinkedIn, Twitter, Pinterest, Reddit and Facebook (2020-02-02)
@ulrischa
ulrischa / 0_reuse_code.js
Created November 30, 2013 20:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console