init manuals
This commit is contained in:
31
docs/javascripts/extra.js
Normal file
31
docs/javascripts/extra.js
Normal file
@ -0,0 +1,31 @@
|
||||
!function() {
|
||||
const myTitle = {
|
||||
'note': 'Примечание',
|
||||
'caution': 'Осторожно',
|
||||
'info': 'Информация',
|
||||
'danger': 'Опасно',
|
||||
'hint': 'Совет',
|
||||
'warning': 'Внимание'
|
||||
}
|
||||
|
||||
for (let item of document.getElementsByClassName('admonition-title')) {
|
||||
if (item.parentNode.classList[1] && myTitle[item.parentNode.classList[1]]) {
|
||||
item.firstChild.nodeValue = myTitle[item.parentNode.classList[1]];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (let item of document.getElementsByClassName('imgPreview')) {
|
||||
item.onclick = function(s) {
|
||||
window.open(s.target.src, '_blank').focus();
|
||||
}
|
||||
}
|
||||
|
||||
document.querySelectorAll('.zoom').forEach(item => {
|
||||
item.addEventListener('click', function () {
|
||||
this.classList.toggle('image-zoom-large');
|
||||
})
|
||||
});
|
||||
|
||||
//console.log('HI');
|
||||
}();
|
Reference in New Issue
Block a user