This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8" /> | |
<title>Redirecting to the Fediverse</title> | |
<head> | |
<script> | |
// let's say this is hosted at example.com. Given a url of one of the forms: | |
// - example.com/@user@instance.com/post_id | |
// - example.com/@user@instance.com | |
// - example.com/@instance.com | |
// redirect accordingly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function time_to_glitch(time){ | |
var year, day_of_year, month_and_day, month, day_of_month, hour, minute, sec, ts ; | |
sec = Number(time) - 1238562000; | |
// there are 4435200 real seconds in a game year | |
// there are 14400 real seconds in a game day | |
// there are 600 real seconds in a game hour | |
// there are 10 real seconds in a game minute | |
year = Math.floor(sec / 4435200); |