Skip to content

Commit

Permalink
修复浏览器历史记录时间格式长度和书签统一
Browse files Browse the repository at this point in the history
  • Loading branch information
lanyuanxiaoyao committed Nov 18, 2022
1 parent 8974a76 commit 9622e85
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/parser/browser/history/Chromium.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export class ChromiumHistoryApplicationImpl extends BrowserApplicationImpl<Chrom
array.forEach(i => {
let title: string = i['title'] ?? ''
let url: string = i['url'] ?? ''
let time: number = (i['timestamp'] ?? 0) * 1000
items.push({
id: '',
title: title,
Expand All @@ -58,7 +59,7 @@ export class ChromiumHistoryApplicationImpl extends BrowserApplicationImpl<Chrom
]),
exists: true,
command: new UtoolsExecutor(url),
datetime: i['timestamp'] ?? 0,
datetime: time,
})
})
}
Expand Down
3 changes: 2 additions & 1 deletion src/parser/browser/history/Firefox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export class FirefoxHistoryApplicationImpl extends BrowserApplicationImpl<Firefo
let title: string = i['title'] ?? ''
let url: string = i['url'] ?? ''
let description: string = i['description'] ?? url
let time: number = (i['timestamp'] ?? 0) * 1000
if (isEmpty(description)) {
description = url
}
Expand All @@ -69,7 +70,7 @@ export class FirefoxHistoryApplicationImpl extends BrowserApplicationImpl<Firefo
]),
exists: true,
command: new UtoolsExecutor(url),
datetime: i['timestamp'] ?? 0,
datetime: time,
})
})
}
Expand Down
3 changes: 2 additions & 1 deletion src/parser/browser/history/Safari.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export class SafariHistoryApplicationImpl extends BrowserApplicationImpl<SafariH
array.forEach(i => {
let title: string = i['title'] ?? ''
let url: string = i['url'] ?? ''
let time: number = (i['timestamp'] ?? 0) * 1000
items.push({
id: '',
title: title,
Expand All @@ -66,7 +67,7 @@ export class SafariHistoryApplicationImpl extends BrowserApplicationImpl<SafariH
]),
exists: true,
command: new UtoolsExecutor(url),
datetime: i['timestamp'] ?? 0,
datetime: time,
})
})
}
Expand Down

0 comments on commit 9622e85

Please sign in to comment.