Examples for Accessibility for the rest of us.
For the screenshots, I:
- Increased the zoom level to
150%
- Took a screenshot of the
table
nodes with Firefox DevTools
Object.entries( | |
[...document.querySelectorAll('.result-text-style-normal p')] // get all paragraphs | |
.map(p => p.textContent) // compress child nodes into text | |
.join() // make one big string | |
.split(' ') // split into individual words | |
.map(s => s.replace(/[^A-Za-z]/g, "").toLowerCase()) // remove non-letters and standardize | |
.filter(s => s) // remove empty spaces | |
.reduce((acc, word) => { | |
if (!acc[word]) acc[word] = 0; | |
acc[word]++; |
Examples for Accessibility for the rest of us.
For the screenshots, I:
150%
table
nodes with Firefox DevTools// ==UserScript== | |
// @name Mark all vendor files as viewed in Niche PRs | |
// @namespace Niche Scripts | |
// @match *://github.com/nicheinc/*/pull/*/files | |
// @grant none | |
// @version 1.0 | |
// @author Learn Over Lunch | |
// @description 10/1/2020, 12:40:56 PM | |
// ==/UserScript== | |
(() => { |
copy([...$$('.repo-list-item')].map(node => { | |
const link = node.querySelector('.f4 a') | |
const description = node.querySelector('p.mb-1') | |
let string = `- [\`${link.textContent.trim()}\`](${link.href})` | |
if (description) string += ` - ${description.textContent.trim()}` | |
return string | |
}).join('\n')) |
// ==UserScript== | |
// @name GitHub Explorer | |
// @namespace https://seanmcp.com | |
// @version 0.1 | |
// @description Add links to explore GitHub repository in GitHub1s or CodeSandbox | |
// @author Sean McPherson | |
// @match *://github.com/*/* | |
// @grant none | |
// ==/UserScript== |
// ==UserScript== | |
// @name Anchored Headings | |
// @namespace https://seanmcp.com | |
// @version 0.1 | |
// @description Add anchors to all headings with an id | |
// @author Sean McPherson | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== |
(function githubCrToolbox() { | |
if (document.body.dataset.gcrt) return; | |
document.body.setAttribute("data-gcrt", true); | |
// Add styles to document.head | |
const styleEl = document.createElement("style"); | |
styleEl.setAttribute("data-gcrt", true); | |
styleEl.innerText = ` | |
details[data-gcrt] { | |
--border: 1px solid var(--color-border-primary); |
// ==UserScript== | |
// @name GitHub CR Toolkit | |
// @namespace https://niche.com | |
// @version 0.2 | |
// @description Floating tools to make code reviews on GitHub a little easier | |
// @author #learn-over-lunch | |
// @match https://github.com/*/*/pull/*/files* | |
// @grant none | |
// ==/UserScript== |
// ==UserScript== | |
// @name Google Meet UI Improvements | |
// @namespace https://seanmcp.com | |
// @version 0.2 | |
// @description Small improvements to the Google Meet UI | |
// @author Sean McPherson | |
// @match https://meet.google.com/* | |
// @grant none | |
// ==/UserScript== |
// ==UserScript== | |
// @name Increase audio playback | |
// @namespace https://seanmcp.com | |
// @version 0.1 | |
// @description Increase the playback speed of audio elements around the web | |
// @author Sean McPherson | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== |