Skip to content

Instantly share code, notes, and snippets.

@lbmaian
lbmaian / youtube-force-compact-grid.user.js
Last active August 8, 2024 19:43
YouTube - Force Compact Grid (increases max # videos per row)
// ==UserScript==
// @name YouTube - Force Compact Grid (increases max # videos per row)
// @namespace https://gist.github.com/lbmaian/8c6961584c0aebf41ee7496609f60bc3
// @downloadURL https://gist.github.com/lbmaian/8c6961584c0aebf41ee7496609f60bc3/raw/youtube-force-compact-grid.user.js
// @updateURL https://gist.github.com/lbmaian/8c6961584c0aebf41ee7496609f60bc3/raw/youtube-force-compact-grid.user.js
// @version 0.5
// @description Force YouTube to show compact grid (max 6 videos per row) rather than "slim" grid (max 3 videos per row)
// @author lbmaian
// @match https://www.youtube.com/*
// @exclude https://www.youtube.com/embed/*
@jwilson8767
jwilson8767 / es6-element-ready.js
Last active October 10, 2024 00:35
Wait for an element to exist. ES6, Promise, MutationObserver
// MIT Licensed
// Author: jwilson8767
/**
* Waits for an element satisfying selector to exist, then resolves promise with the element.
* Useful for resolving race conditions.
*
* @param selector
* @returns {Promise}
*/