Skip to content

Instantly share code, notes, and snippets.

View RayHollister's full-sized avatar

Ray Hollister RayHollister

View GitHub Profile
@RayHollister
RayHollister / wjct-grove-style.css
Last active July 31, 2023 18:26
WJCT Grove Style Customization
@import url("https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
:root {
--WJCT-primary: #006bb6;
--WJCT-secondary: #40c4ff;
--WJCT-tertiary: #2c3e50;
--WJCT-light-text: white;
--WJCT-red: #d50000;
--bodyFont: "Montserrat", sans-serif;
--primaryFont: "Montserrat", sans-serif;
@RayHollister
RayHollister / Automated Composer to Grove Radio Show Schedule
Last active August 14, 2023 20:16
This JavaScript fetches and formats the weekly broadcast schedule of a specific NPR radio show from their API. It groups same times on sequential days and displays the schedule on the radio show's webpage. The script runs automatically on page load, if no schedule is already present.
<script>
const daysOfWeek = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
async function getShowSchedule() {
let scheduleDiv = document.querySelector(".RadioShowPage-mediaSchedule");
if (scheduleDiv) return;
const programName = document.querySelector(".RadioShowPage-headline").textContent.trim();
try {
@RayHollister
RayHollister / PANTHEON_STRIPPED_WPFORMS_FIXER.js
Last active May 25, 2022 23:22
A bit of Javascript to pass the UTM to a WPForm since Pantheon strips the UTMs
// Get the UTMs with Javascript and pass them to the WPForm on the page
function getQueryParams(qs) {
qs = qs.split('+').join(' ');
var params = {},
tokens, re = /[?&]?([^=]+)=([^&]*)/g;
while (tokens = re.exec(qs)) {
params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]);
}
return params;
}