├── .github
└── FUNDING.yml
├── public
├── favicon.ico
├── icons
│ ├── logo.png
│ ├── icon16_tag.png
│ ├── icon24_tag.png
│ ├── icon32_tag.png
│ ├── icon48_tag.png
│ ├── icon64_tag.png
│ ├── icon72_tag.png
│ ├── text-logo.png
│ ├── icon128_tag.png
│ ├── icon128_untag.png
│ ├── icon16_untag.png
│ ├── icon24_untag.png
│ ├── icon32_untag.png
│ ├── icon48_untag.png
│ ├── icon64_untag.png
│ ├── icon72_untag.png
│ └── ph_bookmark-simple.svg
└── _locales
│ ├── zh_CN
│ └── messages.json
│ └── en
│ └── messages.json
├── src
├── styles
│ └── tailwind.css
├── assets
│ ├── images
│ │ ├── logo.png
│ │ ├── icon16_tag.png
│ │ ├── icon24_tag.png
│ │ ├── icon32_tag.png
│ │ ├── icon48_tag.png
│ │ ├── icon64_tag.png
│ │ ├── icon72_tag.png
│ │ ├── text-logo.png
│ │ ├── icon128_tag.png
│ │ ├── icon128_untag.png
│ │ ├── icon16_untag.png
│ │ ├── icon24_untag.png
│ │ ├── icon32_untag.png
│ │ ├── icon48_untag.png
│ │ ├── icon64_untag.png
│ │ └── icon72_untag.png
│ └── icons
│ │ ├── bx_bx-radio-circle.svg
│ │ ├── ph_uncheck-square.svg
│ │ ├── bx_bx-radio-circle-marked.svg
│ │ ├── ph_folder-fill.svg
│ │ ├── ph_note-blank-fill.svg
│ │ ├── ph_caret-down.svg
│ │ ├── ph_bookmark-simple-fill.svg
│ │ ├── ph_caret-left-fill.svg
│ │ ├── ph_caret-up-fill.svg
│ │ ├── ph_caret-down-fill.svg
│ │ ├── ph_folder.svg
│ │ ├── ph_caret-right-fill.svg
│ │ ├── ph_heart-fill.svg
│ │ ├── ph_sticker-fill.svg
│ │ ├── ph_browser.svg
│ │ ├── ph_grid-four.svg
│ │ ├── ph_database-fill.svg
│ │ ├── ph_check.svg
│ │ ├── ph_caret-up.svg
│ │ ├── ph_copy-fill.svg
│ │ ├── ph_plus.svg
│ │ ├── ph_funnel-fill.svg
│ │ ├── ph_x.svg
│ │ ├── ph_note-blank.svg
│ │ ├── ph_bookmark-simple.svg
│ │ ├── ph_toggle-left-fill.svg
│ │ ├── ph_toggle-right-fill.svg
│ │ ├── ph_copy.svg
│ │ ├── ph_pencil-simple.svg
│ │ ├── ph_map-pin-fill.svg
│ │ ├── ph_pencil.svg
│ │ ├── ph_minus-circle-fill.svg
│ │ ├── ph_arrow-down-left.svg
│ │ ├── ph_funnel.svg
│ │ ├── ph_trash-simple.svg
│ │ ├── ph_database.svg
│ │ ├── ph_moon-fill.svg
│ │ ├── ph_folders-fill.svg
│ │ ├── ph_compass-fill.svg
│ │ ├── ph_check-circle-fill.svg
│ │ ├── ph_folder-minus-fill.svg
│ │ ├── ph_bookmarks-fill.svg
│ │ ├── ph_archive-fill.svg
│ │ ├── ph_house-fill.svg
│ │ ├── ph_folder-minus.svg
│ │ ├── ph_archive.svg
│ │ ├── ph_magnifying-glass.svg
│ │ ├── ph_list.svg
│ │ ├── ph_browsers.svg
│ │ ├── ph_folders.svg
│ │ ├── ph_house.svg
│ │ ├── ph_funnel-simple.svg
│ │ ├── ph_star-fill.svg
│ │ ├── ph_map-pin-line-fill.svg
│ │ ├── ph_caret-circle-up-fill.svg
│ │ ├── ph_check-square.svg
│ │ ├── ph_tag-fill.svg
│ │ ├── ph_bookmarks.svg
│ │ ├── ph_file-fill.svg
│ │ ├── ph_heart.svg
│ │ ├── akar-icons_github-fill.svg
│ │ ├── ph_push-pin-fill.svg
│ │ ├── ph_eraser.svg
│ │ ├── ph_caret-circle-right-fill.svg
│ │ ├── ph_sticker.svg
│ │ ├── ph_tag.svg
│ │ ├── ph_file.svg
│ │ ├── ph_minus-circle-1.svg
│ │ ├── ph_minus-circle.svg
│ │ ├── ph_check-square-fill.svg
│ │ ├── ph_package-fill.svg
│ │ ├── ph_cloud-check-fill.svg
│ │ ├── ph_package.svg
│ │ ├── ph_dots-three.svg
│ │ ├── ph_note-pencil-fill.svg
│ │ ├── ph_folder-plus-fill.svg
│ │ ├── ph_dots-three-vertical.svg
│ │ ├── ph_share-network-fill.svg
│ │ ├── ph_folder-plus.svg
│ │ ├── ph_caret-circle-left-fill.svg
│ │ ├── ph_caret-circle-down-fill.svg
│ │ ├── ph_note-pencil.svg
│ │ ├── ph_push-pin.svg
│ │ ├── ph_key-fill.svg
│ │ ├── ph_moon.svg
│ │ ├── ph_x-circle-fill.svg
│ │ ├── ph_compass.svg
│ │ ├── ph_crosshair-simple.svg
│ │ ├── ph_export-fill.svg
│ │ ├── ph_toggle-left.svg
│ │ ├── ph_toggle-right.svg
│ │ ├── ph_tree-structure-fill.svg
│ │ ├── ph_trash-fill.svg
│ │ ├── ph_map-pin.svg
│ │ ├── ph_trash.svg
│ │ ├── ph_check-circle.svg
│ │ ├── ph_magnifying-glass-minus.svg
│ │ ├── ph_plus-circle.svg
│ │ ├── ph_caret-circle-down.svg
│ │ ├── ph_caret-circle-right.svg
│ │ ├── ph_note-fill.svg
│ │ ├── ph_caret-circle-left.svg
│ │ ├── ph_cloud-slash-fill.svg
│ │ ├── ph_squares-four.svg
│ │ ├── ph_tree-structure.svg
│ │ ├── ph_planet.svg
│ │ ├── ph_note.svg
│ │ ├── ph_user.svg
│ │ ├── ph_x-circle.svg
│ │ ├── ph_faders-horizontal.svg
│ │ ├── ph_link-simple-horizontal.svg
│ │ ├── ph_caret-circle-up.svg
│ │ ├── ph_export.svg
│ │ ├── ph_folder-open-fill.svg
│ │ ├── ph_map-pin-line.svg
│ │ ├── ph_folder-open.svg
│ │ ├── ph_magnifying-glass-plus.svg
│ │ ├── ph_file-search.svg
│ │ ├── ph_question-fill.svg
│ │ ├── ph_arrow-bend-right-up.svg
│ │ ├── ph_list-dashes.svg
│ │ ├── ph_arrow-bend-left-up.svg
│ │ ├── ph_key.svg
│ │ ├── ph_cloud-check.svg
│ │ ├── ph_arrow-line-down-left.svg
│ │ ├── ph_list-bullets.svg
│ │ ├── ph_question.svg
│ │ └── ph_cloud-slash.svg
├── options.html
├── options
│ └── main.js
├── popup.html
├── popup
│ ├── main.js
│ └── components
│ │ ├── Browser
│ │ └── BookmarkFavicon.vue
│ │ └── Modal
│ │ ├── PopupHint.vue
│ │ └── PopupMenu.vue
├── manifest.json
└── composables
│ ├── useFolder.js
│ ├── useDatabase.js
│ └── useTab.js
├── .gitignore
├── postcss.config.js
├── .editorconfig
├── .vscode
└── settings.json
├── tailwind.config.js
├── index.html
├── .eslintrc.js
├── vite.config.js
├── package.json
└── LICENSE
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | ko_fi: benbinbin
2 | custom: https://afdian.net/a/benbinbin
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/src/styles/tailwind.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
6 | artifacts
7 | release
--------------------------------------------------------------------------------
/public/icons/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/icons/logo.png
--------------------------------------------------------------------------------
/public/icons/icon16_tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/icons/icon16_tag.png
--------------------------------------------------------------------------------
/public/icons/icon24_tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/icons/icon24_tag.png
--------------------------------------------------------------------------------
/public/icons/icon32_tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/icons/icon32_tag.png
--------------------------------------------------------------------------------
/public/icons/icon48_tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/icons/icon48_tag.png
--------------------------------------------------------------------------------
/public/icons/icon64_tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/icons/icon64_tag.png
--------------------------------------------------------------------------------
/public/icons/icon72_tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/icons/icon72_tag.png
--------------------------------------------------------------------------------
/public/icons/text-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/icons/text-logo.png
--------------------------------------------------------------------------------
/src/assets/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/src/assets/images/logo.png
--------------------------------------------------------------------------------
/public/icons/icon128_tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/icons/icon128_tag.png
--------------------------------------------------------------------------------
/public/icons/icon128_untag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/icons/icon128_untag.png
--------------------------------------------------------------------------------
/public/icons/icon16_untag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/icons/icon16_untag.png
--------------------------------------------------------------------------------
/public/icons/icon24_untag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/icons/icon24_untag.png
--------------------------------------------------------------------------------
/public/icons/icon32_untag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/icons/icon32_untag.png
--------------------------------------------------------------------------------
/public/icons/icon48_untag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/icons/icon48_untag.png
--------------------------------------------------------------------------------
/public/icons/icon64_untag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/icons/icon64_untag.png
--------------------------------------------------------------------------------
/public/icons/icon72_untag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/public/icons/icon72_untag.png
--------------------------------------------------------------------------------
/src/assets/images/icon16_tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/src/assets/images/icon16_tag.png
--------------------------------------------------------------------------------
/src/assets/images/icon24_tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/src/assets/images/icon24_tag.png
--------------------------------------------------------------------------------
/src/assets/images/icon32_tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/src/assets/images/icon32_tag.png
--------------------------------------------------------------------------------
/src/assets/images/icon48_tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/src/assets/images/icon48_tag.png
--------------------------------------------------------------------------------
/src/assets/images/icon64_tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/src/assets/images/icon64_tag.png
--------------------------------------------------------------------------------
/src/assets/images/icon72_tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/src/assets/images/icon72_tag.png
--------------------------------------------------------------------------------
/src/assets/images/text-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/src/assets/images/text-logo.png
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/src/assets/images/icon128_tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/src/assets/images/icon128_tag.png
--------------------------------------------------------------------------------
/src/assets/images/icon128_untag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/src/assets/images/icon128_untag.png
--------------------------------------------------------------------------------
/src/assets/images/icon16_untag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/src/assets/images/icon16_untag.png
--------------------------------------------------------------------------------
/src/assets/images/icon24_untag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/src/assets/images/icon24_untag.png
--------------------------------------------------------------------------------
/src/assets/images/icon32_untag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/src/assets/images/icon32_untag.png
--------------------------------------------------------------------------------
/src/assets/images/icon48_untag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/src/assets/images/icon48_untag.png
--------------------------------------------------------------------------------
/src/assets/images/icon64_untag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/src/assets/images/icon64_untag.png
--------------------------------------------------------------------------------
/src/assets/images/icon72_untag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Benbinbin/TagDown/HEAD/src/assets/images/icon72_untag.png
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | [*.{js,jsx,ts,tsx,vue}]
2 | indent_style = space
3 | indent_size = 2
4 | end_of_line = lf
5 | trim_trailing_whitespace = true
6 | insert_final_newline = true
7 | max_line_length = 100
8 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "editor.codeActionsOnSave": {
3 | "source.fixAll.eslint": true
4 | },
5 | "eslint.validate": [
6 | "javascript",
7 | "vue"
8 | ],
9 | "files.eol": "\n",
10 | }
--------------------------------------------------------------------------------
/tailwind.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | mode: 'jit',
3 | purge: ['./src/**/*.{vue,js,ts,jsx,tsx}'],
4 | darkMode: false, // or 'media' or 'class'
5 | theme: {
6 | extend: {},
7 | },
8 | variants: {
9 | extend: {},
10 | },
11 | plugins: [],
12 | };
13 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Vite App
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/public/_locales/zh_CN/messages.json:
--------------------------------------------------------------------------------
1 | {
2 | "appTitle": {
3 | "message": "TagDown",
4 | "description": "扩展程序的名称"
5 | },
6 | "appDescription": {
7 | "message": "TagDown 是一个管理书签的浏览器扩展,可以更快捷、方便地浏览书签",
8 | "description": "扩展程序的描述"
9 | },
10 | "actionTitle": {
11 | "message": "TagDown",
12 | "description": "当鼠标悬停在浏览器工具栏的扩展程序图标时会显示的内容"
13 | }
14 | }
--------------------------------------------------------------------------------
/src/options.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Options Page
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | env: {
3 | browser: true,
4 | es2021: true,
5 | node: true,
6 | },
7 | extends: [
8 | 'plugin:vue/vue3-recommended',
9 | 'airbnb-base',
10 | ],
11 | parserOptions: {
12 | ecmaVersion: 12,
13 | sourceType: 'module',
14 | },
15 | plugins: [
16 | 'vue',
17 | ],
18 | rules: {
19 | 'max-len': 0,
20 | // 'no-undef': 0,
21 | },
22 | };
23 |
--------------------------------------------------------------------------------
/src/assets/icons/bx_bx-radio-circle.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/options/main.js:
--------------------------------------------------------------------------------
1 | import Dexie from 'dexie';
2 | import { createApp } from 'vue';
3 | import App from './App.vue';
4 | import '@/styles/tailwind.css';
5 |
6 | const app = createApp(App);
7 |
8 | const db = new Dexie('tagdown');
9 | db.version(1).stores({
10 | bookmark: 'id, *tags, *groups',
11 | share: 'id',
12 | star: 'id',
13 | });
14 | db.open().then((database) => {
15 | app.provide('db', database);
16 | app.mount('#app');
17 | }).catch((err) => {
18 | // Error occurred
19 | console.log(err);
20 | });
21 |
--------------------------------------------------------------------------------
/src/popup.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Default Popup
9 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/popup/main.js:
--------------------------------------------------------------------------------
1 | import Dexie from 'dexie';
2 | import { createApp } from 'vue';
3 | import App from './App.vue';
4 | import '@/styles/tailwind.css';
5 |
6 | const app = createApp(App);
7 |
8 | const db = new Dexie('tagdown');
9 | db.version(1).stores({
10 | bookmark: 'id, *tags, *groups',
11 | share: 'id, share',
12 | star: 'id, star',
13 | });
14 | db.open().then((database) => {
15 | app.provide('db', database);
16 | app.mount('#app');
17 | }).catch((err) => {
18 | // Error occurred
19 | console.log(err);
20 | });
21 |
--------------------------------------------------------------------------------
/public/_locales/en/messages.json:
--------------------------------------------------------------------------------
1 | {
2 | "appTitle": {
3 | "message": "TagDown",
4 | "description": "The title of this chrome extension"
5 | },
6 | "appDescription": {
7 | "message": "TagDown is a browser extension to manage bookmarks, you can browse the bookmarks more faster and conveniently.",
8 | "description": "the description of this chrome extension"
9 | },
10 | "actionTitle": {
11 | "message": "TagDown",
12 | "description": "the content show when mouse hover the icon of this chrome extension in browser toolbar"
13 | }
14 | }
--------------------------------------------------------------------------------
/vite.config.js:
--------------------------------------------------------------------------------
1 | import { resolve } from 'path';
2 | import { defineConfig } from 'vite';
3 | import commonjs from '@rollup/plugin-commonjs';
4 | import vue from '@vitejs/plugin-vue';
5 | import { crx3 } from 'vite-plugin-vue-crx3';
6 |
7 | // https://vitejs.dev/config/
8 | export default defineConfig({
9 | resolve: {
10 | alias: {
11 | '@': resolve(__dirname, 'src'),
12 | },
13 | },
14 | plugins: [commonjs(), vue(), crx3()],
15 | build: {
16 | target: 'es2015',
17 | rollupOptions: {
18 | input: resolve(__dirname, 'src/manifest.json'),
19 | },
20 | },
21 | });
22 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_uncheck-square.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/bx_bx-radio-circle-marked.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_folder-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_note-blank-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_caret-down.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_bookmark-simple-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_caret-left-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_caret-up-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_caret-down-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_folder.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_caret-right-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_heart-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_sticker-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_browser.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_grid-four.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_database-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_check.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_caret-up.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_copy-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_plus.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_funnel-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_x.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/popup/components/Browser/BookmarkFavicon.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
37 |
40 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_note-blank.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/public/icons/ph_bookmark-simple.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_bookmark-simple.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tagdown",
3 | "version": "2.0.0",
4 | "scripts": {
5 | "dev": "vite",
6 | "build": "vite build",
7 | "serve": "vite preview",
8 | "watch": "vite build --watch"
9 | },
10 | "dependencies": {
11 | "d3": "^7.0.1",
12 | "dexie": "^3.0.3",
13 | "dexie-export-import": "^1.0.3",
14 | "vue": "^3.2.6",
15 | "webdav": "^4.7.0"
16 | },
17 | "devDependencies": {
18 | "@rollup/plugin-commonjs": "^21.0.0",
19 | "@vitejs/plugin-vue": "^1.6.0",
20 | "@vue/compiler-sfc": "^3.2.6",
21 | "autoprefixer": "^10.3.4",
22 | "eslint": "^7.32.0",
23 | "eslint-config-airbnb-base": "^14.2.1",
24 | "eslint-plugin-import": "^2.24.2",
25 | "eslint-plugin-vue": "^7.17.0",
26 | "postcss": "^8.3.6",
27 | "sass": "^1.39.0",
28 | "tailwindcss": "^2.2.9",
29 | "vite": "^2.5.2",
30 | "vite-plugin-vue-crx3": "^1.0.8"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_toggle-left-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_toggle-right-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_copy.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_pencil-simple.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_map-pin-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_pencil.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_minus-circle-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/popup/components/Modal/PopupHint.vue:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
20 |
21 |
39 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_arrow-down-left.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_funnel.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_trash-simple.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_database.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_moon-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_folders-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 BenThomson
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 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_compass-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_check-circle-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_folder-minus-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_bookmarks-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_archive-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_house-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_folder-minus.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_archive.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_magnifying-glass.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_list.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_browsers.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_folders.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_house.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_funnel-simple.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_star-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "__MSG_appTitle__",
3 | "manifest_version": 3,
4 | "version": "2.0.0",
5 | "description": "__MSG_appDescription__",
6 | "permissions": [
7 | "bookmarks",
8 | "tabs",
9 | "storage"
10 | ],
11 | "host_permissions": [
12 | "https://dav.jianguoyun.com/dav/"
13 | ],
14 | "background": {
15 | "service_worker": "./background/main.js",
16 | "type": "module"
17 | },
18 | "action": {
19 | "default_title": "__MSG_actionTitle__",
20 | "default_popup": "./popup.html",
21 | "default_icon": {
22 | "16": "./assets/images/icon16_untag.png",
23 | "32": "./assets/images/icon32_untag.png",
24 | "48": "./assets/images/icon48_untag.png",
25 | "64": "./assets/images/icon64_untag.png",
26 | "128": "./assets/images/icon128_untag.png"
27 | }
28 | },
29 | "options_page": "./options.html",
30 | "icons": {
31 | "16": "./assets/images/icon16_tag.png",
32 | "32": "./assets/images/icon32_tag.png",
33 | "48": "./assets/images/icon48_tag.png",
34 | "64": "./assets/images/icon64_tag.png",
35 | "128": "./assets/images/icon128_tag.png"
36 | },
37 | "default_locale": "zh_CN"
38 | }
--------------------------------------------------------------------------------
/src/assets/icons/ph_map-pin-line-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_caret-circle-up-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_check-square.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_tag-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_bookmarks.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_file-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_heart.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/akar-icons_github-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_push-pin-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_eraser.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_caret-circle-right-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_sticker.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_tag.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_file.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_minus-circle-1.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_minus-circle.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_check-square-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/composables/useFolder.js:
--------------------------------------------------------------------------------
1 | import { inject } from 'vue';
2 |
3 | export default function useFolder() {
4 | const db = inject('db');
5 |
6 | const setFolderStar = async (id, star) => {
7 | await db.star.put({
8 | id,
9 | star: star ? 1 : 0,
10 | type: 'folder',
11 | });
12 | };
13 |
14 | const getFolderStar = async (id) => {
15 | const result = await db.star.get(id);
16 | if (result) return Boolean(result.star);
17 | return undefined;
18 | };
19 |
20 | const deleteFolderStar = async (id) => {
21 | await db.star.delete(id);
22 | };
23 |
24 | // create new folder
25 | const createFolder = async (parentId, folderName) => {
26 | // console.log('create new folder');
27 | const folder = await chrome.bookmarks.create({
28 | title: folderName,
29 | parentId,
30 | });
31 | return folder;
32 | };
33 |
34 | // rename folder
35 | const renameFolder = async (nodeId, newName) => {
36 | const folder = await chrome.bookmarks.update(nodeId, {
37 | title: newName,
38 | });
39 |
40 | await setFolderStar(folder.id, false);
41 |
42 | return folder;
43 | };
44 |
45 | // delete folder
46 | const deleteFolder = async (nodeId) => {
47 | await chrome.bookmarks.removeTree(nodeId);
48 | await deleteFolderStar(nodeId);
49 | };
50 |
51 | return {
52 | setFolderStar,
53 | getFolderStar,
54 | createFolder,
55 | renameFolder,
56 | deleteFolder,
57 | };
58 | }
59 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_package-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_cloud-check-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_package.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_dots-three.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_note-pencil-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_folder-plus-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_dots-three-vertical.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_share-network-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_folder-plus.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_caret-circle-left-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_caret-circle-down-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_note-pencil.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_push-pin.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_key-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_moon.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_x-circle-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_compass.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_crosshair-simple.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_export-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/composables/useDatabase.js:
--------------------------------------------------------------------------------
1 | import { openDB } from 'idb';
2 |
3 | const useDatabase = {
4 | // get the existed database or create a new database in IndexedDb
5 | getDatabase: async (databaseName, version, storeName, keyName, indexName, fieldAsIndex, isUnique = false, isMultiEntry = false) => openDB(databaseName, version, {
6 | // upgrade or init database
7 | upgrade(db) {
8 | let store;
9 | if (keyName) {
10 | store = db.createObjectStore(storeName, { keyPath: keyName });
11 | } else {
12 | store = db.createObjectStore(storeName);
13 | }
14 | if (store && indexName) {
15 | store.createIndex(indexName, fieldAsIndex, { unique: isUnique, multiEntry: isMultiEntry });
16 | }
17 | },
18 | }),
19 | getAllData: async (db, storeName) => {
20 | const result = await db.getAll(storeName);
21 | return result;
22 | },
23 | getDataByKey: async (db, storeName, queryKey) => {
24 | const result = await db.get(storeName, queryKey);
25 | return result;
26 | },
27 | getAllDataInIndex: async (db, storeName, indexName) => {
28 | const result = await db.getAllFromIndex(storeName, indexName);
29 | return result;
30 | },
31 | getDataByIndex: async (db, storeName, indexName, indexValue) => {
32 | const result = await db.getAllFromIndex(storeName, indexName, indexValue);
33 | return result;
34 | },
35 | setData: async (db, storeName, val) => {
36 | await db.put(storeName, val);
37 | },
38 | delDataByKey: async (db, storeName, key) => {
39 | await db.delete(storeName, key);
40 | },
41 | clearAllData: async (db, storeName) => {
42 | await db.clear(storeName);
43 | },
44 | };
45 |
46 | export default useDatabase;
47 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_toggle-left.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_toggle-right.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_tree-structure-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_trash-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_map-pin.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_trash.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_check-circle.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_magnifying-glass-minus.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_plus-circle.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_caret-circle-down.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_caret-circle-right.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_note-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_caret-circle-left.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_cloud-slash-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_squares-four.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_tree-structure.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_planet.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_note.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_user.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_x-circle.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/popup/components/Modal/PopupMenu.vue:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
66 |
67 |
69 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_faders-horizontal.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_link-simple-horizontal.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_caret-circle-up.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_export.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_folder-open-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_map-pin-line.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_folder-open.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_magnifying-glass-plus.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_file-search.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_question-fill.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_arrow-bend-right-up.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_list-dashes.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_arrow-bend-left-up.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/composables/useTab.js:
--------------------------------------------------------------------------------
1 | export default function useTab() {
2 | // get current active tab
3 | const getActiveTab = async () => {
4 | const [tab] = await chrome.tabs.query({
5 | active: true,
6 | currentWindow: true,
7 | });
8 | return tab;
9 | };
10 |
11 | // create new tab
12 | const createNewTab = async (active = true) => {
13 | const newTab = await chrome.tabs.create({
14 | active,
15 | });
16 | return newTab;
17 | };
18 |
19 | // open bookmark on current tab or new tab
20 | const openBookmark = (nodeId, mode = 'new', active = true) => new Promise((resolve, reject) => {
21 | chrome.bookmarks.get(nodeId)
22 | .then(async (nodes) => {
23 | const { url } = nodes[0];
24 | let tab;
25 | if (mode === 'new') {
26 | // open on new tab
27 | tab = await createNewTab(active);
28 | } else if (mode === 'current') {
29 | // open on current active tab
30 | tab = await getActiveTab();
31 | }
32 | await chrome.tabs.update(tab.id, {
33 | url,
34 | });
35 | resolve(tab);
36 | });
37 | });
38 |
39 | // get all tab groups
40 | const getAllTabGroups = async () => {
41 | const tabGroups = await chrome.tabGroups.query({
42 | windowId: chrome.windows.WINDOW_ID_CURRENT,
43 | });
44 | return tabGroups;
45 | };
46 |
47 | const watchTabGroups = (callback) => {
48 | chrome.tabGroups.onCreated.addListener(callback);
49 | chrome.tabGroups.onRemoved.addListener(callback);
50 | chrome.tabGroups.onUpdated.addListener(callback);
51 | };
52 |
53 | // create a group with tab
54 | const createTabInGroup = async (tabId, group) => {
55 | const groupId = await chrome.tabs.group({
56 | tabIds: tabId,
57 | });
58 |
59 | await chrome.tabGroups.update(groupId, {
60 | color: group.color,
61 | title: group.title,
62 | });
63 |
64 | return groupId;
65 | };
66 |
67 | // open bookmark in a group
68 | const openBookmarkOnGroup = async (nodeId, groupId) => {
69 | const tab = await openBookmark(nodeId, 'new', false);
70 | await chrome.tabs.group({
71 | groupId,
72 | tabIds: tab.id,
73 | });
74 | return tab;
75 | };
76 |
77 | return {
78 | getActiveTab,
79 | createNewTab,
80 | openBookmark,
81 | getAllTabGroups,
82 | watchTabGroups,
83 | createTabInGroup,
84 | openBookmarkOnGroup,
85 | };
86 | }
87 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_key.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_cloud-check.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_arrow-line-down-left.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_list-bullets.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_question.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/ph_cloud-slash.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------