-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
122 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"files.autoSave": "afterDelay", | ||
"files.autoSaveDelay": 120000 | ||
} | ||
"files.autoSaveDelay": 120000, | ||
"files.associations": { | ||
"*.manifest.append": "chrome-manifest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { readFile, writeFile } from 'fs/promises' | ||
|
||
import { getArtifactFile } from './constants.js' | ||
|
||
export const CHANGES: { file: string; append?: string | string[] }[] = [ | ||
{ | ||
file: 'chrome/chrome.manifest', | ||
append: | ||
'resource search-extensions browser/content/browser/search-extensions/ contentaccessible=yes', | ||
}, | ||
] | ||
|
||
export async function setupFiles() { | ||
for (const change of CHANGES) { | ||
const file = getArtifactFile(change.file) | ||
let contents = await readFile(file, 'utf-8') | ||
|
||
if (change.append) { | ||
const append = Array.isArray(change.append) | ||
? change.append | ||
: [change.append] | ||
contents += '\n' + append.join('\n') | ||
} | ||
|
||
await writeFile(file, contents) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
export async function getSearch() { | ||
if (Services.search.) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Search engine files | ||
|
||
## From Mozilla | ||
|
||
The following files are copied (with small modifications) from gecko-dev. | ||
|
||
- [ddg](./ddg/) - [source](https://searchfox.org/mozilla-central/source/browser/components/search/extensions/ddg/) | ||
- [google](./google/) - [source](https://searchfox.org/mozilla-central/source/browser/components/search/extensions/google/) | ||
|
||
## License | ||
|
||
Note: Even though these files do not include headers, they are all under MPL-2.0 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "DuckDuckGo", | ||
"description": "Search with DuckDuckGo", | ||
"manifest_version": 2, | ||
"version": "1.4", | ||
"browser_specific_settings": { | ||
"gecko": { | ||
"id": "[email protected]" | ||
} | ||
}, | ||
"hidden": true, | ||
"icons": { | ||
"16": "favicon.ico" | ||
}, | ||
"web_accessible_resources": ["favicon.ico"], | ||
"chrome_settings_overrides": { | ||
"search_provider": { | ||
"keyword": ["@duckduckgo", "@ddg"], | ||
"name": "DuckDuckGo", | ||
"search_url": "https://duckduckgo.com/", | ||
"search_form": "https://duckduckgo.com/", | ||
"search_url_get_params": "t=ffab&q={searchTerms}", | ||
"suggest_url": "https://ac.duckduckgo.com/ac/", | ||
"suggest_url_get_params": "q={searchTerms}&type=list" | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "Google", | ||
"description": "Search with Google", | ||
"manifest_version": 2, | ||
"version": "1.4", | ||
"browser_specific_settings": { | ||
"gecko": { | ||
"id": "[email protected]" | ||
} | ||
}, | ||
"hidden": true, | ||
"default_locale": "en", | ||
"icons": { | ||
"16": "favicon.ico" | ||
}, | ||
"web_accessible_resources": ["favicon.ico"], | ||
"chrome_settings_overrides": { | ||
"search_provider": { | ||
"keyword": "@google", | ||
"name": "Google", | ||
"search_url": "https://www.google.com/search", | ||
"search_form": "https://www.google.com/search", | ||
"suggest_url": "https://www.google.com/complete/search?client=fushra&q={searchTerms}", | ||
"params": [ | ||
{ | ||
"name": "channel", | ||
"condition": "pref", | ||
"pref": "google_channel_row" | ||
} | ||
], | ||
"search_url_get_params": "client=fushra&q={searchTerms}" | ||
} | ||
} | ||
} |