Skip to content

Instantly share code, notes, and snippets.

(() => {
let root = document.documentElement
let timeout
let removeBanner = () => {
if (root.children[2]?.tagName === 'DIV') {
if (console && console.clear) console.clear()
return root.children[2].remove()
}
(() => {
let root = document.documentElement
let timeout
let remove = () => {
if (root.children[2]?.tagName === 'DIV') {
if (console && console.clear) console.clear()
return root.children[2].remove()
}
<!doctype html>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, width=device-width">
<style visible>
:root { --color-rgb: 8, 10, 60 }
</style>
<style>
<title>iOS Safari bug: incorrect rendering of box-shadow on 19.2px square element with 50% border-radius</title>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, width=device-width">
<style>
html {
font-size: 16px;
}
@adamschwartz
adamschwartz / plink-plonk.js
Created February 19, 2020 22:47 — forked from tomhicks/plink-plonk.js
Listen to your web pages
@adamschwartz
adamschwartz / pre-2020-google-search-results.css
Last active February 6, 2023 21:57
Stylesheet for pre-2020 Google Search results page styles
/* Version 3. Updated Sep 5, 2022 */
#search a:has(>br):has(>h3):has(>div) br {
display: none;
}
#search a:has(>br):has(>h3):has(>div) h3 {
display: block;
}
<!DOCTYPE html>
<html>
<head>
<title>&shy;</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<style>
* {
box-sizing: border-box;
}
<form>
<div prefix-editor suffix=".adamschwartz.com" spellcheck="false" autocomplete="false">
<input type="text">
</div>
</form>
<script>
(() => {
const editorEl = document.querySelector('[prefix-editor]')
const inputEl = editorEl.querySelector('input')
@adamschwartz
adamschwartz / rainbow-donut-spinner.html
Created August 12, 2017 21:39
Single-element rainbow donut spinner
<style>
:root {
--background: #000;
--rainbow-1: #e91e63;
--rainbow-2: #9c27b0;
--rainbow-3: #3f51b5;
--rainbow-4: #2196f3;
--rainbow-5: #00bcd4;
--rainbow-6: #4caf50;
--rainbow-7: #cddc39;
▲ ● ■