mirror of
https://github.com/obsqrbtz/goose-highlighter.git
synced 2026-04-09 20:47:53 +03:00
Compare commits
15 Commits
list_manag
...
v1.13.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4349863a6b | ||
| b4e1425c79 | |||
| 81acf7b0ab | |||
| 7195a3b41b | |||
| 289fdd9257 | |||
| 226f2efe4f | |||
| 4932b20991 | |||
| 26e3bac589 | |||
| 068013486a | |||
| 05209cd049 | |||
|
|
576ab77fe6 | ||
| 3e00090ac9 | |||
|
|
4d87f9d4a1 | ||
| 5e3e2bbfe4 | |||
| 8a44ad8022 |
2
.github/workflows/publish-extension.yml
vendored
2
.github/workflows/publish-extension.yml
vendored
@@ -38,7 +38,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create zip package
|
- name: Create zip package
|
||||||
run: |
|
run: |
|
||||||
zip -r goose-highlighter.zip . -x '*.git*' 'node_modules/*' 'src/*' 'scripts/*' 'versioning.md' '.releaserc.json' 'package.json' 'package-lock.json' 'README.md' 'tsconfig.json' 'eslint.config.mjs'
|
zip -r goose-highlighter.zip . -x '*.git*' 'node_modules/*' 'src/*' 'scripts/*' 'versioning.md' '.releaserc.json' 'package.json' 'package-lock.json' 'README.md' 'tsconfig.json' 'eslint.config.mjs' 'sample-import-config.json'
|
||||||
|
|
||||||
- name: Install webstore upload CLI
|
- name: Install webstore upload CLI
|
||||||
run: npm install -g chrome-webstore-upload-cli
|
run: npm install -g chrome-webstore-upload-cli
|
||||||
|
|||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
|||||||
zip -r goose-highlighter-${{ steps.version.outputs.VERSION }}.zip . \
|
zip -r goose-highlighter-${{ steps.version.outputs.VERSION }}.zip . \
|
||||||
-x '*.git*' 'node_modules/*' 'src/*' 'scripts/*' 'versioning.md' '.releaserc.json' \
|
-x '*.git*' 'node_modules/*' 'src/*' 'scripts/*' 'versioning.md' '.releaserc.json' \
|
||||||
'package.json' 'package-lock.json' 'README.md' 'tsconfig.json' \
|
'package.json' 'package-lock.json' 'README.md' 'tsconfig.json' \
|
||||||
'eslint.config.mjs' '.github/*' 'CHANGELOG.md' 'PRIVACY.MD'
|
'eslint.config.mjs' '.github/*' 'CHANGELOG.md' 'PRIVACY.MD' 'sample-import-config.json'
|
||||||
|
|
||||||
- name: Install Chrome extension packaging tool
|
- name: Install Chrome extension packaging tool
|
||||||
run: npm install -g crx3
|
run: npm install -g crx3
|
||||||
|
|||||||
28
CHANGELOG.md
28
CHANGELOG.md
@@ -1,3 +1,31 @@
|
|||||||
|
# [1.13.0](https://github.com/obsqrbtz/goose-highlighter/compare/v1.12.1...v1.13.0) (2026-02-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* exceptions page ui fixes ([226f2ef](https://github.com/obsqrbtz/goose-highlighter/commit/226f2efe4f20a041bc6323694d985c5dfe6857aa))
|
||||||
|
* incorrect behaviour of filter chips after pressing select all ([b4e1425](https://github.com/obsqrbtz/goose-highlighter/commit/b4e1425c790fdbb9fc8f1558a759dd9bba5617ed))
|
||||||
|
* only show filter buttons for list with 1+ matches ([7195a3b](https://github.com/obsqrbtz/goose-highlighter/commit/7195a3b41bb9dd804c0b7f716c20eb9bdc5ac3f9))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* group and filter items by list in "on page" section ([0680134](https://github.com/obsqrbtz/goose-highlighter/commit/068013486a43ed2329602e88ae6d365eebac0bf9))
|
||||||
|
|
||||||
|
## [1.12.1](https://github.com/obsqrbtz/goose-highlighter/compare/v1.12.0...v1.12.1) (2026-02-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* permissions ([3e00090](https://github.com/obsqrbtz/goose-highlighter/commit/3e00090ac91ec58f08a46ac9dc826935a0e7085e))
|
||||||
|
|
||||||
|
# [1.12.0](https://github.com/obsqrbtz/goose-highlighter/compare/v1.11.0...v1.12.0) (2026-02-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* list management ([5e3e2bb](https://github.com/obsqrbtz/goose-highlighter/commit/5e3e2bbfe40bf3fcceeb4a5de88024ecc6987973))
|
||||||
|
|
||||||
# [1.11.0](https://github.com/obsqrbtz/goose-highlighter/compare/v1.10.2...v1.11.0) (2025-12-11)
|
# [1.11.0](https://github.com/obsqrbtz/goose-highlighter/compare/v1.10.2...v1.11.0) (2025-12-11)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
"message": "Wörter hinzufügen"
|
"message": "Wörter hinzufügen"
|
||||||
},
|
},
|
||||||
"select_all": {
|
"select_all": {
|
||||||
"message": "Auswählen"
|
"message": "Alle auswählen"
|
||||||
},
|
},
|
||||||
"delete_selected": {
|
"delete_selected": {
|
||||||
"message": "Ausgewählte löschen"
|
"message": "Ausgewählte löschen"
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"message": "Möchten Sie die ausgewählten Wörter wirklich löschen?"
|
"message": "Möchten Sie die ausgewählten Wörter wirklich löschen?"
|
||||||
},
|
},
|
||||||
"deselect_all": {
|
"deselect_all": {
|
||||||
"message": "Abwählen"
|
"message": "Alle abwählen"
|
||||||
},
|
},
|
||||||
"highlight_lists": {
|
"highlight_lists": {
|
||||||
"message": "Hervorhebungslisten"
|
"message": "Hervorhebungslisten"
|
||||||
@@ -116,9 +116,19 @@
|
|||||||
"manage_exceptions": {
|
"manage_exceptions": {
|
||||||
"message": "Verwalten"
|
"message": "Verwalten"
|
||||||
},
|
},
|
||||||
|
"exceptions_mode": { "message": "Modus:" },
|
||||||
|
"exceptions_mode_blacklist": { "message": "Blacklist — auf diesen Sites nicht hervorheben" },
|
||||||
|
"exceptions_mode_whitelist": { "message": "Whitelist — nur auf diesen Sites hervorheben" },
|
||||||
|
"exceptions_mode_option_blacklist": { "message": "Blacklist" },
|
||||||
|
"exceptions_mode_option_whitelist": { "message": "Whitelist" },
|
||||||
|
"exceptions_mode_hint_blacklist": { "message": "Auf diesen Sites nicht hervorheben." },
|
||||||
|
"exceptions_mode_hint_whitelist": { "message": "Nur auf diesen Sites hervorheben." },
|
||||||
"exceptions_list": {
|
"exceptions_list": {
|
||||||
"message": "Ausnahme-Websites:"
|
"message": "Ausnahme-Websites:"
|
||||||
},
|
},
|
||||||
|
"exceptions_list_blacklist": { "message": "Sites ausschließen (Blacklist):" },
|
||||||
|
"exceptions_list_whitelist": { "message": "Sites einschließen (Whitelist):" },
|
||||||
|
"add_current_site": { "message": "Aktuelle Website hinzufügen" },
|
||||||
"clear_all": {
|
"clear_all": {
|
||||||
"message": "Alle löschen"
|
"message": "Alle löschen"
|
||||||
},
|
},
|
||||||
@@ -167,6 +177,15 @@
|
|||||||
"total_highlights": {
|
"total_highlights": {
|
||||||
"message": "Gesamt"
|
"message": "Gesamt"
|
||||||
},
|
},
|
||||||
|
"total_matches": {
|
||||||
|
"message": "Treffer gesamt"
|
||||||
|
},
|
||||||
|
"group_by_list": {
|
||||||
|
"message": "Nach Liste gruppieren"
|
||||||
|
},
|
||||||
|
"other": {
|
||||||
|
"message": "Sonstige"
|
||||||
|
},
|
||||||
"refresh": {
|
"refresh": {
|
||||||
"message": "Aktualisieren"
|
"message": "Aktualisieren"
|
||||||
},
|
},
|
||||||
@@ -322,5 +341,17 @@
|
|||||||
},
|
},
|
||||||
"rename_list": {
|
"rename_list": {
|
||||||
"message": "Liste umbenennen"
|
"message": "Liste umbenennen"
|
||||||
|
},
|
||||||
|
"export_settings": {
|
||||||
|
"message": "Exportieren"
|
||||||
|
},
|
||||||
|
"import_settings": {
|
||||||
|
"message": "Importieren"
|
||||||
|
},
|
||||||
|
"export_import_settings_label": {
|
||||||
|
"message": "Export / Import"
|
||||||
|
},
|
||||||
|
"export_import_settings_hint": {
|
||||||
|
"message": "Listen und Website-Ausnahmen sichern oder wiederherstellen."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"message": "Add Words"
|
"message": "Add Words"
|
||||||
},
|
},
|
||||||
"select_all": {
|
"select_all": {
|
||||||
"message": "Select"
|
"message": "Select all"
|
||||||
},
|
},
|
||||||
"delete_selected": {
|
"delete_selected": {
|
||||||
"message": "Delete selected"
|
"message": "Delete selected"
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"message": "Are you sure you want to delete the selected words?"
|
"message": "Are you sure you want to delete the selected words?"
|
||||||
},
|
},
|
||||||
"deselect_all": {
|
"deselect_all": {
|
||||||
"message": "Deselect"
|
"message": "Deselect all"
|
||||||
},
|
},
|
||||||
"highlight_lists": {
|
"highlight_lists": {
|
||||||
"message": "Highlight Lists"
|
"message": "Highlight Lists"
|
||||||
@@ -122,11 +122,41 @@
|
|||||||
"manage_exceptions": {
|
"manage_exceptions": {
|
||||||
"message": "Manage"
|
"message": "Manage"
|
||||||
},
|
},
|
||||||
|
"exceptions_mode": {
|
||||||
|
"message": "Mode:"
|
||||||
|
},
|
||||||
|
"exceptions_mode_blacklist": {
|
||||||
|
"message": "Blacklist — don't highlight on these sites"
|
||||||
|
},
|
||||||
|
"exceptions_mode_whitelist": {
|
||||||
|
"message": "Whitelist — only highlight on these sites"
|
||||||
|
},
|
||||||
|
"exceptions_mode_option_blacklist": {
|
||||||
|
"message": "Blacklist"
|
||||||
|
},
|
||||||
|
"exceptions_mode_option_whitelist": {
|
||||||
|
"message": "Whitelist"
|
||||||
|
},
|
||||||
|
"exceptions_mode_hint_blacklist": {
|
||||||
|
"message": "Don't highlight on these sites."
|
||||||
|
},
|
||||||
|
"exceptions_mode_hint_whitelist": {
|
||||||
|
"message": "Only highlight on these sites."
|
||||||
|
},
|
||||||
"exceptions_list": {
|
"exceptions_list": {
|
||||||
"message": "Exception Sites:"
|
"message": "Exception Sites:"
|
||||||
},
|
},
|
||||||
|
"exceptions_list_blacklist": {
|
||||||
|
"message": "Sites to exclude (blacklist):"
|
||||||
|
},
|
||||||
|
"exceptions_list_whitelist": {
|
||||||
|
"message": "Sites to include (whitelist):"
|
||||||
|
},
|
||||||
|
"add_current_site": {
|
||||||
|
"message": "Add current site"
|
||||||
|
},
|
||||||
"clear_all": {
|
"clear_all": {
|
||||||
"message": "Clear All"
|
"message": "Clear all"
|
||||||
},
|
},
|
||||||
"confirm_clear_exceptions": {
|
"confirm_clear_exceptions": {
|
||||||
"message": "Are you sure you want to clear all exceptions?"
|
"message": "Are you sure you want to clear all exceptions?"
|
||||||
@@ -173,6 +203,18 @@
|
|||||||
"total_highlights": {
|
"total_highlights": {
|
||||||
"message": "Total"
|
"message": "Total"
|
||||||
},
|
},
|
||||||
|
"total_matches": {
|
||||||
|
"message": "Total matches"
|
||||||
|
},
|
||||||
|
"group_by_list": {
|
||||||
|
"message": "Group by list"
|
||||||
|
},
|
||||||
|
"other": {
|
||||||
|
"message": "Other"
|
||||||
|
},
|
||||||
|
"exception_domain_placeholder": {
|
||||||
|
"message": "example.com"
|
||||||
|
},
|
||||||
"refresh": {
|
"refresh": {
|
||||||
"message": "Refresh"
|
"message": "Refresh"
|
||||||
},
|
},
|
||||||
@@ -358,5 +400,17 @@
|
|||||||
},
|
},
|
||||||
"close": {
|
"close": {
|
||||||
"message": "Close"
|
"message": "Close"
|
||||||
|
},
|
||||||
|
"export_settings": {
|
||||||
|
"message": "Export"
|
||||||
|
},
|
||||||
|
"import_settings": {
|
||||||
|
"message": "Import"
|
||||||
|
},
|
||||||
|
"export_import_settings_label": {
|
||||||
|
"message": "Export / Import"
|
||||||
|
},
|
||||||
|
"export_import_settings_hint": {
|
||||||
|
"message": "Back up or restore lists and site exceptions."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,8 +35,8 @@
|
|||||||
"apply_paste": {
|
"apply_paste": {
|
||||||
"message": "Agregar palabras"
|
"message": "Agregar palabras"
|
||||||
},
|
},
|
||||||
"select_all": {
|
"select_all": {
|
||||||
"message": "Seleccionar"
|
"message": "Seleccionar todo"
|
||||||
},
|
},
|
||||||
"delete_selected": {
|
"delete_selected": {
|
||||||
"message": "Eliminar seleccionados"
|
"message": "Eliminar seleccionados"
|
||||||
@@ -77,8 +77,8 @@
|
|||||||
"confirm_delete_words": {
|
"confirm_delete_words": {
|
||||||
"message": "¿Estás seguro de que deseas eliminar las palabras seleccionadas?"
|
"message": "¿Estás seguro de que deseas eliminar las palabras seleccionadas?"
|
||||||
},
|
},
|
||||||
"deselect_all": {
|
"deselect_all": {
|
||||||
"message": "Deseleccionar"
|
"message": "Deseleccionar todo"
|
||||||
},
|
},
|
||||||
"highlight_lists": {
|
"highlight_lists": {
|
||||||
"message": "Listas de resaltado"
|
"message": "Listas de resaltado"
|
||||||
@@ -122,9 +122,19 @@
|
|||||||
"manage_exceptions": {
|
"manage_exceptions": {
|
||||||
"message": "Gestionar"
|
"message": "Gestionar"
|
||||||
},
|
},
|
||||||
|
"exceptions_mode": { "message": "Modo:" },
|
||||||
|
"exceptions_mode_blacklist": { "message": "Lista negra — no resaltar en estos sitios" },
|
||||||
|
"exceptions_mode_whitelist": { "message": "Lista blanca — solo resaltar en estos sitios" },
|
||||||
|
"exceptions_mode_option_blacklist": { "message": "Lista negra" },
|
||||||
|
"exceptions_mode_option_whitelist": { "message": "Lista blanca" },
|
||||||
|
"exceptions_mode_hint_blacklist": { "message": "No resaltar en estos sitios." },
|
||||||
|
"exceptions_mode_hint_whitelist": { "message": "Solo resaltar en estos sitios." },
|
||||||
"exceptions_list": {
|
"exceptions_list": {
|
||||||
"message": "Sitios de excepción:"
|
"message": "Sitios de excepción:"
|
||||||
},
|
},
|
||||||
|
"exceptions_list_blacklist": { "message": "Sitios a excluir (lista negra):" },
|
||||||
|
"exceptions_list_whitelist": { "message": "Sitios a incluir (lista blanca):" },
|
||||||
|
"add_current_site": { "message": "Añadir sitio actual" },
|
||||||
"clear_all": {
|
"clear_all": {
|
||||||
"message": "Limpiar todo"
|
"message": "Limpiar todo"
|
||||||
},
|
},
|
||||||
@@ -173,6 +183,15 @@
|
|||||||
"total_highlights": {
|
"total_highlights": {
|
||||||
"message": "Total"
|
"message": "Total"
|
||||||
},
|
},
|
||||||
|
"total_matches": {
|
||||||
|
"message": "Coincidencias totales"
|
||||||
|
},
|
||||||
|
"group_by_list": {
|
||||||
|
"message": "Agrupar por lista"
|
||||||
|
},
|
||||||
|
"other": {
|
||||||
|
"message": "Otros"
|
||||||
|
},
|
||||||
"refresh": {
|
"refresh": {
|
||||||
"message": "Actualizar"
|
"message": "Actualizar"
|
||||||
},
|
},
|
||||||
@@ -328,5 +347,17 @@
|
|||||||
},
|
},
|
||||||
"rename_list": {
|
"rename_list": {
|
||||||
"message": "Renombrar lista"
|
"message": "Renombrar lista"
|
||||||
|
},
|
||||||
|
"export_settings": {
|
||||||
|
"message": "Exportar"
|
||||||
|
},
|
||||||
|
"import_settings": {
|
||||||
|
"message": "Importar"
|
||||||
|
},
|
||||||
|
"export_import_settings_label": {
|
||||||
|
"message": "Exportar / Importar"
|
||||||
|
},
|
||||||
|
"export_import_settings_hint": {
|
||||||
|
"message": "Hacer copia de seguridad o restaurar listas y excepciones de sitios."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"message": "Ajouter des mots"
|
"message": "Ajouter des mots"
|
||||||
},
|
},
|
||||||
"select_all": {
|
"select_all": {
|
||||||
"message": "Sélectionner"
|
"message": "Tout sélectionner"
|
||||||
},
|
},
|
||||||
"delete_selected": {
|
"delete_selected": {
|
||||||
"message": "Supprimer la sélection"
|
"message": "Supprimer la sélection"
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"message": "Êtes-vous sûr de vouloir supprimer les mots sélectionnés ?"
|
"message": "Êtes-vous sûr de vouloir supprimer les mots sélectionnés ?"
|
||||||
},
|
},
|
||||||
"deselect_all": {
|
"deselect_all": {
|
||||||
"message": "Désélectionner"
|
"message": "Tout désélectionner"
|
||||||
},
|
},
|
||||||
"highlight_lists": {
|
"highlight_lists": {
|
||||||
"message": "Listes de surbrillance"
|
"message": "Listes de surbrillance"
|
||||||
@@ -122,9 +122,19 @@
|
|||||||
"manage_exceptions": {
|
"manage_exceptions": {
|
||||||
"message": "Gérer"
|
"message": "Gérer"
|
||||||
},
|
},
|
||||||
|
"exceptions_mode": { "message": "Mode :" },
|
||||||
|
"exceptions_mode_blacklist": { "message": "Liste noire — ne pas surligner sur ces sites" },
|
||||||
|
"exceptions_mode_whitelist": { "message": "Liste blanche — surligner uniquement sur ces sites" },
|
||||||
|
"exceptions_mode_option_blacklist": { "message": "Liste noire" },
|
||||||
|
"exceptions_mode_option_whitelist": { "message": "Liste blanche" },
|
||||||
|
"exceptions_mode_hint_blacklist": { "message": "Ne pas surligner sur ces sites." },
|
||||||
|
"exceptions_mode_hint_whitelist": { "message": "Surligner uniquement sur ces sites." },
|
||||||
"exceptions_list": {
|
"exceptions_list": {
|
||||||
"message": "Sites d'exception :"
|
"message": "Sites d'exception :"
|
||||||
},
|
},
|
||||||
|
"exceptions_list_blacklist": { "message": "Sites à exclure (liste noire) :" },
|
||||||
|
"exceptions_list_whitelist": { "message": "Sites à inclure (liste blanche) :" },
|
||||||
|
"add_current_site": { "message": "Ajouter le site actuel" },
|
||||||
"clear_all": {
|
"clear_all": {
|
||||||
"message": "Tout effacer"
|
"message": "Tout effacer"
|
||||||
},
|
},
|
||||||
@@ -173,6 +183,15 @@
|
|||||||
"total_highlights": {
|
"total_highlights": {
|
||||||
"message": "Total"
|
"message": "Total"
|
||||||
},
|
},
|
||||||
|
"total_matches": {
|
||||||
|
"message": "Correspondances totales"
|
||||||
|
},
|
||||||
|
"group_by_list": {
|
||||||
|
"message": "Grouper par liste"
|
||||||
|
},
|
||||||
|
"other": {
|
||||||
|
"message": "Autres"
|
||||||
|
},
|
||||||
"refresh": {
|
"refresh": {
|
||||||
"message": "Actualiser"
|
"message": "Actualiser"
|
||||||
},
|
},
|
||||||
@@ -328,5 +347,17 @@
|
|||||||
},
|
},
|
||||||
"rename_list": {
|
"rename_list": {
|
||||||
"message": "Renommer la liste"
|
"message": "Renommer la liste"
|
||||||
|
},
|
||||||
|
"export_settings": {
|
||||||
|
"message": "Exporter"
|
||||||
|
},
|
||||||
|
"import_settings": {
|
||||||
|
"message": "Importer"
|
||||||
|
},
|
||||||
|
"export_import_settings_label": {
|
||||||
|
"message": "Exporter / Importer"
|
||||||
|
},
|
||||||
|
"export_import_settings_hint": {
|
||||||
|
"message": "Sauvegarder ou restaurer les listes et les exceptions de sites."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"message": "क्या आप वाकई चयनित शब्दों को हटाना चाहते हैं?"
|
"message": "क्या आप वाकई चयनित शब्दों को हटाना चाहते हैं?"
|
||||||
},
|
},
|
||||||
"deselect_all": {
|
"deselect_all": {
|
||||||
"message": "चयन हटाएँ"
|
"message": "सभी का चयन हटाएँ"
|
||||||
},
|
},
|
||||||
"highlight_lists": {
|
"highlight_lists": {
|
||||||
"message": "हाइलाइट सूचियाँ"
|
"message": "हाइलाइट सूचियाँ"
|
||||||
@@ -122,9 +122,19 @@
|
|||||||
"manage_exceptions": {
|
"manage_exceptions": {
|
||||||
"message": "प्रबंधित करें"
|
"message": "प्रबंधित करें"
|
||||||
},
|
},
|
||||||
|
"exceptions_mode": { "message": "मोड:" },
|
||||||
|
"exceptions_mode_blacklist": { "message": "ब्लैकलिस्ट — इन साइटों पर हाइलाइट न करें" },
|
||||||
|
"exceptions_mode_whitelist": { "message": "व्हाइटलिस्ट — केवल इन साइटों पर हाइलाइट करें" },
|
||||||
|
"exceptions_mode_option_blacklist": { "message": "ब्लैकलिस्ट" },
|
||||||
|
"exceptions_mode_option_whitelist": { "message": "व्हाइटलिस्ट" },
|
||||||
|
"exceptions_mode_hint_blacklist": { "message": "इन साइटों पर हाइलाइट न करें।" },
|
||||||
|
"exceptions_mode_hint_whitelist": { "message": "केवल इन साइटों पर हाइलाइट करें।" },
|
||||||
"exceptions_list": {
|
"exceptions_list": {
|
||||||
"message": "अपवाद साइटें:"
|
"message": "अपवाद साइटें:"
|
||||||
},
|
},
|
||||||
|
"exceptions_list_blacklist": { "message": "बहिष्कृत साइटें (ब्लैकलिस्ट):" },
|
||||||
|
"exceptions_list_whitelist": { "message": "शामिल साइटें (व्हाइटलिस्ट):" },
|
||||||
|
"add_current_site": { "message": "वर्तमान साइट जोड़ें" },
|
||||||
"clear_all": {
|
"clear_all": {
|
||||||
"message": "सभी साफ करें"
|
"message": "सभी साफ करें"
|
||||||
},
|
},
|
||||||
@@ -173,6 +183,15 @@
|
|||||||
"total_highlights": {
|
"total_highlights": {
|
||||||
"message": "कुल"
|
"message": "कुल"
|
||||||
},
|
},
|
||||||
|
"total_matches": {
|
||||||
|
"message": "कुल मिलान"
|
||||||
|
},
|
||||||
|
"group_by_list": {
|
||||||
|
"message": "सूची के अनुसार समूहित करें"
|
||||||
|
},
|
||||||
|
"other": {
|
||||||
|
"message": "अन्य"
|
||||||
|
},
|
||||||
"refresh": {
|
"refresh": {
|
||||||
"message": "रीफ्रेश करें"
|
"message": "रीफ्रेश करें"
|
||||||
},
|
},
|
||||||
@@ -328,5 +347,17 @@
|
|||||||
},
|
},
|
||||||
"rename_list": {
|
"rename_list": {
|
||||||
"message": "सूची का नाम बदलें"
|
"message": "सूची का नाम बदलें"
|
||||||
|
},
|
||||||
|
"export_settings": {
|
||||||
|
"message": "निर्यात"
|
||||||
|
},
|
||||||
|
"import_settings": {
|
||||||
|
"message": "आयात"
|
||||||
|
},
|
||||||
|
"export_import_settings_label": {
|
||||||
|
"message": "निर्यात / आयात"
|
||||||
|
},
|
||||||
|
"export_import_settings_hint": {
|
||||||
|
"message": "सूचियों और साइट अपवादों का बैकअप लें या पुनर्स्थापित करें।"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"message": "Aggiungi parole"
|
"message": "Aggiungi parole"
|
||||||
},
|
},
|
||||||
"select_all": {
|
"select_all": {
|
||||||
"message": "Seleziona"
|
"message": "Seleziona tutto"
|
||||||
},
|
},
|
||||||
"delete_selected": {
|
"delete_selected": {
|
||||||
"message": "Elimina selezionati"
|
"message": "Elimina selezionati"
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"message": "Sei sicuro di voler eliminare le parole selezionate?"
|
"message": "Sei sicuro di voler eliminare le parole selezionate?"
|
||||||
},
|
},
|
||||||
"deselect_all": {
|
"deselect_all": {
|
||||||
"message": "Deseleziona"
|
"message": "Deseleziona tutto"
|
||||||
},
|
},
|
||||||
"highlight_lists": {
|
"highlight_lists": {
|
||||||
"message": "Elenchi di evidenziazione"
|
"message": "Elenchi di evidenziazione"
|
||||||
@@ -122,9 +122,19 @@
|
|||||||
"manage_exceptions": {
|
"manage_exceptions": {
|
||||||
"message": "Gestisci"
|
"message": "Gestisci"
|
||||||
},
|
},
|
||||||
|
"exceptions_mode": { "message": "Modalità:" },
|
||||||
|
"exceptions_mode_blacklist": { "message": "Lista nera — non evidenziare su questi siti" },
|
||||||
|
"exceptions_mode_whitelist": { "message": "Lista bianca — evidenziare solo su questi siti" },
|
||||||
|
"exceptions_mode_option_blacklist": { "message": "Lista nera" },
|
||||||
|
"exceptions_mode_option_whitelist": { "message": "Lista bianca" },
|
||||||
|
"exceptions_mode_hint_blacklist": { "message": "Non evidenziare su questi siti." },
|
||||||
|
"exceptions_mode_hint_whitelist": { "message": "Evidenziare solo su questi siti." },
|
||||||
"exceptions_list": {
|
"exceptions_list": {
|
||||||
"message": "Siti di eccezione:"
|
"message": "Siti di eccezione:"
|
||||||
},
|
},
|
||||||
|
"exceptions_list_blacklist": { "message": "Siti da escludere (lista nera):" },
|
||||||
|
"exceptions_list_whitelist": { "message": "Siti da includere (lista bianca):" },
|
||||||
|
"add_current_site": { "message": "Aggiungi sito attuale" },
|
||||||
"clear_all": {
|
"clear_all": {
|
||||||
"message": "Cancella tutto"
|
"message": "Cancella tutto"
|
||||||
},
|
},
|
||||||
@@ -173,6 +183,15 @@
|
|||||||
"total_highlights": {
|
"total_highlights": {
|
||||||
"message": "Totale"
|
"message": "Totale"
|
||||||
},
|
},
|
||||||
|
"total_matches": {
|
||||||
|
"message": "Corrispondenze totali"
|
||||||
|
},
|
||||||
|
"group_by_list": {
|
||||||
|
"message": "Raggruppa per lista"
|
||||||
|
},
|
||||||
|
"other": {
|
||||||
|
"message": "Altri"
|
||||||
|
},
|
||||||
"refresh": {
|
"refresh": {
|
||||||
"message": "Aggiorna"
|
"message": "Aggiorna"
|
||||||
},
|
},
|
||||||
@@ -328,5 +347,17 @@
|
|||||||
},
|
},
|
||||||
"rename_list": {
|
"rename_list": {
|
||||||
"message": "Rinomina elenco"
|
"message": "Rinomina elenco"
|
||||||
|
},
|
||||||
|
"export_settings": {
|
||||||
|
"message": "Esporta"
|
||||||
|
},
|
||||||
|
"import_settings": {
|
||||||
|
"message": "Importa"
|
||||||
|
},
|
||||||
|
"export_import_settings_label": {
|
||||||
|
"message": "Esporta / Importa"
|
||||||
|
},
|
||||||
|
"export_import_settings_hint": {
|
||||||
|
"message": "Backup o ripristino di elenchi e eccezioni di siti."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"message": "選択した単語を削除してもよろしいですか?"
|
"message": "選択した単語を削除してもよろしいですか?"
|
||||||
},
|
},
|
||||||
"deselect_all": {
|
"deselect_all": {
|
||||||
"message": "すべて解除"
|
"message": "すべての選択を解除"
|
||||||
},
|
},
|
||||||
"highlight_lists": {
|
"highlight_lists": {
|
||||||
"message": "ハイライトリスト"
|
"message": "ハイライトリスト"
|
||||||
@@ -122,9 +122,19 @@
|
|||||||
"manage_exceptions": {
|
"manage_exceptions": {
|
||||||
"message": "管理"
|
"message": "管理"
|
||||||
},
|
},
|
||||||
|
"exceptions_mode": { "message": "モード:" },
|
||||||
|
"exceptions_mode_blacklist": { "message": "ブラックリスト — これらのサイトではハイライトしない" },
|
||||||
|
"exceptions_mode_whitelist": { "message": "ホワイトリスト — これらのサイトでのみハイライト" },
|
||||||
|
"exceptions_mode_option_blacklist": { "message": "ブラックリスト" },
|
||||||
|
"exceptions_mode_option_whitelist": { "message": "ホワイトリスト" },
|
||||||
|
"exceptions_mode_hint_blacklist": { "message": "これらのサイトではハイライトしません。" },
|
||||||
|
"exceptions_mode_hint_whitelist": { "message": "これらのサイトでのみハイライトします。" },
|
||||||
"exceptions_list": {
|
"exceptions_list": {
|
||||||
"message": "例外サイト:"
|
"message": "例外サイト:"
|
||||||
},
|
},
|
||||||
|
"exceptions_list_blacklist": { "message": "除外するサイト(ブラックリスト):" },
|
||||||
|
"exceptions_list_whitelist": { "message": "含めるサイト(ホワイトリスト):" },
|
||||||
|
"add_current_site": { "message": "現在のサイトを追加" },
|
||||||
"clear_all": {
|
"clear_all": {
|
||||||
"message": "すべてクリア"
|
"message": "すべてクリア"
|
||||||
},
|
},
|
||||||
@@ -173,6 +183,15 @@
|
|||||||
"total_highlights": {
|
"total_highlights": {
|
||||||
"message": "合計"
|
"message": "合計"
|
||||||
},
|
},
|
||||||
|
"total_matches": {
|
||||||
|
"message": "一致数の合計"
|
||||||
|
},
|
||||||
|
"group_by_list": {
|
||||||
|
"message": "リストでグループ化"
|
||||||
|
},
|
||||||
|
"other": {
|
||||||
|
"message": "その他"
|
||||||
|
},
|
||||||
"refresh": {
|
"refresh": {
|
||||||
"message": "更新"
|
"message": "更新"
|
||||||
},
|
},
|
||||||
@@ -328,5 +347,17 @@
|
|||||||
},
|
},
|
||||||
"rename_list": {
|
"rename_list": {
|
||||||
"message": "リスト名を変更"
|
"message": "リスト名を変更"
|
||||||
|
},
|
||||||
|
"export_settings": {
|
||||||
|
"message": "エクスポート"
|
||||||
|
},
|
||||||
|
"import_settings": {
|
||||||
|
"message": "インポート"
|
||||||
|
},
|
||||||
|
"export_import_settings_label": {
|
||||||
|
"message": "エクスポート / インポート"
|
||||||
|
},
|
||||||
|
"export_import_settings_hint": {
|
||||||
|
"message": "リストとサイトの例外をバックアップまたは復元します。"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"message": "단어 추가"
|
"message": "단어 추가"
|
||||||
},
|
},
|
||||||
"select_all": {
|
"select_all": {
|
||||||
"message": "선택"
|
"message": "모두 선택"
|
||||||
},
|
},
|
||||||
"delete_selected": {
|
"delete_selected": {
|
||||||
"message": "선택 항목 삭제"
|
"message": "선택 항목 삭제"
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"message": "선택한 단어를 삭제하시겠습니까?"
|
"message": "선택한 단어를 삭제하시겠습니까?"
|
||||||
},
|
},
|
||||||
"deselect_all": {
|
"deselect_all": {
|
||||||
"message": "선택 해제"
|
"message": "모두 선택 해제"
|
||||||
},
|
},
|
||||||
"highlight_lists": {
|
"highlight_lists": {
|
||||||
"message": "하이라이트 리스트"
|
"message": "하이라이트 리스트"
|
||||||
@@ -122,9 +122,19 @@
|
|||||||
"manage_exceptions": {
|
"manage_exceptions": {
|
||||||
"message": "관리"
|
"message": "관리"
|
||||||
},
|
},
|
||||||
|
"exceptions_mode": { "message": "모드:" },
|
||||||
|
"exceptions_mode_blacklist": { "message": "차단 목록 — 이 사이트에서 강조 안 함" },
|
||||||
|
"exceptions_mode_whitelist": { "message": "허용 목록 — 이 사이트에서만 강조" },
|
||||||
|
"exceptions_mode_option_blacklist": { "message": "차단 목록" },
|
||||||
|
"exceptions_mode_option_whitelist": { "message": "허용 목록" },
|
||||||
|
"exceptions_mode_hint_blacklist": { "message": "이 사이트에서 강조하지 않습니다." },
|
||||||
|
"exceptions_mode_hint_whitelist": { "message": "이 사이트에서만 강조합니다." },
|
||||||
"exceptions_list": {
|
"exceptions_list": {
|
||||||
"message": "예외 사이트:"
|
"message": "예외 사이트:"
|
||||||
},
|
},
|
||||||
|
"exceptions_list_blacklist": { "message": "제외할 사이트 (차단 목록):" },
|
||||||
|
"exceptions_list_whitelist": { "message": "포함할 사이트 (허용 목록):" },
|
||||||
|
"add_current_site": { "message": "현재 사이트 추가" },
|
||||||
"clear_all": {
|
"clear_all": {
|
||||||
"message": "모두 지우기"
|
"message": "모두 지우기"
|
||||||
},
|
},
|
||||||
@@ -173,6 +183,15 @@
|
|||||||
"total_highlights": {
|
"total_highlights": {
|
||||||
"message": "전체"
|
"message": "전체"
|
||||||
},
|
},
|
||||||
|
"total_matches": {
|
||||||
|
"message": "총 일치 수"
|
||||||
|
},
|
||||||
|
"group_by_list": {
|
||||||
|
"message": "목록별로 그룹화"
|
||||||
|
},
|
||||||
|
"other": {
|
||||||
|
"message": "기타"
|
||||||
|
},
|
||||||
"refresh": {
|
"refresh": {
|
||||||
"message": "새로고침"
|
"message": "새로고침"
|
||||||
},
|
},
|
||||||
@@ -328,5 +347,17 @@
|
|||||||
},
|
},
|
||||||
"rename_list": {
|
"rename_list": {
|
||||||
"message": "리스트 이름 변경"
|
"message": "리스트 이름 변경"
|
||||||
|
},
|
||||||
|
"export_settings": {
|
||||||
|
"message": "내보내기"
|
||||||
|
},
|
||||||
|
"import_settings": {
|
||||||
|
"message": "가져오기"
|
||||||
|
},
|
||||||
|
"export_import_settings_label": {
|
||||||
|
"message": "내보내기 / 가져오기"
|
||||||
|
},
|
||||||
|
"export_import_settings_hint": {
|
||||||
|
"message": "목록 및 사이트 예외를 백업하거나 복원합니다."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"message": "Woorden toevoegen"
|
"message": "Woorden toevoegen"
|
||||||
},
|
},
|
||||||
"select_all": {
|
"select_all": {
|
||||||
"message": "Selecteren"
|
"message": "Alles selecteren"
|
||||||
},
|
},
|
||||||
"delete_selected": {
|
"delete_selected": {
|
||||||
"message": "Geselecteerde verwijderen"
|
"message": "Geselecteerde verwijderen"
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"message": "Weet je zeker dat je de geselecteerde woorden wilt verwijderen?"
|
"message": "Weet je zeker dat je de geselecteerde woorden wilt verwijderen?"
|
||||||
},
|
},
|
||||||
"deselect_all": {
|
"deselect_all": {
|
||||||
"message": "Deselecteren"
|
"message": "Alles deselecteren"
|
||||||
},
|
},
|
||||||
"highlight_lists": {
|
"highlight_lists": {
|
||||||
"message": "Markeer lijsten"
|
"message": "Markeer lijsten"
|
||||||
@@ -122,9 +122,19 @@
|
|||||||
"manage_exceptions": {
|
"manage_exceptions": {
|
||||||
"message": "Beheren"
|
"message": "Beheren"
|
||||||
},
|
},
|
||||||
|
"exceptions_mode": { "message": "Modus:" },
|
||||||
|
"exceptions_mode_blacklist": { "message": "Zwarte lijst — niet markeren op deze sites" },
|
||||||
|
"exceptions_mode_whitelist": { "message": "Witte lijst — alleen markeren op deze sites" },
|
||||||
|
"exceptions_mode_option_blacklist": { "message": "Zwarte lijst" },
|
||||||
|
"exceptions_mode_option_whitelist": { "message": "Witte lijst" },
|
||||||
|
"exceptions_mode_hint_blacklist": { "message": "Niet markeren op deze sites." },
|
||||||
|
"exceptions_mode_hint_whitelist": { "message": "Alleen markeren op deze sites." },
|
||||||
"exceptions_list": {
|
"exceptions_list": {
|
||||||
"message": "Uitzondering sites:"
|
"message": "Uitzondering sites:"
|
||||||
},
|
},
|
||||||
|
"exceptions_list_blacklist": { "message": "Uit te sluiten sites (zwarte lijst):" },
|
||||||
|
"exceptions_list_whitelist": { "message": "Toe te voegen sites (witte lijst):" },
|
||||||
|
"add_current_site": { "message": "Huidige site toevoegen" },
|
||||||
"clear_all": {
|
"clear_all": {
|
||||||
"message": "Alles wissen"
|
"message": "Alles wissen"
|
||||||
},
|
},
|
||||||
@@ -173,6 +183,15 @@
|
|||||||
"total_highlights": {
|
"total_highlights": {
|
||||||
"message": "Totaal"
|
"message": "Totaal"
|
||||||
},
|
},
|
||||||
|
"total_matches": {
|
||||||
|
"message": "Totaal aantal matches"
|
||||||
|
},
|
||||||
|
"group_by_list": {
|
||||||
|
"message": "Groeperen op lijst"
|
||||||
|
},
|
||||||
|
"other": {
|
||||||
|
"message": "Overige"
|
||||||
|
},
|
||||||
"refresh": {
|
"refresh": {
|
||||||
"message": "Vernieuwen"
|
"message": "Vernieuwen"
|
||||||
},
|
},
|
||||||
@@ -328,5 +347,17 @@
|
|||||||
},
|
},
|
||||||
"rename_list": {
|
"rename_list": {
|
||||||
"message": "Lijst hernoemen"
|
"message": "Lijst hernoemen"
|
||||||
|
},
|
||||||
|
"export_settings": {
|
||||||
|
"message": "Exporteren"
|
||||||
|
},
|
||||||
|
"import_settings": {
|
||||||
|
"message": "Importeren"
|
||||||
|
},
|
||||||
|
"export_import_settings_label": {
|
||||||
|
"message": "Exporteren / Importeren"
|
||||||
|
},
|
||||||
|
"export_import_settings_hint": {
|
||||||
|
"message": "Back-up maken of lijsten en site-uitzonderingen herstellen."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"message": "Dodaj słowa"
|
"message": "Dodaj słowa"
|
||||||
},
|
},
|
||||||
"select_all": {
|
"select_all": {
|
||||||
"message": "Zaznacz"
|
"message": "Zaznacz wszystko"
|
||||||
},
|
},
|
||||||
"delete_selected": {
|
"delete_selected": {
|
||||||
"message": "Usuń zaznaczone"
|
"message": "Usuń zaznaczone"
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"message": "Czy na pewno chcesz usunąć wybrane słowa?"
|
"message": "Czy na pewno chcesz usunąć wybrane słowa?"
|
||||||
},
|
},
|
||||||
"deselect_all": {
|
"deselect_all": {
|
||||||
"message": "Odznacz"
|
"message": "Odznacz wszystko"
|
||||||
},
|
},
|
||||||
"highlight_lists": {
|
"highlight_lists": {
|
||||||
"message": "Listy podświetleń"
|
"message": "Listy podświetleń"
|
||||||
@@ -122,9 +122,19 @@
|
|||||||
"manage_exceptions": {
|
"manage_exceptions": {
|
||||||
"message": "Zarządzaj"
|
"message": "Zarządzaj"
|
||||||
},
|
},
|
||||||
|
"exceptions_mode": { "message": "Tryb:" },
|
||||||
|
"exceptions_mode_blacklist": { "message": "Czarna lista — nie podświetlaj na tych stronach" },
|
||||||
|
"exceptions_mode_whitelist": { "message": "Biała lista — podświetlaj tylko na tych stronach" },
|
||||||
|
"exceptions_mode_option_blacklist": { "message": "Czarna lista" },
|
||||||
|
"exceptions_mode_option_whitelist": { "message": "Biała lista" },
|
||||||
|
"exceptions_mode_hint_blacklist": { "message": "Nie podświetlaj na tych stronach." },
|
||||||
|
"exceptions_mode_hint_whitelist": { "message": "Podświetlaj tylko na tych stronach." },
|
||||||
"exceptions_list": {
|
"exceptions_list": {
|
||||||
"message": "Strony wyjątków:"
|
"message": "Strony wyjątków:"
|
||||||
},
|
},
|
||||||
|
"exceptions_list_blacklist": { "message": "Strony do wykluczenia (czarna lista):" },
|
||||||
|
"exceptions_list_whitelist": { "message": "Strony do uwzględnienia (biała lista):" },
|
||||||
|
"add_current_site": { "message": "Dodaj bieżącą witrynę" },
|
||||||
"clear_all": {
|
"clear_all": {
|
||||||
"message": "Wyczyść wszystko"
|
"message": "Wyczyść wszystko"
|
||||||
},
|
},
|
||||||
@@ -173,6 +183,15 @@
|
|||||||
"total_highlights": {
|
"total_highlights": {
|
||||||
"message": "Łącznie"
|
"message": "Łącznie"
|
||||||
},
|
},
|
||||||
|
"total_matches": {
|
||||||
|
"message": "Łączna liczba dopasowań"
|
||||||
|
},
|
||||||
|
"group_by_list": {
|
||||||
|
"message": "Grupuj według listy"
|
||||||
|
},
|
||||||
|
"other": {
|
||||||
|
"message": "Inne"
|
||||||
|
},
|
||||||
"refresh": {
|
"refresh": {
|
||||||
"message": "Odśwież"
|
"message": "Odśwież"
|
||||||
},
|
},
|
||||||
@@ -328,5 +347,17 @@
|
|||||||
},
|
},
|
||||||
"rename_list": {
|
"rename_list": {
|
||||||
"message": "Zmień nazwę listy"
|
"message": "Zmień nazwę listy"
|
||||||
|
},
|
||||||
|
"export_settings": {
|
||||||
|
"message": "Eksportuj"
|
||||||
|
},
|
||||||
|
"import_settings": {
|
||||||
|
"message": "Importuj"
|
||||||
|
},
|
||||||
|
"export_import_settings_label": {
|
||||||
|
"message": "Eksport / Import"
|
||||||
|
},
|
||||||
|
"export_import_settings_hint": {
|
||||||
|
"message": "Utwórz kopię zapasową lub przywróć listy i wyjątki witryn."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"message": "Adicionar palavras"
|
"message": "Adicionar palavras"
|
||||||
},
|
},
|
||||||
"select_all": {
|
"select_all": {
|
||||||
"message": "Selecionar"
|
"message": "Selecionar tudo"
|
||||||
},
|
},
|
||||||
"delete_selected": {
|
"delete_selected": {
|
||||||
"message": "Excluir selecionados"
|
"message": "Excluir selecionados"
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"message": "Tem certeza de que deseja excluir as palavras selecionadas?"
|
"message": "Tem certeza de que deseja excluir as palavras selecionadas?"
|
||||||
},
|
},
|
||||||
"deselect_all": {
|
"deselect_all": {
|
||||||
"message": "Desmarcar"
|
"message": "Desmarcar tudo"
|
||||||
},
|
},
|
||||||
"highlight_lists": {
|
"highlight_lists": {
|
||||||
"message": "Listas de destaque"
|
"message": "Listas de destaque"
|
||||||
@@ -122,9 +122,19 @@
|
|||||||
"manage_exceptions": {
|
"manage_exceptions": {
|
||||||
"message": "Gerenciar"
|
"message": "Gerenciar"
|
||||||
},
|
},
|
||||||
|
"exceptions_mode": { "message": "Modo:" },
|
||||||
|
"exceptions_mode_blacklist": { "message": "Lista negra — não destacar nestes sites" },
|
||||||
|
"exceptions_mode_whitelist": { "message": "Lista branca — destacar apenas nestes sites" },
|
||||||
|
"exceptions_mode_option_blacklist": { "message": "Lista negra" },
|
||||||
|
"exceptions_mode_option_whitelist": { "message": "Lista branca" },
|
||||||
|
"exceptions_mode_hint_blacklist": { "message": "Não destacar nestes sites." },
|
||||||
|
"exceptions_mode_hint_whitelist": { "message": "Destacar apenas nestes sites." },
|
||||||
"exceptions_list": {
|
"exceptions_list": {
|
||||||
"message": "Sites de exceção:"
|
"message": "Sites de exceção:"
|
||||||
},
|
},
|
||||||
|
"exceptions_list_blacklist": { "message": "Sites a excluir (lista negra):" },
|
||||||
|
"exceptions_list_whitelist": { "message": "Sites a incluir (lista branca):" },
|
||||||
|
"add_current_site": { "message": "Adicionar site atual" },
|
||||||
"clear_all": {
|
"clear_all": {
|
||||||
"message": "Limpar tudo"
|
"message": "Limpar tudo"
|
||||||
},
|
},
|
||||||
@@ -173,6 +183,15 @@
|
|||||||
"total_highlights": {
|
"total_highlights": {
|
||||||
"message": "Total"
|
"message": "Total"
|
||||||
},
|
},
|
||||||
|
"total_matches": {
|
||||||
|
"message": "Total de correspondências"
|
||||||
|
},
|
||||||
|
"group_by_list": {
|
||||||
|
"message": "Agrupar por lista"
|
||||||
|
},
|
||||||
|
"other": {
|
||||||
|
"message": "Outros"
|
||||||
|
},
|
||||||
"refresh": {
|
"refresh": {
|
||||||
"message": "Atualizar"
|
"message": "Atualizar"
|
||||||
},
|
},
|
||||||
@@ -328,5 +347,17 @@
|
|||||||
},
|
},
|
||||||
"rename_list": {
|
"rename_list": {
|
||||||
"message": "Renomear lista"
|
"message": "Renomear lista"
|
||||||
|
},
|
||||||
|
"export_settings": {
|
||||||
|
"message": "Exportar"
|
||||||
|
},
|
||||||
|
"import_settings": {
|
||||||
|
"message": "Importar"
|
||||||
|
},
|
||||||
|
"export_import_settings_label": {
|
||||||
|
"message": "Exportar / Importar"
|
||||||
|
},
|
||||||
|
"export_import_settings_hint": {
|
||||||
|
"message": "Fazer backup ou restaurar listas e exceções de sites."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"message": "Вы уверены, что хотите удалить выбранные слова?"
|
"message": "Вы уверены, что хотите удалить выбранные слова?"
|
||||||
},
|
},
|
||||||
"deselect_all": {
|
"deselect_all": {
|
||||||
"message": "Отменить выбор"
|
"message": "Снять выделение со всех"
|
||||||
},
|
},
|
||||||
"highlight_lists": {
|
"highlight_lists": {
|
||||||
"message": "Списки"
|
"message": "Списки"
|
||||||
@@ -122,9 +122,19 @@
|
|||||||
"manage_exceptions": {
|
"manage_exceptions": {
|
||||||
"message": "Управление"
|
"message": "Управление"
|
||||||
},
|
},
|
||||||
|
"exceptions_mode": { "message": "Режим:" },
|
||||||
|
"exceptions_mode_blacklist": { "message": "Чёрный список — не подсвечивать на этих сайтах" },
|
||||||
|
"exceptions_mode_whitelist": { "message": "Белый список — подсвечивать только на этих сайтах" },
|
||||||
|
"exceptions_mode_option_blacklist": { "message": "Чёрный список" },
|
||||||
|
"exceptions_mode_option_whitelist": { "message": "Белый список" },
|
||||||
|
"exceptions_mode_hint_blacklist": { "message": "Не подсвечивать на этих сайтах." },
|
||||||
|
"exceptions_mode_hint_whitelist": { "message": "Подсвечивать только на этих сайтах." },
|
||||||
"exceptions_list": {
|
"exceptions_list": {
|
||||||
"message": "Сайты-исключения:"
|
"message": "Сайты-исключения:"
|
||||||
},
|
},
|
||||||
|
"exceptions_list_blacklist": { "message": "Исключить сайты (чёрный список):" },
|
||||||
|
"exceptions_list_whitelist": { "message": "Включить сайты (белый список):" },
|
||||||
|
"add_current_site": { "message": "Добавить текущий сайт" },
|
||||||
"clear_all": {
|
"clear_all": {
|
||||||
"message": "Очистить все"
|
"message": "Очистить все"
|
||||||
},
|
},
|
||||||
@@ -173,6 +183,15 @@
|
|||||||
"total_highlights": {
|
"total_highlights": {
|
||||||
"message": "Всего"
|
"message": "Всего"
|
||||||
},
|
},
|
||||||
|
"total_matches": {
|
||||||
|
"message": "Всего совпадений"
|
||||||
|
},
|
||||||
|
"group_by_list": {
|
||||||
|
"message": "Группировать по списку"
|
||||||
|
},
|
||||||
|
"other": {
|
||||||
|
"message": "Прочее"
|
||||||
|
},
|
||||||
"refresh": {
|
"refresh": {
|
||||||
"message": "Обновить"
|
"message": "Обновить"
|
||||||
},
|
},
|
||||||
@@ -329,5 +348,17 @@
|
|||||||
},
|
},
|
||||||
"rename_list": {
|
"rename_list": {
|
||||||
"message": "Переименовать список"
|
"message": "Переименовать список"
|
||||||
|
},
|
||||||
|
"export_settings": {
|
||||||
|
"message": "Экспорт"
|
||||||
|
},
|
||||||
|
"import_settings": {
|
||||||
|
"message": "Импорт"
|
||||||
|
},
|
||||||
|
"export_import_settings_label": {
|
||||||
|
"message": "Экспорт / Импорт"
|
||||||
|
},
|
||||||
|
"export_import_settings_hint": {
|
||||||
|
"message": "Резервное копирование или восстановление списков и исключений сайтов."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"message": "Kelimeleri Ekle"
|
"message": "Kelimeleri Ekle"
|
||||||
},
|
},
|
||||||
"select_all": {
|
"select_all": {
|
||||||
"message": "Seç"
|
"message": "Tümünü seç"
|
||||||
},
|
},
|
||||||
"delete_selected": {
|
"delete_selected": {
|
||||||
"message": "Seçilenleri sil"
|
"message": "Seçilenleri sil"
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"message": "Seçili kelimeleri silmek istediğinizden emin misiniz?"
|
"message": "Seçili kelimeleri silmek istediğinizden emin misiniz?"
|
||||||
},
|
},
|
||||||
"deselect_all": {
|
"deselect_all": {
|
||||||
"message": "Seçimi Kaldır"
|
"message": "Tümünün seçimini kaldır"
|
||||||
},
|
},
|
||||||
"highlight_lists": {
|
"highlight_lists": {
|
||||||
"message": "Vurgulama Listeleri"
|
"message": "Vurgulama Listeleri"
|
||||||
@@ -122,9 +122,19 @@
|
|||||||
"manage_exceptions": {
|
"manage_exceptions": {
|
||||||
"message": "Yönet"
|
"message": "Yönet"
|
||||||
},
|
},
|
||||||
|
"exceptions_mode": { "message": "Mod:" },
|
||||||
|
"exceptions_mode_blacklist": { "message": "Kara liste — bu sitelerde vurgulama" },
|
||||||
|
"exceptions_mode_whitelist": { "message": "Beyaz liste — yalnızca bu sitelerde vurgula" },
|
||||||
|
"exceptions_mode_option_blacklist": { "message": "Kara liste" },
|
||||||
|
"exceptions_mode_option_whitelist": { "message": "Beyaz liste" },
|
||||||
|
"exceptions_mode_hint_blacklist": { "message": "Bu sitelerde vurgulama." },
|
||||||
|
"exceptions_mode_hint_whitelist": { "message": "Yalnızca bu sitelerde vurgula." },
|
||||||
"exceptions_list": {
|
"exceptions_list": {
|
||||||
"message": "İstisna Siteleri:"
|
"message": "İstisna Siteleri:"
|
||||||
},
|
},
|
||||||
|
"exceptions_list_blacklist": { "message": "Hariç tutulacak siteler (kara liste):" },
|
||||||
|
"exceptions_list_whitelist": { "message": "Dahil edilecek siteler (beyaz liste):" },
|
||||||
|
"add_current_site": { "message": "Mevcut siteyi ekle" },
|
||||||
"clear_all": {
|
"clear_all": {
|
||||||
"message": "Hepsini Temizle"
|
"message": "Hepsini Temizle"
|
||||||
},
|
},
|
||||||
@@ -173,6 +183,15 @@
|
|||||||
"total_highlights": {
|
"total_highlights": {
|
||||||
"message": "Toplam"
|
"message": "Toplam"
|
||||||
},
|
},
|
||||||
|
"total_matches": {
|
||||||
|
"message": "Toplam eşleşme"
|
||||||
|
},
|
||||||
|
"group_by_list": {
|
||||||
|
"message": "Listeye göre grupla"
|
||||||
|
},
|
||||||
|
"other": {
|
||||||
|
"message": "Diğer"
|
||||||
|
},
|
||||||
"refresh": {
|
"refresh": {
|
||||||
"message": "Yenile"
|
"message": "Yenile"
|
||||||
},
|
},
|
||||||
@@ -328,5 +347,17 @@
|
|||||||
},
|
},
|
||||||
"rename_list": {
|
"rename_list": {
|
||||||
"message": "Listeyi Yeniden Adlandır"
|
"message": "Listeyi Yeniden Adlandır"
|
||||||
|
},
|
||||||
|
"export_settings": {
|
||||||
|
"message": "Dışa Aktar"
|
||||||
|
},
|
||||||
|
"import_settings": {
|
||||||
|
"message": "İçe Aktar"
|
||||||
|
},
|
||||||
|
"export_import_settings_label": {
|
||||||
|
"message": "Dışa Aktar / İçe Aktar"
|
||||||
|
},
|
||||||
|
"export_import_settings_hint": {
|
||||||
|
"message": "Listeleri ve site istisnalarını yedekleyin veya geri yükleyin."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"message": "添加单词"
|
"message": "添加单词"
|
||||||
},
|
},
|
||||||
"select_all": {
|
"select_all": {
|
||||||
"message": "选择"
|
"message": "全选"
|
||||||
},
|
},
|
||||||
"delete_selected": {
|
"delete_selected": {
|
||||||
"message": "删除所选"
|
"message": "删除所选"
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"message": "您确定要删除选中的单词吗?"
|
"message": "您确定要删除选中的单词吗?"
|
||||||
},
|
},
|
||||||
"deselect_all": {
|
"deselect_all": {
|
||||||
"message": "取消选择"
|
"message": "取消全选"
|
||||||
},
|
},
|
||||||
"highlight_lists": {
|
"highlight_lists": {
|
||||||
"message": "高亮列表"
|
"message": "高亮列表"
|
||||||
@@ -122,9 +122,19 @@
|
|||||||
"manage_exceptions": {
|
"manage_exceptions": {
|
||||||
"message": "管理"
|
"message": "管理"
|
||||||
},
|
},
|
||||||
|
"exceptions_mode": { "message": "模式:" },
|
||||||
|
"exceptions_mode_blacklist": { "message": "黑名单 — 不在这些网站上高亮" },
|
||||||
|
"exceptions_mode_whitelist": { "message": "白名单 — 仅在这些网站上高亮" },
|
||||||
|
"exceptions_mode_option_blacklist": { "message": "黑名单" },
|
||||||
|
"exceptions_mode_option_whitelist": { "message": "白名单" },
|
||||||
|
"exceptions_mode_hint_blacklist": { "message": "不在这些网站上高亮。" },
|
||||||
|
"exceptions_mode_hint_whitelist": { "message": "仅在这些网站上高亮。" },
|
||||||
"exceptions_list": {
|
"exceptions_list": {
|
||||||
"message": "例外网站:"
|
"message": "例外网站:"
|
||||||
},
|
},
|
||||||
|
"exceptions_list_blacklist": { "message": "要排除的网站(黑名单):" },
|
||||||
|
"exceptions_list_whitelist": { "message": "要包含的网站(白名单):" },
|
||||||
|
"add_current_site": { "message": "添加当前网站" },
|
||||||
"clear_all": {
|
"clear_all": {
|
||||||
"message": "清除全部"
|
"message": "清除全部"
|
||||||
},
|
},
|
||||||
@@ -173,6 +183,15 @@
|
|||||||
"total_highlights": {
|
"total_highlights": {
|
||||||
"message": "总计"
|
"message": "总计"
|
||||||
},
|
},
|
||||||
|
"total_matches": {
|
||||||
|
"message": "总匹配数"
|
||||||
|
},
|
||||||
|
"group_by_list": {
|
||||||
|
"message": "按列表分组"
|
||||||
|
},
|
||||||
|
"other": {
|
||||||
|
"message": "其他"
|
||||||
|
},
|
||||||
"refresh": {
|
"refresh": {
|
||||||
"message": "刷新"
|
"message": "刷新"
|
||||||
},
|
},
|
||||||
@@ -328,5 +347,17 @@
|
|||||||
},
|
},
|
||||||
"rename_list": {
|
"rename_list": {
|
||||||
"message": "重命名列表"
|
"message": "重命名列表"
|
||||||
|
},
|
||||||
|
"export_settings": {
|
||||||
|
"message": "导出"
|
||||||
|
},
|
||||||
|
"import_settings": {
|
||||||
|
"message": "导入"
|
||||||
|
},
|
||||||
|
"export_import_settings_label": {
|
||||||
|
"message": "导出 / 导入"
|
||||||
|
},
|
||||||
|
"export_import_settings_hint": {
|
||||||
|
"message": "备份或恢复列表和站点例外。"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,10 +2,10 @@
|
|||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "__MSG_extension_name__",
|
"name": "__MSG_extension_name__",
|
||||||
"description": "__MSG_extension_description__",
|
"description": "__MSG_extension_description__",
|
||||||
"version": "1.11.0",
|
"version": "1.13.0",
|
||||||
"default_locale": "en",
|
"default_locale": "en",
|
||||||
|
"id": "kdoehicejfnccbmecpkfjlbljpfogoep",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"contextMenus",
|
|
||||||
"scripting",
|
"scripting",
|
||||||
"storage",
|
"storage",
|
||||||
"tabs"
|
"tabs"
|
||||||
|
|||||||
470
popup/popup.css
470
popup/popup.css
@@ -799,52 +799,152 @@ body {
|
|||||||
.page-highlights-section {
|
.page-highlights-section {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 6px;
|
gap: 10px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-highlights-info-card {
|
.page-highlights-header-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
|
||||||
padding: 8px 10px;
|
|
||||||
background: var(--input-bg);
|
|
||||||
border: 1px solid var(--input-border);
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-highlights-info-card strong {
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--accent);
|
|
||||||
}
|
|
||||||
|
|
||||||
.refresh-button {
|
|
||||||
width: 100%;
|
|
||||||
min-height: 28px;
|
|
||||||
height: 28px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
background: var(--input-bg);
|
|
||||||
border: 1px solid var(--input-border);
|
|
||||||
border-radius: 8px;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--text-color);
|
|
||||||
transition: all 0.2s;
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.refresh-button:hover {
|
.page-highlights-total-label {
|
||||||
|
font-size: var(--text-xs);
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: var(--tracking-wide);
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: var(--text-color);
|
||||||
|
opacity: 0.7;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-total-count {
|
||||||
|
flex: 1;
|
||||||
|
font-size: var(--text-base);
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--accent);
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-controls {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-group-toggle {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 8px 10px;
|
||||||
|
margin: 0 -2px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: var(--text-sm);
|
||||||
|
color: var(--text-color);
|
||||||
|
background: var(--input-bg);
|
||||||
|
border: 1px solid var(--input-border);
|
||||||
|
transition: background 0.2s, border-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-group-toggle:hover {
|
||||||
background: var(--section-bg);
|
background: var(--section-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.refresh-button i {
|
.page-highlights-group-toggle .switch-wrapper {
|
||||||
font-size: 16px;
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-group-label {
|
||||||
|
flex: 1;
|
||||||
|
font-weight: 500;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-filters-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-filters-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 8px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-filters-actions .page-highlights-filter-link {
|
||||||
|
font-size: var(--text-xs);
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--text-color);
|
||||||
|
opacity: 0.7;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: underline;
|
||||||
|
text-underline-offset: 2px;
|
||||||
|
transition: opacity 0.2s, color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-filters-actions .page-highlights-filter-link:hover {
|
||||||
|
opacity: 1;
|
||||||
|
color: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-filters-actions span[aria-hidden="true"] {
|
||||||
|
font-size: var(--text-xs);
|
||||||
|
color: var(--text-color);
|
||||||
|
opacity: 0.5;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-filters {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 6px;
|
||||||
|
align-items: center;
|
||||||
|
max-height: 62px;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-filter-chip {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
padding: 4px 10px;
|
||||||
|
font-size: var(--text-xs);
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
background: var(--input-bg);
|
||||||
|
border: 1px solid var(--input-border);
|
||||||
|
color: var(--text-color);
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-filter-chip:hover {
|
||||||
|
background: var(--section-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-filter-chip.active {
|
||||||
|
border-color: var(--list-color, var(--accent));
|
||||||
|
background: color-mix(in srgb, var(--list-color, var(--accent)) 14%, var(--input-bg));
|
||||||
|
color: var(--text-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-filter-chip .filter-dot {
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 50%;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-highlights-list {
|
.page-highlights-list {
|
||||||
@@ -852,7 +952,7 @@ body {
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
background: var(--input-bg);
|
background: var(--input-bg);
|
||||||
border: 1px solid var(--input-border);
|
border: 1px solid var(--input-border);
|
||||||
border-radius: 8px;
|
border-radius: 6px;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -864,25 +964,74 @@ body {
|
|||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page-highlights-group-section {
|
||||||
|
border-bottom: 1px solid var(--input-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-group-section:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-group-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
padding: 6px 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: var(--text-xs);
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: var(--tracking-wide);
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: var(--text-color);
|
||||||
|
opacity: 0.7;
|
||||||
|
background: var(--section-bg);
|
||||||
|
transition: background 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-group-header:hover {
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-group-header i {
|
||||||
|
font-size: 10px;
|
||||||
|
transition: transform 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-group-section.collapsed .page-highlights-group-header i {
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlights-group-header .group-dot {
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 50%;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.page-highlight-item {
|
.page-highlight-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
padding: 10px 12px;
|
padding: 6px 12px 6px 14px;
|
||||||
border-bottom: 1px solid var(--input-border);
|
border-bottom: 1px solid var(--input-border);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
|
border-left: 3px solid transparent;
|
||||||
|
background: var(--input-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.page-highlight-item:last-child {
|
.page-highlight-item:last-child {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-highlight-item:hover {
|
.page-highlight-item:hover {
|
||||||
background: var(--section-bg);
|
background: var(--section-bg);
|
||||||
border-left: 3px solid var(--accent);
|
}
|
||||||
padding-left: 9px;
|
|
||||||
|
.page-highlight-item[style*="--item-tint"] {
|
||||||
|
background: color-mix(in srgb, var(--item-tint) 4%, var(--input-bg));
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-highlight-word {
|
.page-highlight-word {
|
||||||
@@ -891,14 +1040,31 @@ body {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-highlight-preview {
|
.page-highlight-preview {
|
||||||
display: inline-block;
|
display: inline-flex;
|
||||||
padding: 3px 8px;
|
align-items: center;
|
||||||
border-radius: 4px;
|
gap: 6px;
|
||||||
font-size: 13px;
|
padding: 2px 0;
|
||||||
|
font-size: var(--text-base);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
color: var(--text-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlight-preview .preview-dot {
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 50%;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-highlight-list-tag {
|
||||||
|
font-size: var(--text-xs);
|
||||||
|
color: var(--text-color);
|
||||||
|
opacity: 0.5;
|
||||||
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-highlight-position {
|
.page-highlight-position {
|
||||||
@@ -949,69 +1115,188 @@ body {
|
|||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.exception-toggle-btn {
|
.exceptions-mode-card {
|
||||||
|
padding: 6px 10px;
|
||||||
|
background: var(--input-bg);
|
||||||
|
border: 1px solid var(--input-border);
|
||||||
|
border-radius: 6px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.exceptions-mode-label {
|
||||||
|
font-size: var(--text-xs);
|
||||||
|
font-weight: 500;
|
||||||
|
letter-spacing: var(--tracking-wide);
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: var(--text-color);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.exceptions-mode-select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 32px;
|
min-height: 32px;
|
||||||
|
padding: 0 28px 0 10px;
|
||||||
|
font-size: var(--text-base);
|
||||||
|
color: var(--text-color);
|
||||||
|
background: var(--input-bg);
|
||||||
|
border: 1px solid var(--input-border);
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.exceptions-mode-hint {
|
||||||
|
margin: 0;
|
||||||
|
font-size: var(--text-xs);
|
||||||
|
color: var(--text-color);
|
||||||
|
opacity: 0.6;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.exceptions-add-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.exception-domain-input {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
|
padding: 0 10px;
|
||||||
|
font-size: var(--text-base);
|
||||||
|
background: var(--input-bg);
|
||||||
|
border: 1px solid var(--input-border);
|
||||||
|
border-radius: 6px;
|
||||||
|
color: var(--text-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.exception-domain-input:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.exception-add-btn {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
min-width: 32px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 8px;
|
border-radius: 6px;
|
||||||
background: var(--input-bg);
|
|
||||||
border: 1px solid var(--input-border);
|
|
||||||
border-radius: 8px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 14px;
|
|
||||||
color: var(--text-color);
|
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.exception-toggle-btn:hover {
|
.exception-add-btn i {
|
||||||
background: var(--section-bg);
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.exception-toggle-btn.danger {
|
.exceptions-add-current-link {
|
||||||
background: rgba(239, 68, 68, 0.1);
|
align-self: flex-start;
|
||||||
border-color: rgba(239, 68, 68, 0.3);
|
background: none;
|
||||||
color: var(--danger);
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
font-size: var(--text-xs);
|
||||||
|
color: var(--accent);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: opacity 0.2s, color 0.2s;
|
||||||
|
flex-shrink: 0;
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.exception-toggle-btn.danger:hover {
|
.exceptions-add-current-link:hover {
|
||||||
background: rgba(239, 68, 68, 0.2);
|
opacity: 0.9;
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.exception-toggle-btn i {
|
.exceptions-add-current-link:disabled {
|
||||||
font-size: 16px;
|
opacity: 0.5;
|
||||||
|
cursor: not-allowed;
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.exceptions-list-wrapper {
|
.exceptions-list-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 6px;
|
gap: 4px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.exceptions-list-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 8px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear-exceptions-link {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
font-size: var(--text-xs);
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--text-color);
|
||||||
|
opacity: 0.6;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: opacity 0.2s, color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear-exceptions-link:hover {
|
||||||
|
opacity: 1;
|
||||||
|
color: var(--danger);
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
.exceptions-list {
|
.exceptions-list {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
background: var(--input-bg);
|
background: var(--input-bg);
|
||||||
border: 1px solid var(--input-border);
|
border: 1px solid var(--input-border);
|
||||||
border-radius: 8px;
|
border-radius: 6px;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.exception-item {
|
.exception-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
gap: 10px;
|
||||||
gap: 12px;
|
padding: 8px 12px;
|
||||||
padding: 10px 12px;
|
|
||||||
border-bottom: 1px solid var(--input-border);
|
border-bottom: 1px solid var(--input-border);
|
||||||
transition: background 0.2s;
|
transition: background 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.exception-item .exception-domain-icon {
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
min-width: 22px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
font-size: 10px;
|
||||||
|
color: var(--text-color);
|
||||||
|
opacity: 0.5;
|
||||||
|
background: var(--section-bg);
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.exception-item .exception-domain-icon i {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.exception-item.exception-empty {
|
||||||
|
justify-content: center;
|
||||||
|
color: var(--text-color);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
|
||||||
.exception-item:last-child {
|
.exception-item:last-child {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
@@ -1022,24 +1307,25 @@ body {
|
|||||||
|
|
||||||
.exception-domain {
|
.exception-domain {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 14px;
|
font-size: var(--text-base);
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.exception-remove {
|
.exception-remove {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
padding: 4px;
|
padding: 2px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
transition: color 0.2s;
|
transition: color 0.2s;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
color: #9ca3af;
|
color: var(--text-color);
|
||||||
opacity: 0;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.exception-item:hover .exception-remove {
|
.exception-item:hover .exception-remove {
|
||||||
@@ -1048,35 +1334,13 @@ body {
|
|||||||
|
|
||||||
.exception-remove:hover {
|
.exception-remove:hover {
|
||||||
color: var(--danger);
|
color: var(--danger);
|
||||||
|
background: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.exception-remove i {
|
.exception-remove i {
|
||||||
font-size: 12px;
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clear-exceptions-btn {
|
|
||||||
width: 100%;
|
|
||||||
height: 40px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 8px;
|
|
||||||
background: rgba(239, 68, 68, 0.1);
|
|
||||||
border: 1px solid rgba(239, 68, 68, 0.3);
|
|
||||||
color: var(--danger);
|
|
||||||
border-radius: 8px;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 14px;
|
|
||||||
transition: all 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.clear-exceptions-btn:hover {
|
|
||||||
background: rgba(239, 68, 68, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.clear-exceptions-btn i {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Settings Overlay */
|
/* Settings Overlay */
|
||||||
.settings-overlay {
|
.settings-overlay {
|
||||||
@@ -1214,6 +1478,30 @@ body {
|
|||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.settings-export-import-section {
|
||||||
|
padding: 8px 10px;
|
||||||
|
background: var(--input-bg);
|
||||||
|
border: 1px solid var(--input-border);
|
||||||
|
border-radius: 6px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-export-import-label {
|
||||||
|
font-size: var(--text-md);
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--text-color);
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-export-import-hint {
|
||||||
|
font-size: var(--text-sm);
|
||||||
|
color: var(--text-color);
|
||||||
|
opacity: 0.6;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.options-buttons {
|
.options-buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
|||||||
@@ -198,16 +198,23 @@
|
|||||||
<div class="tab-content" data-tab-content="page-highlights">
|
<div class="tab-content" data-tab-content="page-highlights">
|
||||||
<div class="tab-inner">
|
<div class="tab-inner">
|
||||||
<div class="page-highlights-section">
|
<div class="page-highlights-section">
|
||||||
<div class="page-highlights-info-card">
|
<div class="page-highlights-header-row">
|
||||||
<span data-i18n="total_highlights">Total:</span>
|
<span class="page-highlights-total-label" data-i18n="total_matches">Total matches</span>
|
||||||
<strong id="totalHighlightsCount">0</strong>
|
<span class="page-highlights-total-count" id="totalHighlightsCount">0</span>
|
||||||
|
</div>
|
||||||
|
<div class="page-highlights-controls">
|
||||||
|
<label class="page-highlights-group-toggle">
|
||||||
|
<span class="switch-wrapper">
|
||||||
|
<input type="checkbox" id="pageHighlightsGroupByList" class="switch-input" />
|
||||||
|
<span class="switch-slider"></span>
|
||||||
|
</span>
|
||||||
|
<span class="page-highlights-group-label" data-i18n="group_by_list">Group by list</span>
|
||||||
|
</label>
|
||||||
|
<div class="page-highlights-filters-wrap">
|
||||||
|
<div id="pageHighlightsFiltersActions" class="page-highlights-filters-actions" hidden></div>
|
||||||
|
<div id="pageHighlightsListFilters" class="page-highlights-filters"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="refresh-button" id="refreshHighlightsBtn">
|
|
||||||
<i class="fa-solid fa-rotate"></i>
|
|
||||||
<span data-i18n="refresh">Refresh</span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<div id="pageHighlightsList" class="page-highlights-list"></div>
|
<div id="pageHighlightsList" class="page-highlights-list"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -217,27 +224,28 @@
|
|||||||
<div class="tab-content" data-tab-content="exceptions">
|
<div class="tab-content" data-tab-content="exceptions">
|
||||||
<div class="tab-inner">
|
<div class="tab-inner">
|
||||||
<div class="exceptions-section">
|
<div class="exceptions-section">
|
||||||
<label class="section-label">
|
<div class="exceptions-mode-card">
|
||||||
<i class="fa-solid fa-ban"></i>
|
<span class="exceptions-mode-label" data-i18n="exceptions_mode">Mode</span>
|
||||||
<span data-i18n="site_exceptions">Site Exceptions</span>
|
<select id="exceptionsModeSelect" class="exceptions-mode-select" aria-label="Exceptions mode">
|
||||||
</label>
|
<option value="blacklist" data-i18n="exceptions_mode_option_blacklist">Blacklist</option>
|
||||||
|
<option value="whitelist" data-i18n="exceptions_mode_option_whitelist">Whitelist</option>
|
||||||
<button class="exception-toggle-btn" id="toggleExceptionBtn">
|
</select>
|
||||||
|
<p class="exceptions-mode-hint" id="exceptionsModeHint" aria-live="polite"></p>
|
||||||
|
</div>
|
||||||
|
<div class="exceptions-add-row">
|
||||||
|
<input type="text" id="exceptionDomainInput" class="exception-domain-input" data-i18n="exception_domain_placeholder" placeholder="example.com" />
|
||||||
|
<button type="button" class="exception-add-btn btn-primary-subdued" id="addExceptionBtn" aria-label="Add">
|
||||||
<i class="fa-solid fa-plus"></i>
|
<i class="fa-solid fa-plus"></i>
|
||||||
<span id="exceptionBtnText" data-i18n="add_exception">Add to Exceptions</span>
|
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="exceptions-add-current-link" id="addCurrentSiteBtn" data-i18n="add_current_site">Add current site</button>
|
||||||
<div class="exceptions-list-wrapper">
|
<div class="exceptions-list-wrapper">
|
||||||
<label class="section-label">
|
<div class="exceptions-list-header">
|
||||||
<span data-i18n="exceptions_list">Exception Sites:</span>
|
<span class="exceptions-mode-label" id="exceptionsListLabel" data-i18n="exceptions_list">Exception Sites</span>
|
||||||
</label>
|
<button type="button" class="clear-exceptions-link" id="clearExceptionsBtn" data-i18n="clear_all">Clear all</button>
|
||||||
|
</div>
|
||||||
<div id="exceptionsList" class="exceptions-list"></div>
|
<div id="exceptionsList" class="exceptions-list"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="clear-exceptions-btn" id="clearExceptionsBtn">
|
|
||||||
<i class="fa-solid fa-trash"></i>
|
|
||||||
<span data-i18n="clear_all">Clear All</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -276,6 +284,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="settings-export-import-section">
|
||||||
|
<p class="settings-export-import-label" data-i18n="export_import_settings_label">Export / Import</p>
|
||||||
|
<p class="settings-export-import-hint" data-i18n="export_import_settings_hint">Back up or restore lists and site exceptions.</p>
|
||||||
|
<div class="list-export-import-row">
|
||||||
|
<button type="button" class="list-export-import-btn" id="exportSettingsBtn">
|
||||||
|
<i class="fa-solid fa-download"></i>
|
||||||
|
<span data-i18n="export_settings">Export</span>
|
||||||
|
</button>
|
||||||
|
<button type="button" class="list-export-import-btn" id="importSettingsBtn">
|
||||||
|
<i class="fa-solid fa-upload"></i>
|
||||||
|
<span data-i18n="import_settings">Import</span>
|
||||||
|
</button>
|
||||||
|
<input type="file" id="importSettingsInput" accept="application/json" hidden />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
214
sample-import-config.json
Normal file
214
sample-import-config.json
Normal file
@@ -0,0 +1,214 @@
|
|||||||
|
{
|
||||||
|
"lists": [
|
||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"background": "#fef08a",
|
||||||
|
"foreground": "#000000",
|
||||||
|
"id": 1,
|
||||||
|
"name": "Common 1",
|
||||||
|
"words": [
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "the" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "and" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "to" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "of" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "a" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "in" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "is" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "it" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"background": "#86efac",
|
||||||
|
"foreground": "#000000",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Common 2",
|
||||||
|
"words": [
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "you" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "that" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "he" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "was" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "for" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "on" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "are" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "with" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"background": "#93c5fd",
|
||||||
|
"foreground": "#000000",
|
||||||
|
"id": 3,
|
||||||
|
"name": "Common 3",
|
||||||
|
"words": [
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "as" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "I" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "his" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "they" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "be" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "at" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "one" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "have" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"background": "#f9a8d4",
|
||||||
|
"foreground": "#000000",
|
||||||
|
"id": 4,
|
||||||
|
"name": "Common 4",
|
||||||
|
"words": [
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "this" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "from" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "or" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "had" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "by" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "but" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "what" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "some" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"background": "#c4b5fd",
|
||||||
|
"foreground": "#000000",
|
||||||
|
"id": 5,
|
||||||
|
"name": "Common 5",
|
||||||
|
"words": [
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "we" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "can" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "out" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "other" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "were" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "all" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "there" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "when" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"background": "#fdba74",
|
||||||
|
"foreground": "#000000",
|
||||||
|
"id": 6,
|
||||||
|
"name": "Common 6",
|
||||||
|
"words": [
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "up" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "use" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "your" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "how" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "said" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "each" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "she" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "which" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"background": "#67e8f9",
|
||||||
|
"foreground": "#000000",
|
||||||
|
"id": 7,
|
||||||
|
"name": "Common 7",
|
||||||
|
"words": [
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "their" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "time" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "if" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "will" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "way" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "about" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "many" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "then" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"background": "#fda4af",
|
||||||
|
"foreground": "#000000",
|
||||||
|
"id": 8,
|
||||||
|
"name": "Common 8",
|
||||||
|
"words": [
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "them" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "would" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "write" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "like" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "so" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "these" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "her" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "long" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"background": "#a7f3d0",
|
||||||
|
"foreground": "#000000",
|
||||||
|
"id": 9,
|
||||||
|
"name": "Common 9",
|
||||||
|
"words": [
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "make" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "thing" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "see" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "him" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "two" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "has" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "look" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "more" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"background": "#e0e7ff",
|
||||||
|
"foreground": "#000000",
|
||||||
|
"id": 10,
|
||||||
|
"name": "Common 10",
|
||||||
|
"words": [
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "day" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "could" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "go" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "come" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "did" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "number" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "sound" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "no" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"background": "#fde68a",
|
||||||
|
"foreground": "#000000",
|
||||||
|
"id": 11,
|
||||||
|
"name": "Common 11",
|
||||||
|
"words": [
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "most" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "people" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "my" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "over" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "know" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "water" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "than" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "call" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"background": "#d1fae5",
|
||||||
|
"foreground": "#000000",
|
||||||
|
"id": 12,
|
||||||
|
"name": "Common 12",
|
||||||
|
"words": [
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "first" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "who" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "may" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "down" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "side" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "been" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "now" },
|
||||||
|
{ "active": true, "background": "", "foreground": "", "wordStr": "find" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"exceptionsList": [
|
||||||
|
"github.com",
|
||||||
|
"www.wikipedia.org"
|
||||||
|
],
|
||||||
|
"exceptionsWhiteList": [],
|
||||||
|
"exceptionsMode": "blacklist"
|
||||||
|
}
|
||||||
@@ -34,6 +34,8 @@
|
|||||||
--section-bg: #ffffff;
|
--section-bg: #ffffff;
|
||||||
--panel-bg: #ffffff;
|
--panel-bg: #ffffff;
|
||||||
--switch-bg: #e0e0e0;
|
--switch-bg: #e0e0e0;
|
||||||
|
--switch-thumb: #ffffff;
|
||||||
|
--switch-track-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
|
||||||
--checkbox-accent: #ff8c00;
|
--checkbox-accent: #ff8c00;
|
||||||
--checkbox-border: #d0d0d0;
|
--checkbox-border: #d0d0d0;
|
||||||
--focus-ring: 0 0 0 3px rgba(255, 140, 0, 0.25);
|
--focus-ring: 0 0 0 3px rgba(255, 140, 0, 0.25);
|
||||||
@@ -64,6 +66,8 @@ body.dark {
|
|||||||
--section-bg: #121212;
|
--section-bg: #121212;
|
||||||
--panel-bg: #121212;
|
--panel-bg: #121212;
|
||||||
--switch-bg: #2a2a2a;
|
--switch-bg: #2a2a2a;
|
||||||
|
--switch-thumb: #e5e5e5;
|
||||||
|
--switch-track-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
|
||||||
--checkbox-accent: #ff8c00;
|
--checkbox-accent: #ff8c00;
|
||||||
--checkbox-border: #333333;
|
--checkbox-border: #333333;
|
||||||
--focus-ring: 0 0 0 3px rgba(255, 140, 0, 0.3);
|
--focus-ring: 0 0 0 3px rgba(255, 140, 0, 0.3);
|
||||||
|
|||||||
@@ -93,8 +93,8 @@ button:disabled {
|
|||||||
.switch-wrapper {
|
.switch-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 40px;
|
width: 42px;
|
||||||
height: 22px;
|
height: 24px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
@@ -114,30 +114,46 @@ button:disabled {
|
|||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background-color: var(--input-border);
|
background-color: var(--input-border);
|
||||||
transition: 0.3s;
|
border-radius: 9999px;
|
||||||
border-radius: 11px;
|
box-shadow: var(--switch-track-shadow);
|
||||||
|
transition: background-color 0.25s ease, box-shadow 0.2s ease;
|
||||||
|
backface-visibility: hidden;
|
||||||
|
-webkit-backface-visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.switch-slider:before {
|
.switch-slider:before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
content: "";
|
content: "";
|
||||||
height: 16px;
|
width: 18px;
|
||||||
width: 16px;
|
height: 18px;
|
||||||
left: 2px;
|
left: 3px;
|
||||||
bottom: 2px;
|
top: 3px;
|
||||||
background-color: white;
|
background-color: var(--switch-thumb);
|
||||||
transition: 0.3s;
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.04);
|
||||||
|
transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
backface-visibility: hidden;
|
||||||
|
-webkit-backface-visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.switch-input:checked + .switch-slider {
|
.switch-input:checked + .switch-slider {
|
||||||
background-color: var(--accent);
|
background-color: var(--accent);
|
||||||
|
box-shadow: var(--switch-track-shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.switch-input:checked + .switch-slider:before {
|
.switch-input:checked + .switch-slider:before {
|
||||||
transform: translateX(18px);
|
transform: translateX(18px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.switch-wrapper:hover .switch-slider:before {
|
||||||
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
|
||||||
|
}
|
||||||
|
|
||||||
|
.switch-input:focus-visible + .switch-slider {
|
||||||
|
outline: 2px solid var(--accent);
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Switch Toggle (Checkbox Style) */
|
/* Switch Toggle (Checkbox Style) */
|
||||||
input[type="checkbox"].switch {
|
input[type="checkbox"].switch {
|
||||||
|
|||||||
@@ -38,9 +38,16 @@ class BackgroundService {
|
|||||||
|
|
||||||
private setupInstallListener(): void {
|
private setupInstallListener(): void {
|
||||||
chrome.runtime.onInstalled.addListener(async (): Promise<void> => {
|
chrome.runtime.onInstalled.addListener(async (): Promise<void> => {
|
||||||
const data = await StorageService.get(['exceptionsList']);
|
const data = await StorageService.get(['exceptionsList', 'exceptionsWhiteList', 'exceptionsMode']);
|
||||||
if (!data.exceptionsList) {
|
const updates: Record<string, unknown> = {};
|
||||||
await StorageService.update('exceptionsList', []);
|
if (data.exceptionsWhiteList === undefined) {
|
||||||
|
updates.exceptionsWhiteList = [];
|
||||||
|
}
|
||||||
|
if (data.exceptionsMode !== 'blacklist' && data.exceptionsMode !== 'whitelist') {
|
||||||
|
updates.exceptionsMode = 'blacklist';
|
||||||
|
}
|
||||||
|
if (Object.keys(updates).length > 0) {
|
||||||
|
await chrome.storage.local.set(updates);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { HighlightList, MessageData } from '../types.js';
|
import { HighlightList, MessageData, ExceptionsMode } from '../types.js';
|
||||||
import { StorageService } from '../services/StorageService.js';
|
import { StorageService } from '../services/StorageService.js';
|
||||||
import { MessageService } from '../services/MessageService.js';
|
import { MessageService } from '../services/MessageService.js';
|
||||||
import { HighlightEngine } from './HighlightEngine.js';
|
import { HighlightEngine } from './HighlightEngine.js';
|
||||||
@@ -7,7 +7,9 @@ export class ContentScript {
|
|||||||
private lists: HighlightList[] = [];
|
private lists: HighlightList[] = [];
|
||||||
private isGlobalHighlightEnabled = true;
|
private isGlobalHighlightEnabled = true;
|
||||||
private exceptionsList: string[] = [];
|
private exceptionsList: string[] = [];
|
||||||
private isCurrentSiteException = false;
|
private exceptionsWhiteList: string[] = [];
|
||||||
|
private exceptionsMode: ExceptionsMode = 'blacklist';
|
||||||
|
private shouldSkipDueToExceptions = false;
|
||||||
private matchCase = false;
|
private matchCase = false;
|
||||||
private matchWhole = false;
|
private matchWhole = false;
|
||||||
private highlightEngine: HighlightEngine;
|
private highlightEngine: HighlightEngine;
|
||||||
@@ -30,7 +32,9 @@ export class ContentScript {
|
|||||||
'globalHighlightEnabled',
|
'globalHighlightEnabled',
|
||||||
'matchCaseEnabled',
|
'matchCaseEnabled',
|
||||||
'matchWholeEnabled',
|
'matchWholeEnabled',
|
||||||
'exceptionsList'
|
'exceptionsList',
|
||||||
|
'exceptionsWhiteList',
|
||||||
|
'exceptionsMode'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
this.lists = data.lists || [];
|
this.lists = data.lists || [];
|
||||||
@@ -38,12 +42,23 @@ export class ContentScript {
|
|||||||
this.matchCase = data.matchCaseEnabled ?? false;
|
this.matchCase = data.matchCaseEnabled ?? false;
|
||||||
this.matchWhole = data.matchWholeEnabled ?? false;
|
this.matchWhole = data.matchWholeEnabled ?? false;
|
||||||
this.exceptionsList = data.exceptionsList || [];
|
this.exceptionsList = data.exceptionsList || [];
|
||||||
this.isCurrentSiteException = this.checkCurrentSiteException();
|
this.exceptionsWhiteList = data.exceptionsWhiteList || [];
|
||||||
|
this.exceptionsMode = data.exceptionsMode === 'whitelist' ? 'whitelist' : 'blacklist';
|
||||||
|
this.shouldSkipDueToExceptions = this.computeShouldSkipDueToExceptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
private checkCurrentSiteException(): boolean {
|
private getCurrentExceptionsList(): string[] {
|
||||||
|
return this.exceptionsMode === 'whitelist' ? this.exceptionsWhiteList : this.exceptionsList;
|
||||||
|
}
|
||||||
|
|
||||||
|
private computeShouldSkipDueToExceptions(): boolean {
|
||||||
const currentHostname = window.location.hostname;
|
const currentHostname = window.location.hostname;
|
||||||
return this.exceptionsList.includes(currentHostname);
|
const list = this.getCurrentExceptionsList();
|
||||||
|
const isInList = list.includes(currentHostname);
|
||||||
|
if (this.exceptionsMode === 'blacklist') {
|
||||||
|
return isInList;
|
||||||
|
}
|
||||||
|
return !isInList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private setupMessageListener(): void {
|
private setupMessageListener(): void {
|
||||||
@@ -91,9 +106,11 @@ export class ContentScript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async handleExceptionsUpdate(): Promise<void> {
|
private async handleExceptionsUpdate(): Promise<void> {
|
||||||
const data = await StorageService.get(['exceptionsList']);
|
const data = await StorageService.get(['exceptionsList', 'exceptionsWhiteList', 'exceptionsMode']);
|
||||||
this.exceptionsList = data.exceptionsList || [];
|
this.exceptionsList = data.exceptionsList || [];
|
||||||
this.isCurrentSiteException = this.checkCurrentSiteException();
|
this.exceptionsWhiteList = data.exceptionsWhiteList || [];
|
||||||
|
this.exceptionsMode = data.exceptionsMode === 'whitelist' ? 'whitelist' : 'blacklist';
|
||||||
|
this.shouldSkipDueToExceptions = this.computeShouldSkipDueToExceptions();
|
||||||
this.processHighlights();
|
this.processHighlights();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,7 +119,7 @@ export class ContentScript {
|
|||||||
this.isProcessing = true;
|
this.isProcessing = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!this.isGlobalHighlightEnabled || this.isCurrentSiteException) {
|
if (!this.isGlobalHighlightEnabled || this.shouldSkipDueToExceptions) {
|
||||||
this.highlightEngine.clearHighlights();
|
this.highlightEngine.clearHighlights();
|
||||||
this.highlightEngine.stopObserving();
|
this.highlightEngine.stopObserving();
|
||||||
return;
|
return;
|
||||||
@@ -124,13 +141,15 @@ export class ContentScript {
|
|||||||
activeWords.push({
|
activeWords.push({
|
||||||
text: word.wordStr,
|
text: word.wordStr,
|
||||||
background: word.background || list.background,
|
background: word.background || list.background,
|
||||||
foreground: word.foreground || list.foreground
|
foreground: word.foreground || list.foreground,
|
||||||
|
listId: list.id,
|
||||||
|
listName: list.name || 'Default'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const highlights = this.highlightEngine.getPageHighlights(activeWords);
|
const highlights = this.highlightEngine.getPageHighlights(activeWords);
|
||||||
sendResponse({ highlights });
|
sendResponse({ highlights, lists: this.lists.filter(l => l.active) });
|
||||||
}
|
}
|
||||||
|
|
||||||
private handleScrollToHighlight(word: string, index: number): void {
|
private handleScrollToHighlight(word: string, index: number): void {
|
||||||
|
|||||||
@@ -419,8 +419,8 @@ export class HighlightEngine {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getPageHighlights(activeWords: ActiveWord[]): Array<{ word: string; count: number; background: string; foreground: string }> {
|
getPageHighlights(activeWords: ActiveWord[]): Array<{ word: string; count: number; background: string; foreground: string; listId?: number; listName?: string; listNames: string[] }> {
|
||||||
const seen = new Map<string, { word: string; count: number; background: string; foreground: string }>();
|
const seen = new Map<string, { word: string; count: number; background: string; foreground: string; listId?: number; listName?: string; listNames: string[] }>();
|
||||||
|
|
||||||
for (const activeWord of activeWords) {
|
for (const activeWord of activeWords) {
|
||||||
const lookup = this.currentMatchCase ? activeWord.text : activeWord.text.toLowerCase();
|
const lookup = this.currentMatchCase ? activeWord.text : activeWord.text.toLowerCase();
|
||||||
@@ -429,15 +429,28 @@ export class HighlightEngine {
|
|||||||
|
|
||||||
const totalCount = (ranges?.length || 0) + (textareaMatches?.length || 0);
|
const totalCount = (ranges?.length || 0) + (textareaMatches?.length || 0);
|
||||||
|
|
||||||
if (totalCount > 0 && !seen.has(lookup)) {
|
if (totalCount > 0) {
|
||||||
|
const listName = activeWord.listName || 'Default';
|
||||||
|
const listId = activeWord.listId;
|
||||||
|
|
||||||
|
if (seen.has(lookup)) {
|
||||||
|
const existing = seen.get(lookup)!;
|
||||||
|
if (listName && !existing.listNames.includes(listName)) {
|
||||||
|
existing.listNames.push(listName);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
seen.set(lookup, {
|
seen.set(lookup, {
|
||||||
word: activeWord.text,
|
word: activeWord.text,
|
||||||
count: totalCount,
|
count: totalCount,
|
||||||
background: activeWord.background,
|
background: activeWord.background,
|
||||||
foreground: activeWord.foreground
|
foreground: activeWord.foreground,
|
||||||
|
listId,
|
||||||
|
listName,
|
||||||
|
listNames: [listName]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return Array.from(seen.values());
|
return Array.from(seen.values());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { HighlightList, HighlightWord, HighlightInfo } from '../types.js';
|
import { HighlightList, HighlightWord, HighlightInfo, ExportData, ExceptionsMode } from '../types.js';
|
||||||
import { StorageService } from '../services/StorageService.js';
|
import { StorageService } from '../services/StorageService.js';
|
||||||
import { MessageService } from '../services/MessageService.js';
|
import { MessageService } from '../services/MessageService.js';
|
||||||
import { DOMUtils } from '../utils/DOMUtils.js';
|
import { DOMUtils } from '../utils/DOMUtils.js';
|
||||||
@@ -15,9 +15,20 @@ export class PopupController {
|
|||||||
private matchCaseEnabled = false;
|
private matchCaseEnabled = false;
|
||||||
private matchWholeEnabled = false;
|
private matchWholeEnabled = false;
|
||||||
private exceptionsList: string[] = [];
|
private exceptionsList: string[] = [];
|
||||||
|
private exceptionsWhiteList: string[] = [];
|
||||||
|
private exceptionsMode: ExceptionsMode = 'blacklist';
|
||||||
|
|
||||||
|
private getCurrentExceptionsList(): string[] {
|
||||||
|
return this.exceptionsMode === 'whitelist' ? this.exceptionsWhiteList : this.exceptionsList;
|
||||||
|
}
|
||||||
|
|
||||||
private currentTabHost = '';
|
private currentTabHost = '';
|
||||||
private activeTab = 'lists';
|
private activeTab = 'lists';
|
||||||
private pageHighlights: Array<{ word: string; count: number; background: string; foreground: string }> = [];
|
private pageHighlights: Array<{ word: string; count: number; background: string; foreground: string; listId?: number; listName?: string; listNames: string[] }> = [];
|
||||||
|
private pageHighlightsActiveLists: Array<{ id: number; name: string; background: string }> = [];
|
||||||
|
private pageHighlightsGroupByList = false;
|
||||||
|
private pageHighlightsListFilter = new Set<number>();
|
||||||
|
private pageHighlightsCollapsedGroups = new Set<string>();
|
||||||
private highlightIndices = new Map<string, number>();
|
private highlightIndices = new Map<string, number>();
|
||||||
private wordMenuOpenForIndex: number | null = null;
|
private wordMenuOpenForIndex: number | null = null;
|
||||||
private wordMenuCopyOnly = false;
|
private wordMenuCopyOnly = false;
|
||||||
@@ -54,6 +65,8 @@ export class PopupController {
|
|||||||
this.matchCaseEnabled = data.matchCaseEnabled ?? false;
|
this.matchCaseEnabled = data.matchCaseEnabled ?? false;
|
||||||
this.matchWholeEnabled = data.matchWholeEnabled ?? false;
|
this.matchWholeEnabled = data.matchWholeEnabled ?? false;
|
||||||
this.exceptionsList = data.exceptionsList || [];
|
this.exceptionsList = data.exceptionsList || [];
|
||||||
|
this.exceptionsWhiteList = data.exceptionsWhiteList || [];
|
||||||
|
this.exceptionsMode = data.exceptionsMode === 'whitelist' ? 'whitelist' : 'blacklist';
|
||||||
|
|
||||||
if (this.lists.length === 0) {
|
if (this.lists.length === 0) {
|
||||||
this.lists.push({
|
this.lists.push({
|
||||||
@@ -93,6 +106,8 @@ export class PopupController {
|
|||||||
wordSearchQuery?: string;
|
wordSearchQuery?: string;
|
||||||
currentPage?: number;
|
currentPage?: number;
|
||||||
scrollPositions?: Record<string, number>;
|
scrollPositions?: Record<string, number>;
|
||||||
|
pageHighlightsGroupByList?: boolean;
|
||||||
|
pageHighlightsListFilter?: number[];
|
||||||
};
|
};
|
||||||
if (typeof state.activeTab === 'string' && state.activeTab !== 'options') {
|
if (typeof state.activeTab === 'string' && state.activeTab !== 'options') {
|
||||||
this.activeTab = state.activeTab;
|
this.activeTab = state.activeTab;
|
||||||
@@ -109,18 +124,26 @@ export class PopupController {
|
|||||||
if (state.scrollPositions && typeof state.scrollPositions === 'object') {
|
if (state.scrollPositions && typeof state.scrollPositions === 'object') {
|
||||||
this.scrollPositions = { ...state.scrollPositions };
|
this.scrollPositions = { ...state.scrollPositions };
|
||||||
}
|
}
|
||||||
|
if (typeof state.pageHighlightsGroupByList === 'boolean') {
|
||||||
|
this.pageHighlightsGroupByList = state.pageHighlightsGroupByList;
|
||||||
|
}
|
||||||
|
if (Array.isArray(state.pageHighlightsListFilter)) {
|
||||||
|
this.pageHighlightsListFilter = new Set(state.pageHighlightsListFilter);
|
||||||
|
}
|
||||||
} catch {
|
} catch {
|
||||||
// keep defaults
|
// keep defaults
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private getPopupStatePayload(): { activeTab: string; currentListIndex: number; wordSearchQuery: string; currentPage: number; scrollPositions: Record<string, number> } {
|
private getPopupStatePayload(): { activeTab: string; currentListIndex: number; wordSearchQuery: string; currentPage: number; scrollPositions: Record<string, number>; pageHighlightsGroupByList: boolean; pageHighlightsListFilter: number[] } {
|
||||||
return {
|
return {
|
||||||
activeTab: this.activeTab,
|
activeTab: this.activeTab,
|
||||||
currentListIndex: this.currentListIndex,
|
currentListIndex: this.currentListIndex,
|
||||||
wordSearchQuery: this.wordSearchQuery,
|
wordSearchQuery: this.wordSearchQuery,
|
||||||
currentPage: this.currentPage,
|
currentPage: this.currentPage,
|
||||||
scrollPositions: this.scrollPositions
|
scrollPositions: this.scrollPositions,
|
||||||
|
pageHighlightsGroupByList: this.pageHighlightsGroupByList,
|
||||||
|
pageHighlightsListFilter: Array.from(this.pageHighlightsListFilter)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,6 +254,7 @@ export class PopupController {
|
|||||||
this.setupTabs();
|
this.setupTabs();
|
||||||
this.setupScrollListeners();
|
this.setupScrollListeners();
|
||||||
this.setupSettingsOverlay();
|
this.setupSettingsOverlay();
|
||||||
|
this.setupSettingsExportImport();
|
||||||
this.setupListManagement();
|
this.setupListManagement();
|
||||||
this.setupWordManagement();
|
this.setupWordManagement();
|
||||||
this.setupSettings();
|
this.setupSettings();
|
||||||
@@ -261,6 +285,105 @@ export class PopupController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private setupSettingsExportImport(): void {
|
||||||
|
const importSettingsInput = document.getElementById('importSettingsInput') as HTMLInputElement;
|
||||||
|
|
||||||
|
document.getElementById('exportSettingsBtn')?.addEventListener('click', () => {
|
||||||
|
const data: ExportData = {
|
||||||
|
lists: this.lists,
|
||||||
|
exceptionsList: [...this.exceptionsList],
|
||||||
|
exceptionsWhiteList: [...this.exceptionsWhiteList],
|
||||||
|
exceptionsMode: this.exceptionsMode
|
||||||
|
};
|
||||||
|
const blob = new Blob([JSON.stringify(data, null, 2)], { type: 'application/json' });
|
||||||
|
const url = URL.createObjectURL(blob);
|
||||||
|
const a = document.createElement('a');
|
||||||
|
a.href = url;
|
||||||
|
a.download = 'goose-highlighter-settings.json';
|
||||||
|
a.click();
|
||||||
|
URL.revokeObjectURL(url);
|
||||||
|
});
|
||||||
|
|
||||||
|
document.getElementById('importSettingsBtn')?.addEventListener('click', () => {
|
||||||
|
importSettingsInput?.click();
|
||||||
|
});
|
||||||
|
|
||||||
|
importSettingsInput?.addEventListener('change', (e) => {
|
||||||
|
const file = (e.target as HTMLInputElement).files?.[0];
|
||||||
|
if (!file) return;
|
||||||
|
|
||||||
|
const reader = new FileReader();
|
||||||
|
reader.onload = async (event) => {
|
||||||
|
try {
|
||||||
|
const raw = event.target?.result as string;
|
||||||
|
const data = JSON.parse(raw) as unknown;
|
||||||
|
|
||||||
|
if (!data || typeof data !== 'object') {
|
||||||
|
alert(chrome.i18n.getMessage('invalid_import_format') || 'Invalid file format. Please select a valid export file.');
|
||||||
|
importSettingsInput.value = '';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const obj = data as Record<string, unknown>;
|
||||||
|
let listsApplied = false;
|
||||||
|
let exceptionsApplied = false;
|
||||||
|
|
||||||
|
if (Array.isArray(obj.lists) && obj.lists.length > 0) {
|
||||||
|
const baseId = Date.now();
|
||||||
|
const validLists = obj.lists
|
||||||
|
.filter((item: unknown) => this.isValidList(item))
|
||||||
|
.map((item: HighlightList, i: number) => ({ ...item, id: baseId + i }));
|
||||||
|
if (validLists.length > 0) {
|
||||||
|
this.lists = validLists;
|
||||||
|
this.currentListIndex = Math.min(this.currentListIndex, this.lists.length - 1);
|
||||||
|
listsApplied = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Array.isArray(obj.exceptionsList)) {
|
||||||
|
this.exceptionsList = obj.exceptionsList.filter((d): d is string => typeof d === 'string');
|
||||||
|
exceptionsApplied = true;
|
||||||
|
}
|
||||||
|
if (Array.isArray(obj.exceptionsWhiteList)) {
|
||||||
|
this.exceptionsWhiteList = obj.exceptionsWhiteList.filter((d): d is string => typeof d === 'string');
|
||||||
|
exceptionsApplied = true;
|
||||||
|
}
|
||||||
|
if (obj.exceptionsMode === 'whitelist' || obj.exceptionsMode === 'blacklist') {
|
||||||
|
this.exceptionsMode = obj.exceptionsMode;
|
||||||
|
exceptionsApplied = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!listsApplied && !exceptionsApplied) {
|
||||||
|
alert(chrome.i18n.getMessage('invalid_import_format') || 'Invalid file format. Please select a valid export file.');
|
||||||
|
importSettingsInput.value = '';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (listsApplied && this.lists.length === 0) {
|
||||||
|
this.lists.push({
|
||||||
|
id: Date.now(),
|
||||||
|
name: chrome.i18n.getMessage('default_list_name') || 'Default List',
|
||||||
|
background: '#ffff00',
|
||||||
|
foreground: '#000000',
|
||||||
|
active: true,
|
||||||
|
words: []
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
await this.save();
|
||||||
|
MessageService.sendToAllTabs({ type: 'WORD_LIST_UPDATED' });
|
||||||
|
MessageService.sendToAllTabs({ type: 'EXCEPTIONS_LIST_UPDATED' });
|
||||||
|
this.render();
|
||||||
|
importSettingsInput.value = '';
|
||||||
|
} catch (err) {
|
||||||
|
alert((chrome.i18n.getMessage('invalid_json_error') || 'Invalid JSON file') + ': ' + (err as Error).message);
|
||||||
|
importSettingsInput.value = '';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
reader.readAsText(file);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private setupTabs(): void {
|
private setupTabs(): void {
|
||||||
document.querySelectorAll('.tab-button').forEach(button => {
|
document.querySelectorAll('.tab-button').forEach(button => {
|
||||||
button.addEventListener('click', () => {
|
button.addEventListener('click', () => {
|
||||||
@@ -818,14 +941,24 @@ export class PopupController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private setupPageHighlights(): void {
|
private setupPageHighlights(): void {
|
||||||
document.getElementById('refreshHighlightsBtn')?.addEventListener('click', async () => {
|
|
||||||
await this.loadPageHighlights();
|
|
||||||
});
|
|
||||||
|
|
||||||
document.getElementById('pageHighlightsList')?.addEventListener('click', async (e) => {
|
document.getElementById('pageHighlightsList')?.addEventListener('click', async (e) => {
|
||||||
const target = e.target as HTMLElement;
|
const target = e.target as HTMLElement;
|
||||||
const item = target.closest('.page-highlight-item') as HTMLElement;
|
const groupHeader = target.closest('.page-highlights-group-header');
|
||||||
|
if (groupHeader) {
|
||||||
|
const section = groupHeader.closest('.page-highlights-group-section');
|
||||||
|
const groupKey = section?.getAttribute('data-group');
|
||||||
|
if (groupKey) {
|
||||||
|
if (this.pageHighlightsCollapsedGroups.has(groupKey)) {
|
||||||
|
this.pageHighlightsCollapsedGroups.delete(groupKey);
|
||||||
|
} else {
|
||||||
|
this.pageHighlightsCollapsedGroups.add(groupKey);
|
||||||
|
}
|
||||||
|
this.renderPageHighlights();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const item = target.closest('.page-highlight-item') as HTMLElement;
|
||||||
if (!item) return;
|
if (!item) return;
|
||||||
|
|
||||||
const word = item.dataset.word;
|
const word = item.dataset.word;
|
||||||
@@ -844,6 +977,12 @@ export class PopupController {
|
|||||||
await this.jumpToHighlight(word, currentIndex);
|
await this.jumpToHighlight(word, currentIndex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
document.getElementById('pageHighlightsGroupByList')?.addEventListener('change', (e) => {
|
||||||
|
this.pageHighlightsGroupByList = (e.target as HTMLInputElement).checked;
|
||||||
|
this.savePopupState();
|
||||||
|
this.renderPageHighlights();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private async loadPageHighlights(): Promise<void> {
|
private async loadPageHighlights(): Promise<void> {
|
||||||
@@ -851,15 +990,26 @@ export class PopupController {
|
|||||||
const response = await MessageService.sendToActiveTab({ type: 'GET_PAGE_HIGHLIGHTS' });
|
const response = await MessageService.sendToActiveTab({ type: 'GET_PAGE_HIGHLIGHTS' });
|
||||||
|
|
||||||
if (response && response.highlights) {
|
if (response && response.highlights) {
|
||||||
this.pageHighlights = response.highlights;
|
this.pageHighlights = response.highlights.map((h: { word: string; count: number; background: string; foreground: string; listId?: number; listName?: string; listNames?: string[] }) => ({
|
||||||
|
...h,
|
||||||
|
listNames: h.listNames || (h.listName ? [h.listName] : [])
|
||||||
|
}));
|
||||||
|
this.pageHighlightsActiveLists = response.lists || [];
|
||||||
|
const listIdsOnPage = this.getListIdsWithMatchesOnPage();
|
||||||
|
if (listIdsOnPage.size > 0) {
|
||||||
|
this.pageHighlightsListFilter = new Set(listIdsOnPage);
|
||||||
|
}
|
||||||
this.highlightIndices.clear();
|
this.highlightIndices.clear();
|
||||||
this.pageHighlights.forEach(h => this.highlightIndices.set(h.word, 0));
|
this.pageHighlights.forEach(h => this.highlightIndices.set(h.word, 0));
|
||||||
this.renderPageHighlights();
|
this.renderPageHighlights();
|
||||||
|
this.renderPageHighlightsFilters();
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Error loading page highlights:', e);
|
console.error('Error loading page highlights:', e);
|
||||||
this.pageHighlights = [];
|
this.pageHighlights = [];
|
||||||
|
this.pageHighlightsActiveLists = [];
|
||||||
this.renderPageHighlights();
|
this.renderPageHighlights();
|
||||||
|
this.renderPageHighlightsFilters();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -886,26 +1036,25 @@ export class PopupController {
|
|||||||
await this.jumpToHighlight(word, newIndex);
|
await this.jumpToHighlight(word, newIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
private renderPageHighlights(): void {
|
private passesListFilter(h: { listId?: number; listNames: string[] }): boolean {
|
||||||
const container = document.getElementById('pageHighlightsList');
|
if (this.pageHighlightsListFilter.size === 0) return true;
|
||||||
const countElement = document.getElementById('totalHighlightsCount');
|
if (this.pageHighlightsListFilter.has(-1)) return false;
|
||||||
|
const wordListIds = new Set<number>();
|
||||||
if (!container || !countElement) return;
|
if (h.listId !== undefined) wordListIds.add(h.listId);
|
||||||
|
for (const name of h.listNames) {
|
||||||
const totalCount = this.pageHighlights.reduce((sum, h) => sum + h.count, 0);
|
const list = this.pageHighlightsActiveLists.find(l => l.name === name);
|
||||||
countElement.textContent = totalCount.toString();
|
if (list) wordListIds.add(list.id);
|
||||||
|
}
|
||||||
if (this.pageHighlights.length === 0) {
|
return [...wordListIds].some(id => this.pageHighlightsListFilter.has(id));
|
||||||
container.innerHTML = `<div class="page-highlights-empty">${chrome.i18n.getMessage('no_highlights_on_page') || 'No highlights on this page'}</div>`;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
container.innerHTML = this.pageHighlights.map(highlight => {
|
private renderPageHighlightsItem(highlight: { word: string; count: number; background: string; foreground: string; listNames: string[] }): string {
|
||||||
const currentIndex = this.highlightIndices.get(highlight.word) || 0;
|
const currentIndex = this.highlightIndices.get(highlight.word) || 0;
|
||||||
return `
|
return `
|
||||||
<div class="page-highlight-item" data-word="${DOMUtils.escapeHtml(highlight.word)}">
|
<div class="page-highlight-item" data-word="${DOMUtils.escapeHtml(highlight.word)}" style="border-left-color: ${highlight.background}; --item-tint: ${highlight.background};">
|
||||||
<div class="page-highlight-word">
|
<div class="page-highlight-word">
|
||||||
<span class="page-highlight-preview" style="background-color: ${highlight.background}; color: ${highlight.foreground};">
|
<span class="page-highlight-preview">
|
||||||
|
<span class="preview-dot" style="background-color: ${highlight.background};"></span>
|
||||||
${DOMUtils.escapeHtml(highlight.word)}
|
${DOMUtils.escapeHtml(highlight.word)}
|
||||||
</span>
|
</span>
|
||||||
${highlight.count > 1 ? `<span class="page-highlight-position">${currentIndex + 1}/${highlight.count}</span>` : ''}
|
${highlight.count > 1 ? `<span class="page-highlight-position">${currentIndex + 1}/${highlight.count}</span>` : ''}
|
||||||
@@ -922,48 +1071,230 @@ export class PopupController {
|
|||||||
` : ''}
|
` : ''}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}).join('');
|
}
|
||||||
|
|
||||||
|
private renderPageHighlights(): void {
|
||||||
|
const container = document.getElementById('pageHighlightsList');
|
||||||
|
const countElement = document.getElementById('totalHighlightsCount');
|
||||||
|
|
||||||
|
if (!container || !countElement) return;
|
||||||
|
|
||||||
|
const filtered = this.pageHighlights.filter(h => this.passesListFilter(h));
|
||||||
|
const totalCount = filtered.reduce((sum, h) => sum + h.count, 0);
|
||||||
|
countElement.textContent = totalCount.toString();
|
||||||
|
|
||||||
|
if (filtered.length === 0) {
|
||||||
|
container.innerHTML = `<div class="page-highlights-empty">${chrome.i18n.getMessage('no_highlights_on_page') || 'No highlights on this page'}</div>`;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.pageHighlightsGroupByList && this.pageHighlightsActiveLists.length > 0) {
|
||||||
|
const listIds = new Set(this.pageHighlightsActiveLists.map(l => l.id).filter(id => this.pageHighlightsListFilter.has(id) || this.pageHighlightsListFilter.size === 0));
|
||||||
|
const groupOrder = this.pageHighlightsActiveLists.filter(l => listIds.has(l.id));
|
||||||
|
let html = '';
|
||||||
|
for (const list of groupOrder) {
|
||||||
|
const items = filtered.filter(h => h.listId === list.id || (h.listNames && h.listNames.includes(list.name)));
|
||||||
|
if (items.length === 0) continue;
|
||||||
|
const groupKey = `list-${list.id}`;
|
||||||
|
const collapsed = this.pageHighlightsCollapsedGroups.has(groupKey);
|
||||||
|
const chevron = collapsed ? 'fa-chevron-right' : 'fa-chevron-down';
|
||||||
|
html += `
|
||||||
|
<div class="page-highlights-group-section ${collapsed ? 'collapsed' : ''}" data-group="${groupKey}">
|
||||||
|
<div class="page-highlights-group-header">
|
||||||
|
<i class="fa-solid ${chevron}"></i>
|
||||||
|
<span class="group-dot" style="background-color: ${list.background};"></span>
|
||||||
|
<span>${DOMUtils.escapeHtml(list.name)}</span>
|
||||||
|
<span style="opacity: 0.6; margin-left: 4px;">(${items.reduce((s, i) => s + i.count, 0)})</span>
|
||||||
|
</div>
|
||||||
|
${collapsed ? '' : items.map(h => this.renderPageHighlightsItem(h)).join('')}
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
const ungrouped = filtered.filter(h => !groupOrder.some(l => h.listId === l.id || (h.listNames && h.listNames.includes(l.name))));
|
||||||
|
if (ungrouped.length > 0) {
|
||||||
|
const groupKey = 'list-other';
|
||||||
|
const collapsed = this.pageHighlightsCollapsedGroups.has(groupKey);
|
||||||
|
const chevron = collapsed ? 'fa-chevron-right' : 'fa-chevron-down';
|
||||||
|
html += `
|
||||||
|
<div class="page-highlights-group-section ${collapsed ? 'collapsed' : ''}" data-group="${groupKey}">
|
||||||
|
<div class="page-highlights-group-header">
|
||||||
|
<i class="fa-solid ${chevron}"></i>
|
||||||
|
<span style="opacity: 0.6;">${chrome.i18n.getMessage('other') || 'Other'}</span>
|
||||||
|
</div>
|
||||||
|
${collapsed ? '' : ungrouped.map(h => this.renderPageHighlightsItem(h)).join('')}
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
container.innerHTML = html;
|
||||||
|
} else {
|
||||||
|
container.innerHTML = filtered.map(h => this.renderPageHighlightsItem(h)).join('');
|
||||||
|
}
|
||||||
|
|
||||||
if (this.activeTab === 'page-highlights') {
|
if (this.activeTab === 'page-highlights') {
|
||||||
requestAnimationFrame(() => this.restoreScrollPositions());
|
requestAnimationFrame(() => this.restoreScrollPositions());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private setupExceptions(): void {
|
private static readonly PAGE_HIGHLIGHTS_MANY_LISTS_THRESHOLD = 8;
|
||||||
document.getElementById('toggleExceptionBtn')?.addEventListener('click', async () => {
|
|
||||||
if (!this.currentTabHost) return;
|
|
||||||
|
|
||||||
const isException = this.exceptionsList.includes(this.currentTabHost);
|
/** List IDs that have at least one highlight on the current page (from pageHighlights). */
|
||||||
|
private getListIdsWithMatchesOnPage(): Set<number> {
|
||||||
if (isException) {
|
const ids = new Set<number>();
|
||||||
this.exceptionsList = this.exceptionsList.filter(domain => domain !== this.currentTabHost);
|
for (const h of this.pageHighlights) {
|
||||||
} else {
|
if (h.listId !== undefined) ids.add(h.listId);
|
||||||
this.exceptionsList.push(this.currentTabHost);
|
for (const name of h.listNames) {
|
||||||
|
const list = this.pageHighlightsActiveLists.find(l => l.name === name);
|
||||||
|
if (list) ids.add(list.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateExceptionButton();
|
/** Lists that have at least one word found on the current page (for filter chips only). */
|
||||||
this.renderExceptions();
|
private getListsWithMatchesOnPage(): Array<{ id: number; name: string; background: string }> {
|
||||||
await StorageService.update('exceptionsList', this.exceptionsList);
|
const ids = this.getListIdsWithMatchesOnPage();
|
||||||
|
return this.pageHighlightsActiveLists.filter(l => ids.has(l.id));
|
||||||
|
}
|
||||||
|
|
||||||
|
private renderPageHighlightsFilters(): void {
|
||||||
|
const container = document.getElementById('pageHighlightsListFilters');
|
||||||
|
const actionsEl = document.getElementById('pageHighlightsFiltersActions');
|
||||||
|
if (!container) return;
|
||||||
|
const listsOnPage = this.getListsWithMatchesOnPage();
|
||||||
|
if (listsOnPage.length <= 1) {
|
||||||
|
container.innerHTML = '';
|
||||||
|
if (actionsEl) {
|
||||||
|
actionsEl.innerHTML = '';
|
||||||
|
actionsEl.hidden = true;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const isNone = this.pageHighlightsListFilter.size === 1 && this.pageHighlightsListFilter.has(-1);
|
||||||
|
const allSelected = !isNone && (this.pageHighlightsListFilter.size === 0 || this.pageHighlightsListFilter.size === listsOnPage.length);
|
||||||
|
const showQuickActions = listsOnPage.length > PopupController.PAGE_HIGHLIGHTS_MANY_LISTS_THRESHOLD;
|
||||||
|
|
||||||
|
if (actionsEl) {
|
||||||
|
if (showQuickActions) {
|
||||||
|
const allLabel = chrome.i18n.getMessage('select_all') || 'Select all';
|
||||||
|
const noneLabel = chrome.i18n.getMessage('deselect_all') || 'Deselect all';
|
||||||
|
actionsEl.innerHTML = `
|
||||||
|
<button type="button" class="page-highlights-filter-link" data-filter-action="all">${DOMUtils.escapeHtml(allLabel)}</button>
|
||||||
|
<span aria-hidden="true"> · </span>
|
||||||
|
<button type="button" class="page-highlights-filter-link" data-filter-action="none">${DOMUtils.escapeHtml(noneLabel)}</button>
|
||||||
|
`;
|
||||||
|
actionsEl.hidden = false;
|
||||||
|
actionsEl.querySelectorAll('.page-highlights-filter-link').forEach(btn => {
|
||||||
|
btn.addEventListener('click', () => {
|
||||||
|
const action = (btn as HTMLElement).dataset.filterAction;
|
||||||
|
if (action === 'all') {
|
||||||
|
this.pageHighlightsListFilter = new Set();
|
||||||
|
} else if (action === 'none') {
|
||||||
|
this.pageHighlightsListFilter = new Set([-1]);
|
||||||
|
}
|
||||||
|
this.savePopupState();
|
||||||
|
this.renderPageHighlights();
|
||||||
|
this.renderPageHighlightsFilters();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
actionsEl.innerHTML = '';
|
||||||
|
actionsEl.hidden = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const active = (listId: number) =>
|
||||||
|
!isNone && (this.pageHighlightsListFilter.size === 0 || this.pageHighlightsListFilter.has(listId));
|
||||||
|
|
||||||
|
container.innerHTML = listsOnPage.map(list => {
|
||||||
|
const chipActive = active(list.id);
|
||||||
|
const bg = DOMUtils.escapeHtml(list.background);
|
||||||
|
return `
|
||||||
|
<button type="button" class="page-highlights-filter-chip ${chipActive ? 'active' : ''}" data-list-id="${list.id}" title="${DOMUtils.escapeHtml(list.name)}" style="--list-color: ${bg};">
|
||||||
|
<span class="filter-dot" style="background-color: ${bg};"></span>
|
||||||
|
<span>${DOMUtils.escapeHtml(list.name)}</span>
|
||||||
|
</button>
|
||||||
|
`;
|
||||||
|
}).join('');
|
||||||
|
|
||||||
|
container.querySelectorAll('.page-highlights-filter-chip').forEach(btn => {
|
||||||
|
btn.addEventListener('click', () => {
|
||||||
|
const id = Number((btn as HTMLElement).dataset.listId);
|
||||||
|
const listIdsOnPage = this.getListIdsWithMatchesOnPage();
|
||||||
|
const allSelected = this.pageHighlightsListFilter.size === 0;
|
||||||
|
if (this.pageHighlightsListFilter.has(id)) {
|
||||||
|
this.pageHighlightsListFilter.delete(id);
|
||||||
|
if (this.pageHighlightsListFilter.size === 0) {
|
||||||
|
this.pageHighlightsListFilter = new Set();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (allSelected) {
|
||||||
|
this.pageHighlightsListFilter = new Set(listIdsOnPage);
|
||||||
|
this.pageHighlightsListFilter.delete(id);
|
||||||
|
} else {
|
||||||
|
this.pageHighlightsListFilter.add(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.pageHighlightsListFilter.has(-1)) {
|
||||||
|
this.pageHighlightsListFilter.delete(-1);
|
||||||
|
}
|
||||||
|
this.savePopupState();
|
||||||
|
this.renderPageHighlights();
|
||||||
|
this.renderPageHighlightsFilters();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private setupExceptions(): void {
|
||||||
|
document.getElementById('exceptionsModeSelect')?.addEventListener('change', async (e) => {
|
||||||
|
const value = (e.target as HTMLSelectElement).value;
|
||||||
|
this.exceptionsMode = value === 'whitelist' ? 'whitelist' : 'blacklist';
|
||||||
|
await StorageService.update('exceptionsMode', this.exceptionsMode);
|
||||||
MessageService.sendToAllTabs({ type: 'EXCEPTIONS_LIST_UPDATED' });
|
MessageService.sendToAllTabs({ type: 'EXCEPTIONS_LIST_UPDATED' });
|
||||||
|
this.updateExceptionsModeLabel();
|
||||||
|
this.updateExceptionsModeHint();
|
||||||
|
this.renderExceptions();
|
||||||
|
this.updateAddCurrentSiteButton();
|
||||||
|
});
|
||||||
|
|
||||||
|
document.getElementById('addExceptionBtn')?.addEventListener('click', () => this.addExceptionFromInput());
|
||||||
|
document.getElementById('addCurrentSiteBtn')?.addEventListener('click', () => this.addCurrentSiteToExceptions());
|
||||||
|
(document.getElementById('exceptionDomainInput') as HTMLInputElement)?.addEventListener('keydown', (e) => {
|
||||||
|
if (e.key === 'Enter') this.addExceptionFromInput();
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById('clearExceptionsBtn')?.addEventListener('click', async () => {
|
document.getElementById('clearExceptionsBtn')?.addEventListener('click', async () => {
|
||||||
if (confirm(chrome.i18n.getMessage('confirm_clear_exceptions') || 'Clear all exceptions?')) {
|
if (confirm(chrome.i18n.getMessage('confirm_clear_exceptions') || 'Clear all exceptions?')) {
|
||||||
|
if (this.exceptionsMode === 'whitelist') {
|
||||||
|
this.exceptionsWhiteList = [];
|
||||||
|
} else {
|
||||||
this.exceptionsList = [];
|
this.exceptionsList = [];
|
||||||
this.updateExceptionButton();
|
}
|
||||||
this.renderExceptions();
|
this.renderExceptions();
|
||||||
await StorageService.update('exceptionsList', this.exceptionsList);
|
this.updateAddCurrentSiteButton();
|
||||||
|
await StorageService.set({
|
||||||
|
exceptionsList: this.exceptionsList,
|
||||||
|
exceptionsWhiteList: this.exceptionsWhiteList
|
||||||
|
});
|
||||||
MessageService.sendToAllTabs({ type: 'EXCEPTIONS_LIST_UPDATED' });
|
MessageService.sendToAllTabs({ type: 'EXCEPTIONS_LIST_UPDATED' });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById('exceptionsList')?.addEventListener('click', async (e) => {
|
document.getElementById('exceptionsList')?.addEventListener('click', async (e) => {
|
||||||
const target = e.target as HTMLElement;
|
const button = (e.target as HTMLElement).closest('.exception-remove');
|
||||||
if (target.classList.contains('exception-remove')) {
|
if (button) {
|
||||||
const domain = target.dataset.domain!;
|
const domain = (button as HTMLElement).dataset.domain!;
|
||||||
|
if (this.exceptionsMode === 'whitelist') {
|
||||||
|
this.exceptionsWhiteList = this.exceptionsWhiteList.filter(d => d !== domain);
|
||||||
|
} else {
|
||||||
this.exceptionsList = this.exceptionsList.filter(d => d !== domain);
|
this.exceptionsList = this.exceptionsList.filter(d => d !== domain);
|
||||||
this.updateExceptionButton();
|
}
|
||||||
this.renderExceptions();
|
this.renderExceptions();
|
||||||
await StorageService.update('exceptionsList', this.exceptionsList);
|
this.updateAddCurrentSiteButton();
|
||||||
|
await StorageService.set({
|
||||||
|
exceptionsList: this.exceptionsList,
|
||||||
|
exceptionsWhiteList: this.exceptionsWhiteList
|
||||||
|
});
|
||||||
MessageService.sendToAllTabs({ type: 'EXCEPTIONS_LIST_UPDATED' });
|
MessageService.sendToAllTabs({ type: 'EXCEPTIONS_LIST_UPDATED' });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1101,7 +1432,9 @@ export class PopupController {
|
|||||||
globalHighlightEnabled: this.globalHighlightEnabled,
|
globalHighlightEnabled: this.globalHighlightEnabled,
|
||||||
matchCaseEnabled: this.matchCaseEnabled,
|
matchCaseEnabled: this.matchCaseEnabled,
|
||||||
matchWholeEnabled: this.matchWholeEnabled,
|
matchWholeEnabled: this.matchWholeEnabled,
|
||||||
exceptionsList: this.exceptionsList
|
exceptionsList: this.exceptionsList,
|
||||||
|
exceptionsWhiteList: this.exceptionsWhiteList,
|
||||||
|
exceptionsMode: this.exceptionsMode
|
||||||
});
|
});
|
||||||
|
|
||||||
this.renderLists();
|
this.renderLists();
|
||||||
@@ -1111,7 +1444,7 @@ export class PopupController {
|
|||||||
private setupStorageSync(): void {
|
private setupStorageSync(): void {
|
||||||
chrome.storage.onChanged.addListener((changes, areaName) => {
|
chrome.storage.onChanged.addListener((changes, areaName) => {
|
||||||
if (areaName !== 'local') return;
|
if (areaName !== 'local') return;
|
||||||
if (changes.lists || changes.globalHighlightEnabled || changes.matchCaseEnabled || changes.matchWholeEnabled || changes.exceptionsList) {
|
if (changes.lists || changes.globalHighlightEnabled || changes.matchCaseEnabled || changes.matchWholeEnabled || changes.exceptionsList || changes.exceptionsWhiteList || changes.exceptionsMode) {
|
||||||
this.reloadFromStorage();
|
this.reloadFromStorage();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1124,6 +1457,8 @@ export class PopupController {
|
|||||||
this.matchCaseEnabled = data.matchCaseEnabled ?? false;
|
this.matchCaseEnabled = data.matchCaseEnabled ?? false;
|
||||||
this.matchWholeEnabled = data.matchWholeEnabled ?? false;
|
this.matchWholeEnabled = data.matchWholeEnabled ?? false;
|
||||||
this.exceptionsList = data.exceptionsList || [];
|
this.exceptionsList = data.exceptionsList || [];
|
||||||
|
this.exceptionsWhiteList = data.exceptionsWhiteList || [];
|
||||||
|
this.exceptionsMode = data.exceptionsMode === 'whitelist' ? 'whitelist' : 'blacklist';
|
||||||
|
|
||||||
if (this.lists.length === 0) {
|
if (this.lists.length === 0) {
|
||||||
this.lists.push({
|
this.lists.push({
|
||||||
@@ -1148,7 +1483,10 @@ export class PopupController {
|
|||||||
this.renderLists();
|
this.renderLists();
|
||||||
this.renderWords();
|
this.renderWords();
|
||||||
this.renderExceptions();
|
this.renderExceptions();
|
||||||
this.updateExceptionButton();
|
this.updateExceptionsModeSelect();
|
||||||
|
this.updateExceptionsModeLabel();
|
||||||
|
this.updateExceptionsModeHint();
|
||||||
|
this.updateAddCurrentSiteButton();
|
||||||
this.updateFormValues();
|
this.updateFormValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1375,41 +1713,117 @@ export class PopupController {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateExceptionButton(): void {
|
private normalizeDomain(input: string): string | null {
|
||||||
const toggleBtn = document.getElementById('toggleExceptionBtn');
|
const raw = input.trim().toLowerCase();
|
||||||
const btnText = document.getElementById('exceptionBtnText');
|
if (!raw) return null;
|
||||||
|
try {
|
||||||
if (!toggleBtn || !btnText || !this.currentTabHost) return;
|
if (raw.includes('.')) {
|
||||||
|
const url = raw.startsWith('http') ? new URL(raw) : new URL(`https://${raw}`);
|
||||||
const isException = this.exceptionsList.includes(this.currentTabHost);
|
return url.hostname;
|
||||||
|
|
||||||
if (isException) {
|
|
||||||
btnText.textContent = chrome.i18n.getMessage('remove_exception') || 'Remove from Exceptions';
|
|
||||||
toggleBtn.classList.add('danger');
|
|
||||||
const icon = toggleBtn.querySelector('i');
|
|
||||||
if (icon) icon.className = 'fa-solid fa-trash';
|
|
||||||
} else {
|
|
||||||
btnText.textContent = chrome.i18n.getMessage('add_exception') || 'Add to Exceptions';
|
|
||||||
toggleBtn.classList.remove('danger');
|
|
||||||
const icon = toggleBtn.querySelector('i');
|
|
||||||
if (icon) icon.className = 'fa-solid fa-plus';
|
|
||||||
}
|
}
|
||||||
|
return raw;
|
||||||
|
} catch {
|
||||||
|
return raw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private addExceptionFromInput(): void {
|
||||||
|
const input = document.getElementById('exceptionDomainInput') as HTMLInputElement;
|
||||||
|
if (!input) return;
|
||||||
|
|
||||||
|
const domain = this.normalizeDomain(input.value);
|
||||||
|
if (!domain) return;
|
||||||
|
|
||||||
|
const list = this.getCurrentExceptionsList();
|
||||||
|
if (list.includes(domain)) {
|
||||||
|
input.value = '';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.exceptionsMode === 'whitelist') {
|
||||||
|
this.exceptionsWhiteList.push(domain);
|
||||||
|
} else {
|
||||||
|
this.exceptionsList.push(domain);
|
||||||
|
}
|
||||||
|
input.value = '';
|
||||||
|
this.renderExceptions();
|
||||||
|
StorageService.set({
|
||||||
|
exceptionsList: this.exceptionsList,
|
||||||
|
exceptionsWhiteList: this.exceptionsWhiteList
|
||||||
|
}).then(() => {
|
||||||
|
MessageService.sendToAllTabs({ type: 'EXCEPTIONS_LIST_UPDATED' });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private async addCurrentSiteToExceptions(): Promise<void> {
|
||||||
|
let host = this.currentTabHost;
|
||||||
|
if (!host) {
|
||||||
|
await this.getCurrentTab();
|
||||||
|
host = this.currentTabHost;
|
||||||
|
}
|
||||||
|
if (!host) return;
|
||||||
|
const domain = host.toLowerCase();
|
||||||
|
const list = this.getCurrentExceptionsList();
|
||||||
|
if (list.includes(domain)) return;
|
||||||
|
if (this.exceptionsMode === 'whitelist') {
|
||||||
|
this.exceptionsWhiteList.push(domain);
|
||||||
|
} else {
|
||||||
|
this.exceptionsList.push(domain);
|
||||||
|
}
|
||||||
|
this.renderExceptions();
|
||||||
|
await StorageService.set({
|
||||||
|
exceptionsList: this.exceptionsList,
|
||||||
|
exceptionsWhiteList: this.exceptionsWhiteList
|
||||||
|
});
|
||||||
|
MessageService.sendToAllTabs({ type: 'EXCEPTIONS_LIST_UPDATED' });
|
||||||
|
this.updateAddCurrentSiteButton();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private updateExceptionsModeSelect(): void {
|
||||||
|
const select = document.getElementById('exceptionsModeSelect') as HTMLSelectElement | null;
|
||||||
|
if (select) select.value = this.exceptionsMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
private updateExceptionsModeLabel(): void {
|
||||||
|
const label = document.getElementById('exceptionsListLabel');
|
||||||
|
if (!label) return;
|
||||||
|
const key = this.exceptionsMode === 'whitelist' ? 'exceptions_list_whitelist' : 'exceptions_list_blacklist';
|
||||||
|
label.textContent = chrome.i18n.getMessage(key) || (this.exceptionsMode === 'whitelist' ? 'Sites to highlight (whitelist):' : 'Sites to exclude (blacklist):');
|
||||||
|
}
|
||||||
|
|
||||||
|
private updateExceptionsModeHint(): void {
|
||||||
|
const hint = document.getElementById('exceptionsModeHint');
|
||||||
|
if (!hint) return;
|
||||||
|
const key = this.exceptionsMode === 'whitelist' ? 'exceptions_mode_hint_whitelist' : 'exceptions_mode_hint_blacklist';
|
||||||
|
hint.textContent = chrome.i18n.getMessage(key) || (this.exceptionsMode === 'whitelist' ? 'Only highlight on these sites.' : 'Don\'t highlight on these sites.');
|
||||||
|
}
|
||||||
|
|
||||||
|
private updateAddCurrentSiteButton(): void {
|
||||||
|
const btn = document.getElementById('addCurrentSiteBtn') as HTMLButtonElement | null;
|
||||||
|
if (!btn) return;
|
||||||
|
const host = this.currentTabHost.toLowerCase();
|
||||||
|
const list = this.getCurrentExceptionsList();
|
||||||
|
const alreadyInList = host !== '' && list.includes(host);
|
||||||
|
btn.disabled = !host || alreadyInList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private renderExceptions(): void {
|
private renderExceptions(): void {
|
||||||
const container = document.getElementById('exceptionsList');
|
const container = document.getElementById('exceptionsList');
|
||||||
if (!container) return;
|
if (!container) return;
|
||||||
|
|
||||||
if (this.exceptionsList.length === 0) {
|
const list = this.getCurrentExceptionsList();
|
||||||
container.innerHTML = `<div class="exception-item">${chrome.i18n.getMessage('no_exceptions') || 'No exceptions'}</div>`;
|
if (list.length === 0) {
|
||||||
|
container.innerHTML = `<div class="exception-item exception-empty">${chrome.i18n.getMessage('no_exceptions') || 'No exceptions'}</div>`;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
container.innerHTML = this.exceptionsList.map(domain =>
|
container.innerHTML = list.map(domain =>
|
||||||
`<div class="exception-item">
|
`<div class="exception-item">
|
||||||
|
<span class="exception-domain-icon"><i class="fa-solid fa-at"></i></span>
|
||||||
<span class="exception-domain">${DOMUtils.escapeHtml(domain)}</span>
|
<span class="exception-domain">${DOMUtils.escapeHtml(domain)}</span>
|
||||||
<button type="button" class="exception-remove" data-domain="${DOMUtils.escapeHtml(domain)}" title="${DOMUtils.escapeHtml(chrome.i18n.getMessage('remove') || 'Remove')}" aria-label="${DOMUtils.escapeHtml(chrome.i18n.getMessage('remove') || 'Remove')}">
|
<button type="button" class="exception-remove" data-domain="${DOMUtils.escapeHtml(domain)}" title="${DOMUtils.escapeHtml(chrome.i18n.getMessage('remove') || 'Remove')}" aria-label="${DOMUtils.escapeHtml(chrome.i18n.getMessage('remove') || 'Remove')}">
|
||||||
<i class="fa-solid fa-trash"></i>
|
<i class="fa-solid fa-xmark"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>`
|
</div>`
|
||||||
).join('');
|
).join('');
|
||||||
@@ -1419,5 +1833,7 @@ export class PopupController {
|
|||||||
(document.getElementById('globalHighlightToggle') as HTMLInputElement).checked = this.globalHighlightEnabled;
|
(document.getElementById('globalHighlightToggle') as HTMLInputElement).checked = this.globalHighlightEnabled;
|
||||||
(document.getElementById('matchCase') as HTMLInputElement).checked = this.matchCaseEnabled;
|
(document.getElementById('matchCase') as HTMLInputElement).checked = this.matchCaseEnabled;
|
||||||
(document.getElementById('matchWhole') as HTMLInputElement).checked = this.matchWholeEnabled;
|
(document.getElementById('matchWhole') as HTMLInputElement).checked = this.matchWholeEnabled;
|
||||||
|
const groupCheckbox = document.getElementById('pageHighlightsGroupByList') as HTMLInputElement;
|
||||||
|
if (groupCheckbox) groupCheckbox.checked = this.pageHighlightsGroupByList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
15
src/types.ts
15
src/types.ts
@@ -14,18 +14,24 @@ export interface HighlightList {
|
|||||||
words: HighlightWord[];
|
words: HighlightWord[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type ExceptionsMode = 'blacklist' | 'whitelist';
|
||||||
|
|
||||||
export interface StorageData {
|
export interface StorageData {
|
||||||
lists: HighlightList[];
|
lists: HighlightList[];
|
||||||
globalHighlightEnabled: boolean;
|
globalHighlightEnabled: boolean;
|
||||||
matchCaseEnabled: boolean;
|
matchCaseEnabled: boolean;
|
||||||
matchWholeEnabled: boolean;
|
matchWholeEnabled: boolean;
|
||||||
exceptionsList: string[];
|
exceptionsList: string[];
|
||||||
|
exceptionsWhiteList: string[];
|
||||||
|
exceptionsMode: ExceptionsMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ActiveWord {
|
export interface ActiveWord {
|
||||||
text: string;
|
text: string;
|
||||||
background: string;
|
background: string;
|
||||||
foreground: string;
|
foreground: string;
|
||||||
|
listId?: number;
|
||||||
|
listName?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface HighlightInfo {
|
export interface HighlightInfo {
|
||||||
@@ -33,6 +39,9 @@ export interface HighlightInfo {
|
|||||||
count: number;
|
count: number;
|
||||||
background: string;
|
background: string;
|
||||||
foreground: string;
|
foreground: string;
|
||||||
|
listId?: number;
|
||||||
|
listName?: string;
|
||||||
|
listNames?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MessageData {
|
export interface MessageData {
|
||||||
@@ -48,6 +57,8 @@ export interface MessageData {
|
|||||||
export interface ExportData {
|
export interface ExportData {
|
||||||
lists: HighlightList[];
|
lists: HighlightList[];
|
||||||
exceptionsList: string[];
|
exceptionsList: string[];
|
||||||
|
exceptionsWhiteList?: string[];
|
||||||
|
exceptionsMode?: ExceptionsMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DEFAULT_STORAGE: StorageData = {
|
export const DEFAULT_STORAGE: StorageData = {
|
||||||
@@ -55,7 +66,9 @@ export const DEFAULT_STORAGE: StorageData = {
|
|||||||
globalHighlightEnabled: true,
|
globalHighlightEnabled: true,
|
||||||
matchCaseEnabled: false,
|
matchCaseEnabled: false,
|
||||||
matchWholeEnabled: false,
|
matchWholeEnabled: false,
|
||||||
exceptionsList: []
|
exceptionsList: [],
|
||||||
|
exceptionsWhiteList: [],
|
||||||
|
exceptionsMode: 'blacklist'
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CONSTANTS = {
|
export const CONSTANTS = {
|
||||||
|
|||||||
Reference in New Issue
Block a user