Skip to content

Instantly share code, notes, and snippets.

View ricealexander's full-sized avatar

Alex Rice ricealexander

View GitHub Profile
@ricealexander
ricealexander / type-coverage-symbols.txt
Created August 25, 2025 19:17
Pokemon Types represented in a symbolic format
Hoenn Type Combinations w/weaknesses
Types: 🔘🔥🌊⚡🌳❄️👊🏽💜🧱🕊️🔮🐛⛰️👻🐉🖤🔩🧚🏼‍♀️
Normal: 🔘
Fire: 🔥
Water: 🌊
Electric: ⚡
Grass: 🌳
Ice: ❄️
@ricealexander
ricealexander / grove-richtext-accordian.js
Last active August 25, 2025 17:24
Turn a Grove RichText Module into an Accordian
function createCollapsingSection (title, contents) {
let section = document.createElement('section')
section.style.marginTop = '10px'
section.style.borderBottom = '1px solid var(--secC3)'
section.style.marginBottom = '10px'
section.innerHTML = `
<details class="RTB" style="padding-bottom: 10px">
<summary tabindex="0" role="button">
<h2 style="display: inline;">${title}</h2>
@ricealexander
ricealexander / scrape-staff-urls.js
Last active August 25, 2025 17:27
Collect improperly formatted person page URLs in Grove
const staffLinks = []
// Navigate across the site and expand "Read More" buttons on the site.
// This script will collect any improper author links it finds while you go along.
setInterval(() => {
const bylines = document.querySelectorAll('[class*="Promo"][class*="-authorName"] .Link')
for (let byline of bylines) {
let href = byline.href
@ricealexander
ricealexander / glade-concept.js
Created July 12, 2023 19:35
Example of Glade Source Code
// Glade object stores useful properties and functions for workarounds
const Glade = {
currentPage: window.location.pathname,
}
// Identify when the page has changed using the custom event grove-navigate
setInterval(function () {
@ricealexander
ricealexander / grove-bookmarklet-refactor.js
Last active June 24, 2025 07:18
Refactoring Grove's Inline Bookmarklet
// Original bookmarklet
javascript: void function () {
var bspUrl = 'https://' + window.location.hostname + '/cms/content/edit.jsp'
var metaName = 'brightspot.contentId'
var metas = document.getElementsByTagName('meta')
var found = false
console.log(bspUrl)
@ricealexander
ricealexander / grove-self-injecting-script.html
Last active August 25, 2025 17:39
Script that injects HTML content after itself. An alternative to document.write
<!-- Grove and other Single-Page Applications do not allow document.write() to be loaded on
pages that have been navigated to. In cases where absolutely necessary, we can use an
approach where content is self-injected. -->
<script id="embed">
var script = document.querySelector('#embed');
script.insertAdjacentHTML('afterend', "Hello World");
</script>
@ricealexander
ricealexander / outlook-configuration.md
Last active September 17, 2024 18:58
Hurdles needed to Jump through for Microsoft Outlook to be halfway decent

Microsoft Outlook

Microsoft Outlook is a prime example of a Microsoft product that stopped innovating as soon as it began dominating the Enterprise marketshare. Examples of these failings include:

  • Their decades-out-of-date Spell Checker
  • Their convoluted Hyper-linking process which assumes all links are intended to be linked drive files by default
  • Their lack of an "All Unread" filter
  • Inconsistent feature parity between desktop client/mobile client/browser clients
  • Broken behavior when Rules/Filters combine Client processes and Exchange processes (Move an email into a folder (Exchange) and Mark it as read (Client))
  • Inability to Import or create templates for customized Signatures (without doing this work outside of Outlook)
@ricealexander
ricealexander / stlpr-footer.html
Last active April 14, 2021 23:20
STLPR Footer for Future Focus and Allegiance
@ricealexander
ricealexander / getFractions.js
Created March 30, 2021 22:05
Returns an array of all fractions of N
function getFractions (n) {
return Array.from({length}, (_, index) => (index + 1) / n)
}
// Example, all fractions of 16 (1/16, 2/16, 3/16, 4/16...)
getFractions(16) // [0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5, 0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 1]
@ricealexander
ricealexander / transcript-extractor.js
Created March 25, 2021 19:02
Rigging a Shared Module for Transcripts
// Transcripts
// One possible way to associate transcripts with Grove posts may involve Shared Modules
// 1. Insert a Module at the bottom of the news post.
// 2. Select Shared Module and create a new Shared Module.
// 3. Select RichText Module and give it a subhead at the top titled "Transcript".
// 4. Copy/Paste the transcript from Google Docs into the RichText body.
// 5. Publish!
//
// This provides some benefits for us over other strategies:
// * Text is the most accessible format for our audience.