Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

Commit

Permalink
feat: Fake edge at chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
gantrol committed Feb 25, 2023
1 parent d9a2203 commit fa57229
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 41 deletions.
8 changes: 0 additions & 8 deletions background.ts

This file was deleted.

5 changes: 0 additions & 5 deletions content.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import { Page } from "~utils/bingPage";
import { DownloadVisitor } from "~utils/visitor";

import type { PlasmoCSConfig } from "plasmo"
import { exportActions, Settings } from "~utils/constants";
import { handleElementVisibility } from "~utils/viewmodel";

export const config: PlasmoCSConfig = {
matches: ["https://www.bing.com/*"],
all_frames: true
}

const init = async () => {
await Page.waitForElm("#b_sydConvCont > cib-serp");
Expand Down
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@
"host_permissions": [
"*://*.bing.com/*"
],
"declarative_net_request": {
"rule_resources": [
{
"id": "test_rules",
"enabled": true,
"path": "~rules.json"
}
]
},
"default_locale": "en"
}
}
20 changes: 20 additions & 0 deletions rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"id": 1,
"priority": 1,
"action": {
"type": "modifyHeaders",
"requestHeaders": [
{
"operation": "set",
"header": "user-agent",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.56"
}
]
},
"condition": {
"urlFilter": "bing.com",
"resourceTypes" : ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", "object", "xmlhttprequest", "ping", "csp_report", "media", "websocket", "webtransport", "webbundle", "other"]
}
}
]
28 changes: 0 additions & 28 deletions utils/request/header.ts

This file was deleted.

0 comments on commit fa57229

Please sign in to comment.