Skip to content

Instantly share code, notes, and snippets.

View tmedwards's full-sized avatar

Thomas M. Edwards tmedwards

View GitHub Profile
@tmedwards
tmedwards / README_DATE_TIME_WIDGETS.md
Last active October 2, 2021 00:05
Date & Time Widgets for the Gregorian Calendar

Date & Time Widgets for the Gregorian Calendar

The widgets use the JavaScript Date object to provide the inner workings of a Gregorian Calendar (a.k.a. Christian/Western calendar).

Set the initial date to the date/time you want and all players should see the same game world dates and times.

Installation

The widgets within the date_time_widgets.txt file (see below) should be pasted into a widget tagged passage. After doing so, the initial game date/time must be set within the setup section. Each of the printing widgets may be customized.

@tmedwards
tmedwards / saves_dialog_w_overwrite.js
Last active August 31, 2022 02:38
Saves dialog w/ overwrite buttons
(function () {
// Create a new localization string for overwrite buttons.
l10nStrings.savesLabelOverwrite = 'Overwrite';
// Attempt to alter the Saves dialog.
$(document).on(':dialogopened', function (ev) {
// Cache the jQuery-wrapped dialog body element.
var $dialogBody = $(ev.target);
// Bail out if this is not the Saves dialog.
@tmedwards
tmedwards / preload-images.js
Created January 8, 2023 12:59
Image preload function & macro
/*
Image preload function & macro.
*/
/*
preload(imageURLs)
*/
var preload = (function () {
var loadImage = (function () {
// Image loading attributes.