Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kptdobe committed Sep 15, 2022
1 parent c875f1e commit 4f538f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions js/crawl/crawl.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,8 @@ const attachListeners = () => {
}

const onLoad = async () => {

if (config.fields['import-scroll-to-bottom']) {
frame.contentWindow.window.scrollTo({ left: 0, top: frame.contentDocument.body.scrollHeight, behavior: "smooth" });
frame.contentWindow.window.scrollTo({ left: 0, top: frame.contentDocument.body.scrollHeight, behavior: 'smooth' });
}

window.setTimeout(async () => {
Expand All @@ -161,10 +160,10 @@ const attachListeners = () => {
const extension = u.pathname.split('.').pop();
if (IGNORED_EXTENSIONS.indexOf(extension) === -1) {
// eslint-disable-next-line max-len
if (!crawlStatus.urls.includes(found) &&
!urlsArray.includes(found) &&
current !== found &&
u.pathname.startsWith(config.fields['crawl-filter-pathname'])) {
if (!crawlStatus.urls.includes(found)
&& !urlsArray.includes(found)
&& current !== found
&& u.pathname.startsWith(config.fields['crawl-filter-pathname'])) {
urlsArray.push(found);
linksToFollow.push(found);
} else {
Expand Down Expand Up @@ -311,7 +310,7 @@ const attachListeners = () => {
sitemap: config.fields['crawl-sitemap-file'],
})).filter((url) => {
const u = new URL(url);
return u.pathname.startsWith(config.fields['crawl-filter-pathname'])
return u.pathname.startsWith(config.fields['crawl-filter-pathname']);
});

crawlStatus.crawled = crawlStatus.urls.length;
Expand Down
2 changes: 1 addition & 1 deletion js/import/import.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ const attachListeners = () => {
const includeDocx = !!dirHandle;

if (config.fields['import-scroll-to-bottom']) {
frame.contentWindow.window.scrollTo({ left: 0, top: frame.contentDocument.body.scrollHeight, behavior: "smooth" });
frame.contentWindow.window.scrollTo({ left: 0, top: frame.contentDocument.body.scrollHeight, behavior: 'smooth' });
}

window.setTimeout(async () => {
Expand Down

0 comments on commit 4f538f4

Please sign in to comment.