Skip to content

Instantly share code, notes, and snippets.

@lbmaian
lbmaian / youtube-force-compact-grid.user.js
Last active May 23, 2024 02:21
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.4
// @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 April 22, 2024 20:28
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}
*/