diff --git a/docs/index.md b/docs/index.md index ad07563..0fdec5d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,11 +1,11 @@
Bitcoin After Life Bitcoin After Life - Bitcoin After Life + Bitcoin After Life BAL Protocol — decentralized Bitcoin inheritance
-# Bitcoin After Life +# Bitcoin After Life {: translate="no" } **Bitcoin After Life (BAL)** is an open-source plugin for [Electrum](https://electrum.org) that makes **decentralized Bitcoin inheritance** possible: no notary, no lawyer, no custodian. diff --git a/docs/javascripts/brand-notranslate.js b/docs/javascripts/brand-notranslate.js new file mode 100644 index 0000000..f5f5871 --- /dev/null +++ b/docs/javascripts/brand-notranslate.js @@ -0,0 +1,14 @@ +// Keep the brand name "Bitcoin After Life" untranslated by Chrome / Google +// Translate, while the rest of the page still translates normally. +(function () { + function mark() { + document + .querySelectorAll('.md-header__topic .md-ellipsis, .bal-hero .name') + .forEach(function (el) { + el.setAttribute('translate', 'no'); + el.classList.add('notranslate'); + }); + } + if (document.readyState !== 'loading') mark(); + else document.addEventListener('DOMContentLoaded', mark); +})(); diff --git a/mkdocs.yml b/mkdocs.yml index 21d47e9..b8c7cc3 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -39,6 +39,9 @@ extra_css: # whenever you change extra.css and the browser keeps showing the old style. - stylesheets/extra.css?v=14 +extra_javascript: + - javascripts/brand-notranslate.js # keep "Bitcoin After Life" untranslated in Chrome + nav: - Home: index.md - FAQ: faq.md