|
|
@ -423,18 +423,15 @@ const Driver = {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
async onContentLoad(url, items, language, requires) {
|
|
|
|
async onContentLoad(url, items, language, requires) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const { hostname } = new URL(url)
|
|
|
|
items.cookies = items.cookies || {}
|
|
|
|
|
|
|
|
|
|
|
|
items.cookies = (
|
|
|
|
//
|
|
|
|
|
|
|
|
;(
|
|
|
|
await promisify(chrome.cookies, 'getAll', {
|
|
|
|
await promisify(chrome.cookies, 'getAll', {
|
|
|
|
domain: `.${hostname}`,
|
|
|
|
url,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
).reduce(
|
|
|
|
).forEach(
|
|
|
|
(cookies, { name, value }) => ({
|
|
|
|
({ name, value }) => (items.cookies[name.toLowerCase()] = [value])
|
|
|
|
...cookies,
|
|
|
|
|
|
|
|
[name.toLowerCase()]: [value],
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
await Driver.onDetect(
|
|
|
|
await Driver.onDetect(
|
|
|
|