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
alias mdcopy="pandoc --from markdown --to html | textutil -convert rtf -stdin -stdout -format html | sed -e \"s/..e2..80..99/'/g\" | pbcopy -Prefer rtf" |
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
const style=`.container { | |
display: flex; | |
justify-content: center; /* horizontal centering */ | |
align-items: center; /* vertical centering */ | |
height: 2em; /* define a height for demonstration purposes */ | |
}` | |
const sabbath_closed_html=` | |
<html> | |
<style>${style}</style> |
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
<script> | |
function replacelinks() { | |
document.querySelectorAll('a').forEach(el => el.href = "/resources-links/website-closed-for-the-sabbath"); | |
} | |
function close() { | |
const closedOnSabbathUrl = "https://gisbornefpchurch.org.nz/resources-links/website-closed-for-the-sabbath"; | |
const d = new Date(); | |
// is Sabbath in local time or in NZ | |
const isSabbath = d.getDay() === 0 || (d.getUTCDay() === 6 && d.getUTCHours() >= 12) || (d.getUTCDay() === 0 && d.getUTCHours() < 12) | |
if(window.location.href != closedOnSabbathUrl && isSabbath){ |