Skip to content

Instantly share code, notes, and snippets.

View workeffortwaste's full-sized avatar
Staring into the abyss.

Chris Johnson workeffortwaste

Staring into the abyss.
View GitHub Profile
@workeffortwaste
workeffortwaste / export-video.js
Created November 22, 2024 16:07
gsap-video-export scroll example
import { videoExport } from 'gsap-video-export'
let videoDetails
try {
videoDetails = await videoExport({
url: 'https://nodcoding.com/',
output: 'scroll-page.mp4',
/* This is the additional script that gets run on the page itself */
script: async () => {
/* Load GSAP into the page using esm.sh <3, if it's not already accessible on the window */
@workeffortwaste
workeffortwaste / findall_elements_deep.js
Created August 9, 2021 20:05 — forked from ebidel/findall_elements_deep.js
Finds all elements on the page, including those within shadow dom.
/**
* @author ebidel@ (Eric Bidelman)
* License Apache-2.0
*/
/**
* Finds all elements on the page, inclusive of those within shadow roots.
* @param {string=} selector Simple selector to filter the elements by. e.g. 'a', 'div.main'
* @return {!Array<string>} List of anchor hrefs.
*/
@workeffortwaste
workeffortwaste / woocommerce-to-css-grid.css
Last active December 27, 2024 21:41
woocommerce-to-css-grid
/* Convert the standard WooCommerce products list into a modern responsive grid. */
ul.products {
--grid-gap: 32px;
--auto-grid-min-size: 200px;
grid-template-columns: repeat(auto-fill, minmax(var(--auto-grid-min-size), 1fr));
grid-gap: var(--grid-gap);
display: grid;
}
ul.products:before{
content:unset!important;
@workeffortwaste
workeffortwaste / dropdown-to-tsv.js
Last active March 4, 2021 19:04
dropdown-to-tsv
copy([...$0.options].map(e => e.label).join('\t'))