Attempt to fix a problem where previous page request influenced the score of the new page
This commit is contained in:
parent
d512e3cede
commit
6e062f92d7
@ -117,9 +117,10 @@ export default class ExtendedRequest {
|
||||
|
||||
async cacheOrigin(): Promise<void> {
|
||||
let url: string;
|
||||
if (this.data.tabId && this.data.tabId >= 0) {
|
||||
const tab = await browser.tabs.get(this.data.tabId);
|
||||
url = tab.url;
|
||||
if (this.data.type === 'main_frame') {
|
||||
url = this.data.url;
|
||||
} else if (this.data.originUrl) {
|
||||
url = this.data.originUrl;
|
||||
} else if (
|
||||
(this.data as any)?.frameAncestors &&
|
||||
(this.data as any).frameAncestors[0] !== undefined
|
||||
|
Loading…
Reference in New Issue
Block a user