Update index.md, mkdocs.yml, add javascripts for correct translate
All checks were successful
Build and deploy docs / deploy (push) Successful in 4s
All checks were successful
Build and deploy docs / deploy (push) Successful in 4s
This commit is contained in:
14
docs/javascripts/brand-notranslate.js
Normal file
14
docs/javascripts/brand-notranslate.js
Normal file
@@ -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);
|
||||
})();
|
||||
Reference in New Issue
Block a user