├── .browserslistrc ├── .distignore ├── .editorconfig ├── .eslintrc.json ├── .github └── workflows │ ├── node.js.yml │ └── publish.yml ├── .gitignore ├── .idea ├── .gitignore ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── externalDependencies.xml ├── git_toolbox_prj.xml ├── jsLibraryMappings.xml ├── modules.xml ├── obsidian-web-clipper.iml ├── runConfigurations │ ├── watch.xml │ ├── watch_angular.xml │ └── watch_package.xml ├── vcs.xml └── watcherTasks.xml ├── .prettierignore ├── .prettierrc ├── .yarn ├── plugins │ └── @yarnpkg │ │ ├── plugin-interactive-tools.cjs │ │ ├── plugin-typescript.cjs │ │ └── plugin-version.cjs └── releases │ └── yarn-3.3.0.cjs ├── .yarnrc.yml ├── LICENSE ├── README.md ├── angular.json ├── package.json ├── src ├── _locales │ ├── en │ │ └── messages.json │ └── zh_CN │ │ └── messages.json ├── action.ts ├── app │ ├── app-routing.module.ts │ ├── app.component.html │ ├── app.component.scss │ ├── app.component.ts │ ├── app.module.ts │ ├── article-extractor.service.ts │ ├── background │ │ ├── background-routing.module.ts │ │ ├── background.component.ts │ │ ├── background.module.ts │ │ ├── markdown.service.ts │ │ └── obsidian.service.ts │ ├── export-template.service.ts │ ├── extension.service.ts │ ├── i18n.pipe.ts │ ├── option.service.ts │ ├── options │ │ ├── general │ │ │ ├── general.component.html │ │ │ ├── general.component.scss │ │ │ └── general.component.ts │ │ ├── options-routing.module.ts │ │ ├── options.component.html │ │ ├── options.component.scss │ │ ├── options.component.ts │ │ ├── options.module.ts │ │ ├── rules │ │ │ ├── rules-routing.module.ts │ │ │ ├── rules.component.html │ │ │ ├── rules.component.scss │ │ │ ├── rules.component.ts │ │ │ └── rules.module.ts │ │ └── shortcuts │ │ │ ├── shortcuts.component.html │ │ │ ├── shortcuts.component.scss │ │ │ └── shortcuts.component.ts │ ├── rule.service.ts │ └── shared.module.ts ├── assets │ ├── .gitkeep │ └── default.template ├── content-scripts │ ├── background-listener.ts │ ├── browser.ts │ ├── error-action.ts │ ├── export-action.ts │ ├── index.ts │ ├── shortcuts.ts │ └── utils.ts ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── index.html ├── main.ts ├── manifest.json ├── polyfills.ts ├── production │ └── manifest.json ├── styles.scss └── template.d.ts ├── tsconfig.app.json ├── tsconfig.json ├── webpack.externals.cjs └── yarn.lock /.browserslistrc: -------------------------------------------------------------------------------- 1 | last 3 Firefox version 2 | Firefox ESR 3 | -------------------------------------------------------------------------------- /.distignore: -------------------------------------------------------------------------------- 1 | .git 2 | .github 3 | node_modules 4 | dist 5 | 6 | .yarn/install-state.gz 7 | .yarn/cache 8 | yarn-error.log 9 | 10 | .idea 11 | web-ext-artifacts 12 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "ignorePatterns": [ 4 | "projects/**/*" 5 | ], 6 | "overrides": [ 7 | { 8 | "files": [ 9 | "*.ts" 10 | ], 11 | "extends": [ 12 | "eslint:recommended", 13 | "plugin:@typescript-eslint/recommended", 14 | "plugin:unicorn/recommended", 15 | "plugin:prettier/recommended", 16 | "plugin:rxjs/recommended", 17 | "plugin:@angular-eslint/recommended" 18 | ], 19 | "rules": { 20 | "@angular-eslint/directive-selector": [ 21 | "error", 22 | { 23 | "type": "attribute", 24 | "prefix": "app", 25 | "style": "camelCase" 26 | } 27 | ], 28 | "@angular-eslint/component-selector": [ 29 | "error", 30 | { 31 | "type": "element", 32 | "prefix": "app", 33 | "style": "kebab-case" 34 | } 35 | ] 36 | } 37 | }, 38 | { 39 | "files": [ 40 | "*.html" 41 | ], 42 | "extends": [ 43 | "plugin:@angular-eslint/template/recommended" 44 | ], 45 | "rules": {} 46 | } 47 | ], 48 | "parserOptions": { 49 | "project": "./tsconfig.json" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- 1 | name: Node.js CI 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | branches: [main] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | - name: Use Node.js 16 15 | uses: actions/setup-node@v2 16 | with: 17 | node-version: 16 18 | cache: 'yarn' 19 | - run: yarn 20 | - run: yarn build:angular 21 | - run: yarn build:content 22 | - run: yarn lint 23 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish Firefox Addon 2 | 3 | on: 4 | workflow_dispatch: 5 | release: 6 | types: 7 | - released 8 | 9 | jobs: 10 | publish: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | - name: Use Node.js 16 15 | uses: actions/setup-node@v2 16 | with: 17 | node-version: 16 18 | cache: yarn 19 | - name: Compress src 20 | id: compress-src 21 | uses: byteever/action-build-zip@master 22 | with: 23 | filename: 'src.zip' 24 | - run: yarn 25 | - run: yarn build:angular 26 | - run: yarn build:content 27 | - run: yarn lint 28 | - name: "web-ext build" 29 | id: web-ext-build 30 | uses: kewisch/action-web-ext@v1 31 | with: 32 | cmd: build 33 | source: dist 34 | filename: "{name}-{version}.xpi" 35 | - name: "Upload Artifact" 36 | uses: actions/upload-artifact@v3 37 | with: 38 | name: addon.xpi 39 | path: ${{ steps.web-ext-build.outputs.target }} 40 | - name: "Publish" 41 | uses: SettingDust/publish-firefox-addon-action@master 42 | with: 43 | addonId: 'dust-obsidian-web-clipper' 44 | jwtIssuer: ${{ secrets.FIREFOX_JWT_ISSUER }} 45 | jwtSecret: ${{ secrets.FIREFOX_JWT_SECRET }} 46 | addonFile: ${{ steps.web-ext-build.outputs.target }} 47 | sourceFile: ${{ steps.compress-src.outputs.zip_path }} 48 | manifestFile: dist/manifest.json 49 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # Yarn 4 | /.yarn/* 5 | !/.yarn/patches 6 | !/.yarn/plugins 7 | !/.yarn/releases 8 | !/.yarn/sdks 9 | yarn-error.log 10 | 11 | # compiled output 12 | /dist 13 | /tmp 14 | /out-tsc 15 | # Only exists if Bazel was run 16 | /bazel-out 17 | 18 | # dependencies 19 | /node_modules 20 | 21 | # profiling files 22 | chrome-profiler-events*.json 23 | 24 | # IDEs and editors 25 | .project 26 | .classpath 27 | .c9/ 28 | *.launch 29 | .settings/ 30 | *.sublime-workspace 31 | 32 | # IDE - VSCode 33 | .vscode/* 34 | !.vscode/settings.json 35 | !.vscode/tasks.json 36 | !.vscode/launch.json 37 | !.vscode/extensions.json 38 | .history/* 39 | 40 | # misc 41 | /.angular/cache 42 | /.sass-cache 43 | /connect.lock 44 | /coverage 45 | /libpeerconnection.log 46 | npm-debug.log 47 | testem.log 48 | /typings 49 | 50 | # System Files 51 | .DS_Store 52 | Thumbs.db 53 | 54 | .secrets 55 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # 默认忽略的文件 2 | /shelf/ 3 | /workspace.xml 4 | # 基于编辑器的 HTTP 客户端请求 5 | /httpRequests/ 6 | discord.xml 7 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 18 | 19 | 21 | 22 | 31 | 32 | 35 | 36 | 43 | 44 | 51 | 52 | 59 | 60 | 65 | 66 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/externalDependencies.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/git_toolbox_prj.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 14 | 19 | 20 | -------------------------------------------------------------------------------- /.idea/jsLibraryMappings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/obsidian-web-clipper.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/runConfigurations/watch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |