6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/popup.js:
--------------------------------------------------------------------------------
1 | document.addEventListener('DOMContentLoaded', function () {
2 | chrome.tabs.create({url: './index.html', selected: true, active: true});
3 | });
--------------------------------------------------------------------------------
/bg.js:
--------------------------------------------------------------------------------
1 | const iframeHosts = [
2 | "so.360.com", "devv.ai", "metaso.cn", "www.perplexity.ai", "phind.com"
3 | ];
4 |
5 | chrome.runtime.onInstalled.addListener(() => {
6 | const RULE = {
7 | id: 1,
8 | condition: {
9 | initiatorDomains: [chrome.runtime.id],
10 | requestDomains: iframeHosts,
11 | resourceTypes: ['sub_frame'],
12 | },
13 | action: {
14 | type: 'modifyHeaders',
15 | responseHeaders: [
16 | {header: 'X-Frame-Options', operation: 'remove'},
17 | {header: 'Frame-Options', operation: 'remove'},
18 | {header: 'Content-Security-Policy', operation: 'remove'},
19 | ],
20 | },
21 | };
22 | chrome.declarativeNetRequest.updateDynamicRules({
23 | removeRuleIds: [RULE.id],
24 | addRules: [RULE],
25 | });
26 | });
--------------------------------------------------------------------------------
/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "manifest_version": 3,
3 | "name": "AI Search Hub",
4 | "version": "1.0.1",
5 | "author": "Frank Lin",
6 | "icons": {
7 | "128": "AISearchHub.png"
8 | },
9 | "action": {
10 | "default_popup": "popup.html"
11 | },
12 | "permissions": ["declarativeNetRequestWithHostAccess", "storage","cookies"],
13 | "host_permissions": [
14 | "*://*/*"
15 | ],
16 | "minimum_chrome_version": "101",
17 | "background": {"service_worker": "bg.js"},
18 | "content_scripts": [
19 | {
20 | "matches": [""],
21 | "js": ["content.js"]
22 | }
23 | ],
24 | "content_security_policy": {
25 | "extension_pages": "script-src 'self'; object-src 'self'; frame-src https://so.360.com https://devv.ai https://metaso.cn https://www.perplexity.ai https://www.phind.com;"
26 | }
27 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 Frank Lin
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/style.css:
--------------------------------------------------------------------------------
1 | .autobar{
2 | color: grey;
3 | text-align: center;
4 | font-size: .875rem;
5 | padding: 0.4rem;
6 | background-color: black;
7 | border-radius: 0.3rem;
8 | margin-top: 0.4rem;
9 | }
10 |
11 | .loader {
12 | float: left;
13 | display: none;
14 | position: relative;
15 | width: 1.5rem;
16 | height: 1.5rem;
17 | border-radius: 2rem;
18 | background: linear-gradient(#eb31b0, #e4c352, #7df8d6);
19 | animation: animate 1s linear infinite;
20 | }
21 |
22 | .loader::before {
23 | border-radius: 2rem;
24 | position: absolute;
25 | content: "";
26 | background: #000000;
27 | left: 50%;
28 | top: 50%;
29 | transform: translate(-50%, -50%);
30 | width: 80%;
31 | height: 80%;
32 | border: 0 solid white;
33 | }
34 |
35 | @keyframes animate {
36 | from {
37 | transform: rotate(0deg);
38 | }
39 | to {
40 | transform: rotate(360deg);
41 | }
42 | }
43 |
44 | .autoBtn{
45 | border-radius: 1rem;
46 | color: white;
47 | font-size: .875rem;
48 | padding: .1rem;
49 | }
50 |
51 | .autoBtn[disabled]{
52 | border-radius: 1rem;
53 | color: grey;
54 | font-size: .875rem;
55 | padding: .1rem;
56 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AI-Search-Hub
2 |
3 | A chrome extension can help user to search on muiltiple AI search engine by oneclick
4 |
5 | 
6 |
7 | How to Use
8 |
9 | To load an unpacked extension in Google Chrome, you can follow these steps:
10 |
11 | 1. Open Google Chrome on your computer.
12 | 2. In the address bar, type `chrome://extensions` and press Enter. This will open the Chrome Extensions page.
13 | 3. Enable the "Developer mode" option. You should find a toggle switch at the top right corner of the Extensions page. If it's already enabled, you can skip this step.
14 | 4. Download or locate the folder containing the unpacked extension on your computer. Make sure the folder contains all the necessary files for the extension, including the manifest file (`manifest.json`), which is required for every extension.
15 | 5. Once you have the folder ready, click on the "Load unpacked" button, which should now be visible on the Extensions page.
16 | 6. A file browser window will appear. Navigate to the folder where your extension is located and select it. Then, click the "Select Folder" button.
17 | 7. Chrome will load the extension, and you should see it listed among your installed extensions on the Extensions page.
18 |
19 | That's it! The unpacked extension should now be loaded in Google Chrome, and you can start using it. Remember to keep the "Developer mode" enabled if you want to load additional unpacked extensions or make changes to the loaded extension.
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | AI Search Hub
8 |
9 |
10 |
20 |
21 |
22 |
23 |
24 |