Skip to content

Instantly share code, notes, and snippets.

View AprilSylph's full-sized avatar

April Sylph AprilSylph

View GitHub Profile
@AprilSylph
AprilSylph / README.md
Created February 28, 2026 21:41
YouTube Playlist Running Time Tally
HOW TO USE
  1. Copy the contents of youtube-playlist-tally.js
  2. Open a YouTube playlist in your browser
    • Important: Do not scroll down; this will load recommendations, which will mess up the tally!
  3. Open your browser's devtools → Console
  4. Paste the contents of your clipboard and press Enter
  5. Done! Your console should return the total runtime of the playlist as a string.
LIMITATIONS
@AprilSylph
AprilSylph / extensions.json
Created January 6, 2026 13:08
VS Code Config Files
{
"recommendations": [
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"github.github-vscode-theme",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"mhutchie.git-graph"
]
}
module.exports = {
// colors
colorNavy: 'rgba(0, 25, 53, 1)',
colorBlue: 'rgba(0, 184, 255, 1)',
colorPurple: 'rgba(124, 92, 255, 1)',
colorPink: 'rgba(255, 97, 206, 1)',
colorRed: 'rgba(255, 73, 48, 1)',
colorOrange: 'rgba(255, 138, 0, 1)',
colorYellow: 'rgba(232, 215, 58, 1)',
colorGreen: 'rgba(1, 207, 53, 1)',
@AprilSylph
AprilSylph / PKMN Gen 5 Transfer Only List.md
Last active July 20, 2024 21:45
Pokémon Generation V List of Transfer-Only Pokémon

Gen 5 Transfer-Only Pokémon

Note

Grouped by family; the final number is the minimum number of transfers needed from a Generation IV game in order to complete the National Pokédex 100% legitimately in Generation V.

Note

Mythical Pokémon are not listed here, regardless of availability.

Note

The Pokémon Dream Radar is counted as a Generation V game; Radar-exclusive Pokémon are not counted below.

@AprilSylph
AprilSylph / exposeClassKeys.js
Last active January 31, 2024 02:34
expose source names on Tumblr
tumblr.getCssMap().then(cssMap => {
const keys = Object.keys(cssMap);
const elements = document.querySelectorAll('[class]');
for (const { classList } of elements) {
for (const className of classList) {
const mappedClassName = keys.find(key => cssMap[key].includes(className));
if (mappedClassName) classList.add(`style-${mappedClassName}--${className}`);
}
}
});
@AprilSylph
AprilSylph / mediaTest.html
Created September 20, 2022 22:16
A webpage to demonstrate that `@media` `min-width` and `max-width` are both inclusive
<!DOCTYPE html>
<html>
<head>
<style>
:root {
writing-mode: horizontal-tb;
}
body {
display: flex;
@AprilSylph
AprilSylph / getCoAuthorTrailer.js
Created March 7, 2022 15:45
Build a co-author commit trailer from just a GitHub username
/**
* @param {string} username - GitHub username
* @returns {string} Co-author commit trailer, using the user's noreply.github.com address
*/
const getCoAuthorTrailer = async username => {
const response = await fetch(`https://api.github.com/users/${username}`);
const { id, login, name } = await response.json();
return `Co-authored-by: ${name || login} <${id}+${login}@users.noreply.github.com>`;
};
@AprilSylph
AprilSylph / buildTumblrAdFilters.js
Last active November 9, 2021 22:09
Build EasyList Specific Hide filters from Tumblr's CSS map
window.tumblr.getCssMap().then(cssMap => ['adTimelineObject', 'instreamAd', 'mrecContainer', 'nativeIponWebAd', 'takeoverBanner']
.flatMap(sourceName => cssMap[sourceName])
.map(className => `tumblr.com##.${className}`)
.join('\n')
).then(console.log);
@AprilSylph
AprilSylph / fullWidthBlogFrame.js
Last active July 25, 2021 22:04
Force Tumblr on-blog controls to be mobile-style
const iframe = document.querySelector('iframe[src^="https://www.tumblr.com/dashboard/iframe"]');
const modifiedSrc = new URL(iframe.src);
const { hash } = modifiedSrc;
const decodedHash = decodeURIComponent(hash);
const parsedHash = JSON.parse(decodedHash.substring(1));
Object.assign(parsedHash, { isOpticaLike: true, useThemeColors: true });
const newHash = JSON.stringify(parsedHash);
const encodedHash = encodeURIComponent(newHash);
@AprilSylph
AprilSylph / fix_npf_photosets.css
Last active May 30, 2021 16:33
Fix NPF photosets on Tumblr themes
.post-content div.npf_row,
.post div.npf_row,
body div.npf_row {
align-items: stretch;
}
.post-content div.npf_row .npf_col,
.post div.npf_row .npf_col,
body div.npf_row .npf_col {
display: flex;