2
0
mirror of https://github.com/tenrok/maska.git synced 2026-05-15 11:59:38 +03:00

docs: add version switcher

This commit is contained in:
Alexander Shabunevich
2024-06-06 22:50:02 +03:00
parent b3e8fa052f
commit e994aaa8e4
6 changed files with 28 additions and 34 deletions
+14
View File
@@ -0,0 +1,14 @@
;(function () {
function versionPlugin(hook) {
hook.mounted(function () {
document
.getElementById('version-selector')
.addEventListener('change', (e) => {
window.location.href = '../' + e.target.value + '/'
})
})
}
$docsify = $docsify || {}
$docsify.plugins = [].concat($docsify.plugins || [], versionPlugin)
})()