Skip to content

HTML redirect to enable TaleSpire URLs where they otherwise couldn't go

Notifications You must be signed in to change notification settings

ccbrown/redirect-to-talespire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

redirect-to-talespire

This repo has a simple HTML redirect to TaleSpire for the purpose of using TaleSpire dice URLs where custom URI handlers aren't supported (namely Google Sheets).

Opening up dice.html via a URL like this will redirect to TaleSpire:

https://ccbrown.github.io/redirect-to-talespire/dice.html#Fireball:2d6

Google Sheets

The best way to use this in Google Sheets is to create a custom function that assembles the URL:

function DICEURL(dice, label) {
  if (label) {
    return "https://ccbrown.github.io/redirect-to-talespire/dice.html#" + encodeURIComponent(label) + ":" + dice;
  } else {
    return "https://ccbrown.github.io/redirect-to-talespire/dice.html#" + dice;
  }
}

Then you can use formulas like this in your cells:

=HYPERLINK(DICEURL("d20" & TEXT(AA20+AC20, "+0;-0;0"), "Initiative"), AA20+AC20)

To get started quickly, you can clone the sheet here.

About

HTML redirect to enable TaleSpire URLs where they otherwise couldn't go

Resources

Stars

Watchers

Forks

Languages