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
// ==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== |
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 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== | |
(() => { |
;(function() { | |
let textarea = document.querySelector('textarea[aria-label="Send a message to everyone"]') | |
let submit = document.querySelector('[role="button"][aria-label="Send a message to everyone"]') | |
if (!textarea || !submit) | |
return alert('Uh oh! Something went wrong. Do you have the chat panel open?') | |
function sendMessage(text) { | |
textarea.click() | |
textarea.value = text |
Examples for Accessibility for the rest of us.
For the screenshots, I:
150%
table
nodes with Firefox DevToolsObject.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]++; |
The order is appoximate:
{"lastUpload":"2020-02-20T11:14:48.323Z","extensionVersion":"v3.4.3"} |
Users/<username>/Library/Application Support/Firefox/Profiles/xxxxxxxx.default |
// ==UserScript== | |
// @name Filter options in "Awesome Design Systems" | |
// @version 1 | |
// @grant none | |
// @match https://github.com/alexpate/awesome-design-systems | |
// ==/UserScript== | |
(() => { | |
'use strict' | |