refactor indentation lines to use the map function

This commit is contained in:
Ryo Hilmawan 2020-11-28 01:56:01 +07:00 committed by GitHub
parent 8b26ec1117
commit 8d51a449b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,9 +8,7 @@
'use strict'; 'use strict';
const { createElement } = require('../../pkg/helpers.js'), const { createElement } = require('../../pkg/helpers.js');
path = require('path'),
fs = require('fs-extra');
module.exports = { module.exports = {
id: '35815b3b-3916-4dc6-8769-c9c2448f8b57', id: '35815b3b-3916-4dc6-8769-c9c2448f8b57',
@ -56,12 +54,10 @@ module.exports = {
document.addEventListener('readystatechange', (event) => { document.addEventListener('readystatechange', (event) => {
if (document.readyState !== 'complete') return false; if (document.readyState !== 'complete') return false;
let selectors = []; const selectors =
['bulleted_list', 'numbered_list', 'to_do', 'toggle'] ['bulleted_list', 'numbered_list', 'to_do', 'toggle']
.filter(l => store()[l]) .filter(l => store()[l])
.forEach( .map(l => `.notion-page-content .notion-${l}-block > div > div:last-child`);
l => selectors.push(`.notion-page-content .notion-${l}-block > div > div:last-child`)
)
let style = 'solid'; let style = 'solid';
let opacity = 1; let opacity = 1;