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 / dropdown-to-tsv.js
Last active March 4, 2021 19:04
dropdown-to-tsv
copy([...$0.options].map(e => e.label).join('\t'))
@workeffortwaste
workeffortwaste / woocommerce-to-css-grid.css
Last active January 22, 2024 15:52
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 / 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.
*/