Skip to content

Instantly share code, notes, and snippets.

View roseg43's full-sized avatar

Gabriel Rose roseg43

View GitHub Profile
@roseg43
roseg43 / MarqueeSelector.js
Created January 20, 2023 16:45
Simple tool for selecting content on a page using a visible marquee
(() => {
/**
* Renders a button that when clicked copies the NodeList passed to the constructor to the clipboard
*
* @param [NodeList] content - a NodeList of selected elements
*/
const CopyToClipBoardBtn = (content) => {
const btn = document.createElement('button');
btn.innerText = 'Copy to clipboard';
@roseg43
roseg43 / WordPress Developer Docs - Sticky ToC.user.js
Last active October 2, 2023 14:45
TamperMonkey User Script - WordPress Developer Docs > In-Page Navigation Anchors
// ==UserScript==
// @name WordPress Developer Docs - In-Page Navigation Anchors
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Adds a sticky table of contents to the sidebar that contains anchor links to in-page sections when on developer.wordpress.org
// @author Gabriel Rose (@roseg43)
// @match https://developer.wordpress.org/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=wordpress.org
// @grant none
// ==/UserScript==
@roseg43
roseg43 / grid.css
Created October 5, 2023 18:26
CSS - Basic customizable content grid
.row {
--column-count: 12;
--grid-gap-width: 16px;
--column-base-min-width: calc((var(--width-grid) - (var(--column-count) - 1) * var(--grid-gap-width)) / var(--column-count));
display: flex;
flex-flow: column;
gap: var(--grid-gap-width);
@media (--bp-medium) {
display: grid;
jQuery(function($) {
var page = 1,
loading = true,
$window = $(window),
$content = $('body.page-template-page-browse-php #content');
var load_posts = function() {
console.log('load_posts():: INIT');
$.ajax({
type : "GET",