├── .nvmrc ├── jsconfig.json ├── packages └── native-messaging-host │ ├── .npmignore │ └── package.json ├── icons ├── icon128.png ├── icon16.png ├── icon48.png ├── icon96.png ├── toolbar16.png ├── toolbar32.png └── toolbar64.png ├── img ├── edge │ ├── menu.png │ └── button.png ├── chrome │ ├── menu.png │ └── button.png ├── firefox │ ├── menu.png │ ├── button.png │ └── shortcuts.png └── safari │ ├── menu.png │ ├── button.png │ └── permissions.png ├── src ├── common │ ├── utils.ts │ ├── backend-connection-state.ts │ ├── options-page-interface.ts │ ├── features.ts │ ├── background-interface.ts │ └── content-script-interface.ts ├── options │ ├── utils.ts │ ├── components │ │ ├── app.tsx │ │ ├── header.tsx │ │ ├── main-block.tsx │ │ ├── connect │ │ │ ├── connection-block.tsx │ │ │ ├── connect-mode.tsx │ │ │ ├── connect-state.tsx │ │ │ └── connection-web.tsx │ │ ├── usage.tsx │ │ ├── shortcuts.tsx │ │ └── footer.tsx │ ├── index.tsx │ └── settings-model.ts ├── background │ ├── protocol │ │ ├── protocol-error.ts │ │ └── types.ts │ ├── transport │ │ ├── transport-base.ts │ │ ├── transport-native-messaging.ts │ │ └── transport-browser-tab.ts │ ├── init.ts │ ├── utils.ts │ ├── internal-ipc.ts │ ├── ui.ts │ └── commands.ts └── content │ ├── content-keeweb.ts │ └── content-page.ts ├── xcode ├── KeeWeb Connect │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AppIcon.appiconset │ │ │ ├── 1024.png │ │ │ ├── icon_16x16.png │ │ │ ├── icon_32x32.png │ │ │ ├── icon_128x128.png │ │ │ ├── icon_16x16@2x.png │ │ │ ├── icon_256x256.png │ │ │ ├── icon_32x32@2x.png │ │ │ ├── icon_512x512.png │ │ │ ├── icon_128x128@2x.png │ │ │ ├── icon_256x256@2x.png │ │ │ └── Contents.json │ │ └── AccentColor.colorset │ │ │ └── Contents.json │ ├── AppDelegate.h │ ├── main.m │ ├── ViewController.h │ ├── KeeWeb_Connect.entitlements │ ├── AppDelegate.m │ ├── Info.plist │ └── ViewController.m ├── KeeWeb Connect Extension │ ├── SafariWebExtensionHandler.h │ ├── KeeWeb_Connect_Extension.entitlements │ ├── Info.plist │ └── SafariWebExtensionHandler.m ├── KeeWeb Connect.xcodeproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── .clang-format ├── manifest.dev.json ├── manifest.edge.json ├── .prettierrc ├── pages └── options.html ├── .editorconfig ├── manifest.firefox.json ├── manifest.safari.json ├── native-manifest.json ├── native-messaging-host ├── .clang-format ├── Makefile ├── CMakeLists.txt ├── test │ └── native-messaging-host-test.mjs └── src │ └── native-messaging-host.cpp ├── scripts ├── .eslintrc.json └── bump-version.ts ├── .gitignore ├── tsconfig.json ├── .github ├── FUNDING.yml └── workflows │ ├── publish-firefox.yml │ └── verify.yaml ├── LICENSE ├── release-notes.md ├── README.md ├── manifest.json ├── package.json ├── webpack.config.ts ├── .eslintrc.json ├── docs └── keeweb-connect-protocol.md ├── _locales ├── zh_TW │ └── messages.json ├── zh_CN │ └── messages.json ├── ja │ └── messages.json ├── en_US │ └── messages.json ├── pl │ └── messages.json ├── uk │ └── messages.json ├── cs │ └── messages.json ├── nl │ └── messages.json ├── es │ └── messages.json ├── de │ └── messages.json └── fr │ └── messages.json └── styles └── options.css /.nvmrc: -------------------------------------------------------------------------------- 1 | v18.20.2 2 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["*.js"] 3 | } -------------------------------------------------------------------------------- /packages/native-messaging-host/.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.log 3 | -------------------------------------------------------------------------------- /icons/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/icons/icon128.png -------------------------------------------------------------------------------- /icons/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/icons/icon16.png -------------------------------------------------------------------------------- /icons/icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/icons/icon48.png -------------------------------------------------------------------------------- /icons/icon96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/icons/icon96.png -------------------------------------------------------------------------------- /img/edge/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/img/edge/menu.png -------------------------------------------------------------------------------- /icons/toolbar16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/icons/toolbar16.png -------------------------------------------------------------------------------- /icons/toolbar32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/icons/toolbar32.png -------------------------------------------------------------------------------- /icons/toolbar64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/icons/toolbar64.png -------------------------------------------------------------------------------- /img/chrome/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/img/chrome/menu.png -------------------------------------------------------------------------------- /img/edge/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/img/edge/button.png -------------------------------------------------------------------------------- /img/firefox/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/img/firefox/menu.png -------------------------------------------------------------------------------- /img/safari/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/img/safari/menu.png -------------------------------------------------------------------------------- /src/common/utils.ts: -------------------------------------------------------------------------------- 1 | export function noop(): void { 2 | // intentionally left blank 3 | } 4 | -------------------------------------------------------------------------------- /img/chrome/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/img/chrome/button.png -------------------------------------------------------------------------------- /img/firefox/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/img/firefox/button.png -------------------------------------------------------------------------------- /img/safari/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/img/safari/button.png -------------------------------------------------------------------------------- /img/firefox/shortcuts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/img/firefox/shortcuts.png -------------------------------------------------------------------------------- /img/safari/permissions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/img/safari/permissions.png -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface AppDelegate : NSObject 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /manifest.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "content_security_policy": { 3 | "extension_pages": "default-src 'self'; script-src 'self' 'unsafe-eval';" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /manifest.edge.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands": { 3 | "submit-auto": { 4 | "suggested_key": { 5 | "default": "Ctrl+Shift+A" 6 | } 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /xcode/KeeWeb Connect Extension/SafariWebExtensionHandler.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SafariWebExtensionHandler : NSObject 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 4, 3 | "singleQuote": true, 4 | "printWidth": 100, 5 | "trailingComma": "none", 6 | "quoteProps": "preserve", 7 | "endOfLine": "auto" 8 | } 9 | -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_16x16.png -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_32x32.png -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_128x128.png -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_256x256.png -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_512x512.png -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keeweb/keeweb-connect/HEAD/xcode/KeeWeb Connect/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png -------------------------------------------------------------------------------- /src/options/utils.ts: -------------------------------------------------------------------------------- 1 | function res(name: string, ...substitutions: string[]): string { 2 | return chrome.i18n.getMessage(name, substitutions.length ? substitutions : undefined) || name; 3 | } 4 | 5 | export { res }; 6 | -------------------------------------------------------------------------------- /xcode/KeeWeb Connect.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/common/backend-connection-state.ts: -------------------------------------------------------------------------------- 1 | export enum BackendConnectionState { 2 | Initializing = 'Initializing', 3 | ReadyToConnect = 'ReadyToConnect', 4 | Connecting = 'Connecting', 5 | Connected = 'Connected', 6 | Error = 'Error' 7 | } 8 | -------------------------------------------------------------------------------- /src/common/options-page-interface.ts: -------------------------------------------------------------------------------- 1 | import { BackendConnectionState } from './backend-connection-state'; 2 | 3 | export interface OptionsPageMessage { 4 | backendConnectionState?: BackendConnectionState; 5 | backendConnectionError?: string; 6 | } 7 | -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int main(int argc, const char *argv[]) { 4 | @autoreleasepool { 5 | // Setup code that might create autoreleased objects goes here. 6 | } 7 | return NSApplicationMain(argc, argv); 8 | } 9 | -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/ViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface ViewController : NSViewController 4 | 5 | @property(weak, nonatomic) IBOutlet NSTextField *appNameLabel; 6 | 7 | - (IBAction)openSafariExtensionPreferences:(id)sender; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/KeeWeb_Connect.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /pages/options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KeeWeb Connect 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://EditorConfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | charset = utf-8 9 | indent_style = space 10 | indent_size = 4 11 | trim_trailing_whitespace = true 12 | 13 | [{*.json,*.yaml}] 14 | indent_size = 2 15 | 16 | [*.md] 17 | trim_trailing_whitespace = false 18 | -------------------------------------------------------------------------------- /manifest.firefox.json: -------------------------------------------------------------------------------- 1 | { 2 | "browser_specific_settings": { 3 | "gecko": { 4 | "id": "keeweb-connect-addon@keeweb.info" 5 | } 6 | }, 7 | "commands": { 8 | "submit-auto": { 9 | "suggested_key": { 10 | "default": "Ctrl+Shift+U", 11 | "mac": "Command+Shift+U" 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /xcode/KeeWeb Connect.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /manifest.safari.json: -------------------------------------------------------------------------------- 1 | { 2 | "browser_action": { 3 | "default_icon": { 4 | "16": "icons/toolbar16.png", 5 | "32": "icons/toolbar32.png", 6 | "64": "icons/toolbar64.png" 7 | } 8 | }, 9 | "commands": { 10 | "submit-auto": { 11 | "suggested_key": { 12 | "default": "Shift+Command+A" 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /native-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "allowed_origins": [ 3 | "chrome-extension://enjifmdnhaddmajefhfaoglcfdobkcpj/" 4 | ], 5 | "allowed_extensions": [ 6 | "keeweb-connect@keeweb.info" 7 | ], 8 | "description": "KeeWeb native messaging host", 9 | "name": "net.antelle.keeweb.keeweb_connect", 10 | "path": "keeweb-native-messaging-host", 11 | "type": "stdio" 12 | } 13 | -------------------------------------------------------------------------------- /src/background/protocol/protocol-error.ts: -------------------------------------------------------------------------------- 1 | export class ProtocolError extends Error { 2 | readonly code: string; 3 | 4 | constructor(message: string, code: string) { 5 | super(message); 6 | this.code = code; 7 | } 8 | } 9 | 10 | export enum ProtocolErrorCode { 11 | DatabaseNotOpened = '1', 12 | UserRejected = '6', 13 | NoMatches = '15' 14 | } 15 | -------------------------------------------------------------------------------- /xcode/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | IndentWidth: 4 3 | ColumnLimit: 100 4 | IncludeBlocks: Regroup 5 | IncludeCategories: 6 | - Regex: '^' 7 | Priority: 2 8 | - Regex: '^<.*\.h>' 9 | Priority: 1 10 | - Regex: '^<.*' 11 | Priority: 2 12 | - Regex: '.*' 13 | Priority: 3 14 | SortIncludes: true -------------------------------------------------------------------------------- /packages/native-messaging-host/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@keeweb/keeweb-native-messaging-host", 3 | "version": "0.0.0", 4 | "description": "", 5 | "main": "", 6 | "author": { 7 | "name": "Antelle", 8 | "email": "antelle.net@gmail.com", 9 | "url": "http://antelle.net" 10 | }, 11 | "license": "MIT", 12 | "publishConfig": { "registry": "https://npm.pkg.github.com/" } 13 | } 14 | -------------------------------------------------------------------------------- /src/common/features.ts: -------------------------------------------------------------------------------- 1 | const isSafari = location.origin.startsWith('safari'); 2 | const isFirefox = location.origin.startsWith('moz'); 3 | 4 | export const supportsUnicodeMenus = !isSafari; 5 | export const canUseOnlyAppConnection = isSafari; 6 | export const canEditShortcuts = !isSafari; 7 | export const shortcutsCanBeEditedOnlyManually = isFirefox; 8 | export const needRequestPermissionsPerSite = isSafari; 9 | -------------------------------------------------------------------------------- /native-messaging-host/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | IndentWidth: 4 3 | ColumnLimit: 100 4 | IncludeBlocks: Regroup 5 | IncludeCategories: 6 | - Regex: '^' 7 | Priority: 2 8 | - Regex: '^<.*\.h>' 9 | Priority: 1 10 | - Regex: '^<.*' 11 | Priority: 2 12 | - Regex: '.*' 13 | Priority: 3 14 | SortIncludes: true -------------------------------------------------------------------------------- /scripts/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-console": "off", 4 | "import/no-namespace": "off", 5 | "camelcase": "off", 6 | "@typescript-eslint/no-var-requires": "off", 7 | "@typescript-eslint/no-unsafe-member-access": "off", 8 | "@typescript-eslint/no-unsafe-assignment": "off", 9 | "@typescript-eslint/no-unsafe-call": "off", 10 | "@typescript-eslint/no-unsafe-return": "off" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/common/background-interface.ts: -------------------------------------------------------------------------------- 1 | export interface BackgroundMessageFromPageConnectToKeeWeb { 2 | action: 'connect-to-keeweb'; 3 | activeTabId: number; 4 | } 5 | 6 | export interface BackgroundMessageFromPageOpenTab { 7 | action: 'open-tab'; 8 | url: string; 9 | } 10 | 11 | export type BackgroundMessageFromPage = 12 | | BackgroundMessageFromPageConnectToKeeWeb 13 | | BackgroundMessageFromPageOpenTab; 14 | -------------------------------------------------------------------------------- /native-messaging-host/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | cmake -B build . 3 | cmake --build build --config MinSizeRel 4 | 5 | debug: 6 | cmake -B build . 7 | cmake --build build --config Debug 8 | 9 | format: 10 | clang-format -i src/*.cpp 11 | 12 | run: 13 | echo -n 020000007b7d | xxd -r -p | build/keeweb-native-messaging-host keeweb-connect@keeweb.info 14 | 15 | tests: 16 | ../../node_modules/.bin/mocha test/native-messaging-host-test.mjs 17 | -------------------------------------------------------------------------------- /src/options/components/app.tsx: -------------------------------------------------------------------------------- 1 | import { FunctionComponent } from 'preact'; 2 | import { model } from 'options/settings-model'; 3 | import { Header } from './header'; 4 | import { MainBlock } from './main-block'; 5 | 6 | const App: FunctionComponent = () => { 7 | return ( 8 | <> 9 |
10 | {model.loaded ? : null} 11 | 12 | ); 13 | }; 14 | 15 | export { App }; 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ 3 | .DS_Store 4 | node_modules/ 5 | dist/ 6 | *.log 7 | *.user 8 | *.pem 9 | *.iml 10 | .cache/ 11 | 12 | xcuserdata/ 13 | *.xcodeproj/* 14 | !*.xcodeproj/project.pbxproj 15 | !*.xcodeproj/xcshareddata/ 16 | !*.xcworkspace/contents.xcworkspacedata 17 | **/xcshareddata/WorkspaceSettings.xcsettings 18 | 19 | native-messaging-host/build/ 20 | 21 | # Artifacts from signing the addon for Firefox 22 | web-ext-artifacts 23 | -------------------------------------------------------------------------------- /src/options/index.tsx: -------------------------------------------------------------------------------- 1 | import { render } from 'preact'; 2 | import { res } from './utils'; 3 | import { model } from './settings-model'; 4 | import { App } from './components/app'; 5 | import { noop } from 'common/utils'; 6 | 7 | document.title = `KeeWeb Connect - ${res('optionsTitle')}`; 8 | 9 | model.on('change', renderApp); 10 | model.init().catch(noop); 11 | 12 | renderApp(); 13 | 14 | function renderApp() { 15 | render(, document.body); 16 | } 17 | -------------------------------------------------------------------------------- /xcode/KeeWeb Connect Extension/KeeWeb_Connect_Extension.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.application-groups 8 | 9 | $(TeamIdentifierPrefix)keeweb 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/options/components/header.tsx: -------------------------------------------------------------------------------- 1 | import { FunctionComponent } from 'preact'; 2 | import { res } from 'options/utils'; 3 | 4 | const Header: FunctionComponent = () => { 5 | return ( 6 | <> 7 |

