Skip to content

Commit

Permalink
add messageBridge feature (#2465)
Browse files Browse the repository at this point in the history
Co-authored-by: Shane Osbourne <[email protected]>
  • Loading branch information
shakyShane and Shane Osbourne authored Nov 15, 2024
1 parent aae55a2 commit 09e9376
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
11 changes: 11 additions & 0 deletions features/message-bridge.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"_meta": {
"description": "Adds support for messaging between DDG properties and browsers",
"sampleExcludeRecords": {}
},
"exceptions": [],
"settings": {
"aiChat": "disabled",
"domains": []
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"test": "npm run lint && npm run tsc && npm run build && npm run unit-tests",
"lint": "eslint . && prettier . --check",
"lint-fix": "eslint . --fix && prettier . --write",
"tsc": "tsc",
"tsc-watch": "tsc --watch",
"unit-tests": "mocha ./tests/**/*.js",
Expand Down
2 changes: 2 additions & 0 deletions schema/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { TrackerAllowlistFeature } from './features/tracker-allowlist';
import { WebCompatFeature } from './features/webcompat';
import { DuckPlayerFeature } from './features/duckplayer';
import { AutofillFeature } from './features/autofill';
import { MessageBridgeFeature } from './features/message-bridge';

export { WebCompatSettings } from './features/webcompat';
export { DuckPlayerSettings } from './features/duckplayer';
Expand All @@ -31,6 +32,7 @@ export type ConfigV4<VersionType> = {
duckPlayer: DuckPlayerFeature<VersionType>;
trackerAllowlist: TrackerAllowlistFeature<VersionType>;
webCompat: WebCompatFeature<VersionType>;
messageBridge: MessageBridgeFeature<VersionType>;
};
unprotectedTemporary: SiteException[];
};
Expand Down
7 changes: 7 additions & 0 deletions schema/features/message-bridge.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { CSSInjectFeatureSettings, Feature, FeatureState } from '../feature';

export type MessageBridgeSettings = CSSInjectFeatureSettings<{
aiChat: FeatureState;
}>;

export type MessageBridgeFeature<VersionType> = Feature<MessageBridgeSettings, VersionType>;

0 comments on commit 09e9376

Please sign in to comment.