Skip to content

Instantly share code, notes, and snippets.

View SeanMcP's full-sized avatar

Sean McPherson SeanMcP

View GitHub Profile
@SeanMcP
SeanMcP / print-headings.console.js
Last active June 26, 2024 12:47
Find and print all headings on the given web page
document.querySelectorAll("h1,h2,h3,h4,h5,h6,[role=heading][aria-level]").forEach(node => {
let level = node.getAttribute("aria-level") || node.tagName[1];
let prefix = " ".repeat(parseInt(level) - 1);
console.log(`${prefix}${level}: ${node.textContent}`);
});
@SeanMcP
SeanMcP / zoho-mail-tweaks.user.js
Created January 25, 2023 16:42
Make Zoho Mail's UI a little nicer
// ==UserScript==
// @name Zoho Mail UI tweaks
// @namespace https://seanmcp.com
// @version 0.1
// @description Make Zoho Mail's UI a little nicer
// @author You
// @match https://mail.zoho.com/zm/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=zoho.com
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Google Meet Timer
// @namespace https://seanmcp.com
// @version 0.1.1
// @description Adds a simple, chat-powered timer to your Google Meets
// @author Sean McPherson
// @match https://meet.google.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com
// @grant none
// ==/UserScript==
@SeanMcP
SeanMcP / reddit-tweaks.user.js
Last active May 10, 2022 17:31
Changes to improve my experience on Reddit
// ==UserScript==
// @name Reddit Tweaks
// @namespace https://seanmcp.com
// @version 0.1.1
// @description Changes to improve my experience on Reddit
// @author SeanMcP
// @match https://www.reddit.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com
// @grant none
// ==/UserScript==
@SeanMcP
SeanMcP / linkedin-tweaks.user.js
Last active May 10, 2022 17:31
Changes to improve my experience on LinkedIn
// ==UserScript==
// @name LinkedIn Tweaks
// @namespace https://seanmcp.com
// @version 0.1.2
// @description Changes to improve my experience on LinkedIn
// @author SeanMcP
// @match https://www.linkedin.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=linkedin.com
// @grant none
// ==/UserScript==
@SeanMcP
SeanMcP / google-meet-ui.user.js
Last active March 10, 2021 18:21
Small improvements to the Google Meet UI
// ==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==
@SeanMcP
SeanMcP / increase-audio-playback.user.js
Created February 18, 2021 18:25
🎧 Increase the playback speed of audio elements around the web
// ==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==
@SeanMcP
SeanMcP / github-cr-toolbox.user.js
Created February 18, 2021 17:55
🧰 Floating tools to make code reviews on GitHub a little easier
// ==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==
@SeanMcP
SeanMcP / github-cr-toolbox.console.js
Last active February 18, 2021 17:47
🧰 Floating tools to make code reviews on GitHub a little easier
(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);
@SeanMcP
SeanMcP / anchored-headings.user.js
Created February 10, 2021 15:35
Add anchors to all headings with an id
// ==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==