8 | KeeWeb 9 | KeeWeb Connect – {res('optionsTitle')} 10 |

11 |

{res('optionsIntro')}

12 | 13 | ); 14 | }; 15 | 16 | export { Header }; 17 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "commonjs", 5 | "preserveConstEnums": true, 6 | "sourceMap": true, 7 | "strict": true, 8 | "jsx": "react-jsx", 9 | "jsxImportSource": "preact", 10 | "baseUrl": "src", 11 | "noEmitOnError": true 12 | }, 13 | "paths": { 14 | "background/*": ["background/*"], 15 | "common/*": ["common/*"], 16 | "content/*": ["content/*"], 17 | "options/*": ["options/*"] 18 | }, 19 | "include": ["src/**/*", "scripts/**/*", "webpack.config.ts"] 20 | } 21 | -------------------------------------------------------------------------------- /xcode/KeeWeb Connect/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | @interface AppDelegate () 4 | 5 | @end 6 | 7 | @implementation AppDelegate 8 | 9 | - (void)applicationDidFinishLaunching:(NSNotification *)notification { 10 | // Insert code here to initialize your application 11 | } 12 | 13 | - (void)applicationWillTerminate:(NSNotification *)notification { 14 | // Insert code here to tear down your application 15 | } 16 | 17 | - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { 18 | return YES; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /src/common/content-script-interface.ts: -------------------------------------------------------------------------------- 1 | export interface ContentScriptMessageAutoFill { 2 | action: 'auto-fill'; 3 | url: string; 4 | text?: string; 5 | password?: string; 6 | submit: boolean; 7 | } 8 | 9 | export interface ContentScriptMessageGetNextAutoFillCommand { 10 | action: 'get-next-auto-fill-command'; 11 | url: string; 12 | } 13 | 14 | export type ContentScriptMessage = 15 | | ContentScriptMessageAutoFill 16 | | ContentScriptMessageGetNextAutoFillCommand; 17 | 18 | export interface ContentScriptReturn { 19 | nextCommand?: string; 20 | } 21 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [keeweb, antelle] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: keeweb 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # for example PayPal links 13 | -------------------------------------------------------------------------------- /src/background/transport/transport-base.ts: -------------------------------------------------------------------------------- 1 | import { TypedEmitter } from 'tiny-typed-emitter'; 2 | import { KeeWebConnectRequest, KeeWebConnectResponse } from 'background/protocol/types'; 3 | 4 | interface TransportBaseEvents { 5 | disconnected: () => void; 6 | message: (msg: KeeWebConnectResponse) => void; 7 | } 8 | 9 | abstract class TransportBase extends TypedEmitter { 10 | abstract connect(): Promise; 11 | abstract disconnect(): Promise; 12 | abstract request(message: KeeWebConnectRequest): void; 13 | abstract focusKeeWeb(): void; 14 | } 15 | 16 | export { TransportBase }; 17 | -------------------------------------------------------------------------------- /src/options/components/main-block.tsx: -------------------------------------------------------------------------------- 1 | import { ConnectionBlock } from './connect/connection-block'; 2 | import { FunctionComponent } from 'preact'; 3 | import { Shortcuts } from './shortcuts'; 4 | import { Footer } from './footer'; 5 | import { Usage } from './usage'; 6 | import { model } from 'options/settings-model'; 7 | import { BackendConnectionState } from 'common/backend-connection-state'; 8 | 9 | const MainBlock: FunctionComponent = () => { 10 | return ( 11 | <> 12 | 13 | {model.backendConnectionState === BackendConnectionState.Connected ? : null} 14 | 15 |