Update mod.js

Changed indentation lines to a select option
This commit is contained in:
Ryo Hilmawan 2020-11-06 02:09:46 +07:00 committed by GitHub
parent 50fcc2604b
commit 9c6a7a4fd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,9 +77,8 @@ module.exports = {
{ {
key: 'indentation_lines', key: 'indentation_lines',
label: 'indentation lines for bullets', label: 'indentation lines for bullets',
desc: type: 'select',
"adds vertical indentation/relationship lines to make bullet trees\ value: ['none', 'solid', 'dashed', 'dotted', 'soft'],
easier to follow",
}, },
{ {
key: 'scroll_db_toolbars', key: 'scroll_db_toolbars',
@ -99,7 +98,6 @@ module.exports = {
'spaced_lines', 'spaced_lines',
'hide_help', 'hide_help',
'condensed_bullets', 'condensed_bullets',
'indentation_lines',
'scroll_db_toolbars' 'scroll_db_toolbars'
] ]
.filter((tweak) => store()[tweak]) .filter((tweak) => store()[tweak])
@ -119,6 +117,9 @@ module.exports = {
}; };
window.addEventListener('resize', addResponsiveBreakpoint); window.addEventListener('resize', addResponsiveBreakpoint);
addResponsiveBreakpoint(); addResponsiveBreakpoint();
if (store().indentation_lines !== 'none') {
document.body.dataset.tweaks += `[indentation_lines_${store().indentation_lines}]`
}
}); });
}, },
}, },