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